{"version":3,"sources":["webpack:///./node_modules/@azure/logger/dist/browser/index.js","webpack:///./src/store/modules/filter/index.ts","webpack:///./node_modules/vuex-module-decorators/dist/esm/index.js","webpack:///./node_modules/@azure/logger/dist/browser/debug.js","webpack:///./node_modules/@azure/logger/dist/browser/log.common.js","webpack:///./src/mixins/filterMixin.ts","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/pipeline.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/log.js","webpack:///./node_modules/@azure/abort-controller/dist/browser/AbortError.js","webpack:///./node_modules/@azure/core-util/dist/browser/random.js","webpack:///./node_modules/@azure/core-util/dist/browser/delay.js","webpack:///./node_modules/@azure/core-util/dist/browser/object.js","webpack:///./node_modules/@azure/core-util/dist/browser/error.js","webpack:///./node_modules/@azure/core-util/dist/browser/bytesEncoding.common.js","webpack:///./node_modules/@azure/core-util/dist/browser/uuidUtils.common.js","webpack:///./node_modules/@azure/core-util/dist/browser/uuidUtils.js","webpack:///./node_modules/@azure/core-util/dist/browser/checkEnvironment.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/util/sanitizer.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/policies/logPolicy.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/policies/redirectPolicy.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/util/userAgentPlatform.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/constants.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/util/userAgent.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/policies/userAgentPolicy.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/util/typeGuards.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/util/file.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/util/concat.common.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/policies/multipartPolicy.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/policies/decompressResponsePolicy.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/util/helpers.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/retryStrategies/throttlingRetryStrategy.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/retryStrategies/exponentialRetryStrategy.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/policies/retryPolicy.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/policies/defaultRetryPolicy.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/httpHeaders.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/policies/formDataPolicy.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/policies/proxyPolicy.common.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/policies/setClientRequestIdPolicy.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/policies/agentPolicy.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/policies/tlsPolicy.js","webpack:///./node_modules/@azure/core-tracing/dist/browser/tracingContext.js","webpack:///./node_modules/@azure/core-tracing/dist/browser/state.js","webpack:///./node_modules/@azure/core-tracing/dist/browser/instrumenter.js","webpack:///./node_modules/@azure/core-tracing/dist/browser/tracingClient.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/util/inspect.common.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/restError.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/policies/tracingPolicy.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/createPipelineFromOptions.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/fetchHttpClient.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/defaultHttpClient.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/pipelineRequest.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/util/tokenCycler.js","webpack:///./node_modules/@azure/core-rest-pipeline/dist/browser/policies/bearerTokenAuthenticationPolicy.js","webpack:///./node_modules/@azure/core-client/dist/browser/base64.js","webpack:///./node_modules/@azure/core-client/dist/browser/interfaces.js","webpack:///./node_modules/@azure/core-client/dist/browser/utils.js","webpack:///./node_modules/@azure/core-client/dist/browser/serializer.js","webpack:///./node_modules/@azure/core-client/dist/browser/state.js","webpack:///./node_modules/@azure/core-client/dist/browser/operationHelpers.js","webpack:///./node_modules/@azure/core-client/dist/browser/deserializationPolicy.js","webpack:///./node_modules/@azure/core-client/dist/browser/interfaceHelpers.js","webpack:///./node_modules/@azure/core-client/dist/browser/serializationPolicy.js","webpack:///./node_modules/@azure/core-client/dist/browser/pipeline.js","webpack:///./node_modules/@azure/core-client/dist/browser/httpClientCache.js","webpack:///./node_modules/@azure/core-client/dist/browser/urlHelpers.js","webpack:///./node_modules/@azure/core-client/dist/browser/log.js","webpack:///./node_modules/@azure/core-client/dist/browser/serviceClient.js","webpack:///./node_modules/@azure/search-documents/dist-esm/src/generated/data/models/mappers.js","webpack:///./node_modules/@azure/search-documents/dist-esm/src/generated/data/models/parameters.js","webpack:///./node_modules/@azure/search-documents/dist-esm/src/generated/data/operations/documents.js","webpack:///./node_modules/@azure/search-documents/dist-esm/src/generated/data/searchClientContext.js","webpack:///./node_modules/@azure/search-documents/dist-esm/src/generated/data/searchClient.js","webpack:///./node_modules/@azure/core-auth/dist/browser/azureKeyCredential.js","webpack:///./node_modules/@azure/core-auth/dist/browser/tokenCredential.js","webpack:///./node_modules/@azure/search-documents/dist-esm/src/searchApiKeyCredentialPolicy.js","webpack:///./node_modules/@azure/search-documents/dist-esm/src/logger.js","webpack:///./node_modules/@azure/search-documents/dist-esm/src/tracing.js","webpack:///./node_modules/@azure/search-documents/dist-esm/src/geographyPoint.js","webpack:///./node_modules/@azure/search-documents/dist-esm/src/serialization.js","webpack:///./node_modules/@azure/search-documents/dist-esm/src/odataMetadataPolicy.js","webpack:///./node_modules/@azure/search-documents/dist-esm/src/indexDocumentsBatch.js","webpack:///./node_modules/@azure/search-documents/dist-esm/src/base64.browser.js","webpack:///./node_modules/@azure/search-documents/dist-esm/src/serviceModels.js","webpack:///./node_modules/@azure/search-documents/dist-esm/src/serviceUtils.js","webpack:///./node_modules/@azure/search-documents/dist-esm/src/searchAudience.js","webpack:///./node_modules/@azure/search-documents/dist-esm/src/constants.js","webpack:///./node_modules/@azure/search-documents/dist-esm/src/searchClient.js","webpack:///./src/services/azureSearchclient.ts","webpack:///./src/store/modules/filter/types.ts"],"names":["registeredLoggers","Set","logLevelFromEnv","process","AZURE_LOG_LEVEL","undefined","azureLogLevel","AzureLogger","log","args","AZURE_LOG_LEVELS","setLogLevel","level","isAzureLogLevel","Error","join","enabledNamespaces","logger","shouldEnable","push","namespace","enable","console","error","levelMap","verbose","info","warning","createClientLogger","clientRootLogger","extend","patchLogMethod","createLogger","parent","child","Object","assign","disable","add","Boolean","logLevel","includes","FilterModule","VuexModule","constructor","_defineProperty","products","total","this","filters","filter","f","type","eFilterType","Category","find","id","selectedCategoryId","parentId","response","axios","get","data","saveSelectedCategoryId","categoryName","_this$filters$find","categoryId","x","friendlyUrl","selectedSubCategoryId","saveSelectedSubcategoryId","subCategoryName","_this$filters$find2","subCategoryId","actionSaveSelectedCategoryId","actionSaveSelectedSubcategoryId","saveProducts","result","paginationResult","__decorate","MutationAction","Mutation","Action","commit","Module","namespaced","name","store","dynamic","getModule","addPropertiesToObject","target","source","_loop_1","k","defineProperty","_i","_a","keys","length","getModuleName","module","_vmdModuleName","concat","actions","mutations","state","getters","modules","moduleClass","moduleName","_statics","genStatic","_genStatic","storeModule","reservedKeys","stateFactory","prototype","s","forEach","key","indexOf","hasOwnProperty","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","Promise","reject","fulfilled","step","next","e","rejected","done","then","apply","__generator","body","y","t","g","_","label","sent","trys","ops","verb","Symbol","iterator","n","v","op","TypeError","call","pop","__spreadArray","to","from","pack","arguments","ar","i","l","Array","slice","staticStateGenerator","modOpt","statics","path","split","path_1","segment","staticGetterGenerator","staticMutationGenerator","staticActionGenerators","_b","dispatch","registerDynamicModule","registerModule","preserveState","addGettersToModule","targetModule","srcModule","getOwnPropertyNames","funcName","descriptor","getOwnPropertyDescriptor","rootState","rootGetters","thisObj","context","got","moduleDecoratorFactory","moduleOptions","stateFactory$1","parentModule","getPrototypeOf","modOrOpt","config","actionDecoratorFactory","params","_c","rawError","_d","root","actionFunction","action","payload","actionPayload","moduleAccessor","e_1","toString","stack","handler","targetOrParams","mutationFunction","mutation","mutationActionDecoratorFactory","mutactFunction","mutate","stateItem","paramsOrTarget","debugEnvVariable","DEBUG","enabledString","skippedNamespaces","debuggers","debugObj","createDebugger","enabled","namespaces","wildcard","namespaceList","map","ns","trim","replace","startsWith","RegExp","substr","instance","endsWith","skipped","test","enabledNamespace","newDebugger","debug","destroy","index","splice","firstArg","String","warn","FilterMixin","Vue","c","route","categorySlug","Subcategory","parentCat","subCategorySlug","selectedCategory","onFilterSelected","filterId","selectedFilter","leftNavigations","$router","fuzzyQuerySearch","str","escapingCharacters","char","Component","ValidPhaseNames","HttpPipeline","policies","_policies","_orderedPolicies","policy","options","phase","afterPhase","has","removedPolicies","policyDescriptor","httpClient","request","getOrderedPolicies","pipeline","reduceRight","req","sendRequest","orderPolicies","policyMap","Map","createPhase","hasRun","hasAfterPolicies","serializePhase","noPhase","deserializePhase","retryPhase","signPhase","orderedPhases","getPhase","policyName","node","dependsOn","dependants","set","afterPolicies","afterPolicyName","afterNode","beforePolicies","beforePolicyName","beforeNode","walkPhase","size","dependant","delete","walkPhases","iteration","initialResultLength","createEmptyPipeline","create","AbortError","message","super","getRandomIntegerInclusive","min","max","Math","ceil","floor","offset","random","calculateRetryDelay","retryAttempt","exponentialDelay","retryDelayInMs","pow","clampedDelay","maxRetryDelayInMs","retryAfterInMs","isObject","input","isArray","Date","isError","hasName","hasMessage","getErrorMessage","stringified","JSON","stringify","err","stringToUint8Array","format","utf8StringToUint8Array","base64ToUint8Array","base64UrlToUint8Array","hexStringToUint8Array","TextEncoder","encode","Uint8Array","atob","charCodeAt","base64String","hexDigits","bytes","highNibble","lowNibble","parseInt","generateUUID","uuid","randomNumber","uuidFunction","globalThis","crypto","randomUUID","bind","window","document","self","importScripts","Deno","version","deno","Bun","isNodeLike","versions","RedactedString","navigator","product","defaultAllowedHeaderNames","defaultAllowedQueryParameters","additionalAllowedHeaderNames","allowedHeaderNames","additionalAllowedQueryParameters","allowedQueryParameters","toLowerCase","p","obj","seen","sanitizeHeaders","sanitizeUrl","sanitizeQuery","url","URL","search","searchParams","sanitized","logPolicyName","logPolicy","sanitizer","sanitize","status","headers","redirectPolicyName","allowedRedirect","redirectPolicy","maxRetries","handleRedirect","async","currentRetries","locationHeader","method","res","getHeaderName","getBrowserInfo","userAgent","browserRegexes","regex","browser","match","brand","getBrandVersionString","brands","brandOrder","foundBrand","b","setPlatformSpecificData","localNavigator","osPlatform","userAgentData","entropyValues","getHighEntropyValues","architecture","platform","platformVersion","EdgeRuntime","SDK_VERSION","DEFAULT_RETRY_POLICY_COUNT","getUserAgentString","telemetryInfo","parts","token","getUserAgentHeaderName","getUserAgentValue","prefix","runtimeInfo","defaultAgent","userAgentValue","UserAgentHeaderName","userAgentPolicyName","userAgentPolicy","userAgentPrefix","isNodeReadableStream","isWebReadableStream","getReader","tee","isBlob","stream","hasRawContent","getRawContent","blob","drain","Response","toBlobPart","Blob","rawContent","sources","generateBoundary","encodeHeaders","getLength","byteLength","getTotalLength","partLength","buildRequestBody","boundary","flatMap","part","contentLength","multipartPolicyName","maxBoundaryLength","validBoundaryCharacters","assertValidBoundary","some","multipartPolicy","multipartBody","contentTypeHeader","parsedHeader","contentType","parsedBoundary","decompressResponsePolicy","delayInMs","timer","onAborted","rejectOnAbort","abortErrorMsg","removeListeners","abortSignal","removeEventListener","clearTimeout","aborted","setTimeout","addEventListener","parseHeaderValueAsNumber","headerName","valueAsNum","Number","isNaN","RetryAfterHeader","AllRetryAfterHeaders","getRetryAfterInMs","header","retryAfterValue","multiplyingFactor","retryAfterHeader","date","parse","diff","now","isFinite","isThrottlingRetryResponse","throttlingRetryStrategy","skipStrategy","DEFAULT_CLIENT_RETRY_INTERVAL","DEFAULT_CLIENT_MAX_RETRY_INTERVAL","exponentialRetryStrategy","retryInterval","maxRetryInterval","retryCount","responseError","matchedSystemError","isSystemError","ignoreSystemErrors","isExponential","isExponentialRetryResponse","ignoreExponentialResponse","ignoreHttpStatusCodes","unknownResponse","errorToThrow","code","retryPolicyLogger","retryPolicyName","retryPolicy","strategies","retryRequest","requestId","abortError","strategiesLoop","strategy","strategyLogger","modifiers","retry","redirectTo","defaultRetryPolicyName","defaultRetryPolicy","normalizeName","headerIterator","entry","values","HttpHeadersImpl","rawHeaders","_headersMap","preserveCase","normalizedName","toJSON","createHttpHeaders","formDataPolicyName","formDataToFormDataMap","formData","formDataMap","entries","formDataPolicy","FormData","wwwFormUrlEncode","prepareFormData","urlSearchParams","URLSearchParams","subValue","append","fieldName","fileName","errorMessage","proxyPolicy","setClientRequestIdPolicyName","setClientRequestIdPolicy","requestIdHeaderName","agentPolicyName","agentPolicy","agent","tlsPolicyName","tlsPolicy","tlsSettings","knownContextKeys","span","for","createTracingContext","TracingContextImpl","parentContext","setValue","initialContext","_contextMap","newContext","instrumenterImplementation","createDefaultTracingSpan","end","isRecording","recordException","setAttribute","setStatus","addEvent","createDefaultInstrumenter","createRequestHeaders","parseTraceparentHeader","startSpan","_name","spanOptions","tracingContext","_context","callback","callbackArgs","getInstrumenter","createTracingClient","packageName","packageVersion","operationOptions","startSpanResult","tracingOptions","getValue","updatedOptions","withSpan","withContext","traceparentHeader","custom","errorSanitizer","statusCode","enumerable","setPrototypeOf","isRestError","REQUEST_SEND_ERROR","PARSE_ERROR","tracingPolicyName","tracingPolicy","userAgentPromise","tracingClient","tryCreateTracingClient","spanAttributes","tryCreateSpan","tryProcessResponse","tryProcessError","spanKind","serviceRequestId","createPipelineFromOptions","addPolicy","tlsOptions","proxyOptions","userAgentOptions","telemetryOptions","clientRequestIdHeaderName","retryOptions","loggingOptions","redirectOptions","FetchHttpClient","isInsecure","protocol","allowInsecureConnection","proxySettings","makeRequest","getError","abortController","abortControllerCleanup","setupAbortSignal","buildFetchHeaders","streaming","requestBody","requestInit","signal","Request","credentials","withCredentials","cache","duplex","fetch","onUploadProgress","loadedBytes","buildPipelineResponse","httpResponse","buildPipelineHeaders","bodyStream","buildBodyStream","onProgress","onDownloadProgress","onEnd","streamResponseStatusCodes","POSITIVE_INFINITY","enableBrowserStreams","browserStreamBody","responseStream","blobBody","bodyAsText","text","AbortController","abortListener","event","abort","timeout","pipelineHeaders","Headers","responseHeaders","readableStream","isTransformStreamSupported","pipeThrough","TransformStream","chunk","controller","enqueue","terminate","reader","ReadableStream","read","close","releaseLock","reason","cancel","createFetchHttpClient","createDefaultHttpClient","_e","_f","_g","disableKeepAlive","createPipelineRequest","DEFAULT_CYCLER_OPTIONS","forcedRefreshWindowInMs","retryIntervalInMs","refreshWindowInMs","beginRefresh","getAccessToken","refreshTimeout","tryGetAccessToken","finalToken","createTokenCycler","credential","tokenCyclerOptions","tenantId","refreshWorker","cycler","isRefreshing","refreshAfterTimestamp","expiresOnTimestamp","refresh","scopes","getTokenOptions","getToken","_token","catch","tokenOptions","hasClaimChallenge","claims","tenantIdChanged","mustRefresh","shouldRefresh","bearerTokenAuthenticationPolicyName","trySendRequest","defaultAuthorizeRequest","enableCae","accessToken","isChallengeResponse","authorizeRequestOnCaeChallenge","onChallengeOptions","caeClaims","tokenType","bearerTokenAuthenticationPolicy","challengeCallbacks","callbacks","authorizeRequest","authorizeRequestOnChallenge","shouldSendRequest","getCaeChallengeClaims","parsedClaim","parseChallenges","challenges","challengeRegex","paramRegex","parsedChallenges","exec","scheme","paramsString","paramMatch","encodeByteArray","fromCharCode","btoa","decodeString","byteString","arr","XML_ATTRKEY","XML_CHARKEY","isPrimitiveBody","mapperTypeName","validateISODuration","isDuration","validUuidRegex","isValidUuid","handleNullableResponseAndWrappableBody","responseObject","combinedHeadersAndBody","hasNullableType","shouldWrapBody","flattenResponse","fullResponse","responseSpec","parsedHeaders","parsedBody","bodyMapper","isNullable","nullable","expectedBodyTypeName","readableStreamBody","modelProperties","isPageableResponse","serializedName","arrayResponse","modelMappers","isXML","mapper","objectName","failValidation","constraintName","constraintValue","constraints","ExclusiveMaximum","ExclusiveMinimum","InclusiveMaximum","InclusiveMinimum","MaxItems","MaxLength","MinItems","MinLength","MultipleOf","Pattern","UniqueItems","pattern","item","object","xml","rootName","includeRoot","xmlCharKey","mapperType","isConstant","defaultValue","required","serializeBasicTypes","enumMapper","serializeEnumType","allowedValues","serializeDateTypes","serializeByteArrayType","serializeBase64UrlType","serializeSequenceType","serializeDictionaryType","serializeCompositeType","responseBody","ignoreUnknownProperties","xmlIsWrapped","deserializeCompositeType","parseFloat","unixTimeToDate","base64UrlToByteArray","deserializeSequenceType","deserializeDictionaryType","createSerializer","trimEnd","ch","len","bufferToBase64Url","buffer","valueOf","splitSerializeName","prop","classes","partialclass","subwords","charAt","dateToUnixTime","d","getTime","typeName","objectType","pipe","ArrayBuffer","isView","isPresent","toISOString","substring","toUTCString","serializer","isXml","elementType","element","className","tempArray","serializedValue","serialize","xmlNamespace","xmlnsKey","xmlNamespacePrefix","valueType","tempDictionary","getXmlObjectValue","resolveAdditionalProperties","additionalProperties","modelMapper","resolveReferencedMapper","resolveModelProperties","modelProps","getPolymorphicDiscriminatorRecursively","getPolymorphicMapper","propertyMapper","readOnly","propName","parentObject","xmlName","xmlElementName","paths","pathName","childObject","propertyObjectName","toSerialize","polymorphicDiscriminator","clientName","xmlIsAttribute","additionalPropertiesMapper","propNames","clientPropName","isAdditionalProperty","every","pn","isSpecialXmlProperty","propertyName","handledPropertyNames","headerCollectionPrefix","dictionary","headerKey","deserialize","xmlIsMsText","wrapped","elementList","property","propertyInstance","steps","arrayInstance","responsePropName","getIndexDiscriminator","discriminators","discriminatorValue","typeNamesToCheck","currentName","shift","indexDiscriminator","uberParent","polymorphicPropertyName","discriminatorName","polymorphicMapper","getPolymorphicDiscriminatorSafely","MapperTypeNames","Base64Url","ByteArray","Composite","DateTime","DateTimeRfc1123","Dictionary","Enum","Sequence","Stream","TimeSpan","UnixTime","operationRequestMap","WeakMap","getOperationArgumentValueFromParameter","operationArguments","parameter","fallbackObject","parameterPath","parameterMapper","propertySearchResult","getPropertyFromParameterPath","propertyFound","useDefaultValue","propertyValue","propertyPath","parameterPathPart","originalRequestSymbol","hasOriginalRequest","getOperationRequestInfo","defaultJsonContentTypes","defaultXmlContentTypes","deserializationPolicyName","deserializationPolicy","jsonContentTypes","expectedContentTypes","json","xmlContentTypes","parseXML","serializerOptions","deserializeResponseBody","getOperationResponseMap","parsedResponse","operationInfo","operationSpec","operationResponseGetter","responses","shouldDeserializeResponse","shouldDeserialize","shouldReturnResponse","handleErrorResponse","valueToDeserialize","deserializeError","restError","httpMethod","headersMapper","isOperationSpecEmpty","expectedStatusCodes","isSuccessByStatus","isExpectedStatusCode","errorResponseSpec","default","initialErrorMessage","defaultBodyMapper","defaultHeadersMapper","deserializedError","elementName","internalError","defaultError","operationResponse","opts","contentComponents","component","msg","errCode","getStreamingResponseStatusCodes","getPathStringFromParameter","serializationPolicyName","serializationPolicy","stringifyXML","serializeHeaders","serializeRequestBody","headerParameters","headerParameter","headerValue","customHeaders","requestOptions","customHeaderName","requestBodyParameterPathString","isStream","getXmlValueWithNamespace","prepareXMLRootList","mediaType","formDataParameters","formDataParameter","formDataParameterValue","formDataParameterPropertyName","xmlNamespaceKey","createClientPipeline","credentialOptions","credentialScopes","serializationOptions","deserializationOptions","cachedHttpClient","getCachedDefaultHttpClient","CollectionFormatToDelimiterMap","CSV","SSV","Multi","TSV","Pipes","getRequestUrl","baseUri","urlReplacements","calculateUrlReplacements","isAbsolutePath","requestUrl","replaceAll","isAbsoluteUrl","appendPath","queryParams","sequenceParams","calculateQueryParameters","appendQueryParams","replacements","searchValue","replaceValue","urlParameters","urlParameter","urlParameterValue","parameterPathString","skipEncoding","encodeURIComponent","pathToAppend","parsedUrl","newPath","pathname","searchStart","queryParameters","queryParameter","queryParameterValue","delimiter","collectionFormat","simpleParseQueryParams","queryString","pairs","pair","existingValue","noOverwrite","combinedParams","valueSet","unshift","searchPieces","_requestContentType","requestContentType","_endpoint","endpoint","_allowInsecureConnection","_httpClient","createDefaultPipeline","additionalPolicies","position","baseUrl","rawResponse","flatResponse","onResponse","details","getCredentialScopes","SearchError","SearchDocumentsResult","count","coverage","facets","nextPageParameters","results","nextLink","FacetResult","SearchRequest","includeTotalResultCount","highlightFields","highlightPostTag","highlightPreTag","minimumCoverage","orderBy","queryType","scoringStatistics","sessionId","scoringParameters","scoringProfile","searchText","searchFields","searchMode","select","skip","top","SearchResult","_score","_highlights","SuggestDocumentsResult","SuggestResult","_text","SuggestRequest","useFuzzyMatching","suggesterName","IndexBatch","IndexAction","__actionType","IndexDocumentsResult","IndexingResult","succeeded","AutocompleteResult","AutocompleteItem","queryPlusText","AutocompleteRequest","autocompleteMode","accept","searchRequest","selectedFields","searchText1","filter1","highlightPostTag1","highlightPreTag1","minimumCoverage1","orderBy1","searchFields1","select1","top1","suggestRequest","filter2","useFuzzyMatching1","highlightPostTag2","highlightPreTag2","minimumCoverage2","searchFields2","top2","autocompleteRequest","DocumentsImpl","client","sendOperationRequest","countOperationSpec","searchGetOperationSpec","searchPostOperationSpec","getOperationSpec","suggestGetOperationSpec","suggestPostOperationSpec","batch","indexOperationSpec","autocompleteGetOperationSpec","autocompletePostOperationSpec","200","207","indexName","apiVersion","defaults","optionsWithDefaults","documents","AzureKeyCredential","_key","newKey","isTokenCredential","castCredential","signRequest","API_KEY_HEADER_NAME","searchApiKeyCredentialPolicy","createSearchApiKeyCredentialPolicy","createSpan","WorldGeodeticSystem1984","GeographyPoint","geographyPoint","longitude","latitude","coordinates","crs","properties","ISO8601DateRegex","GeoJSONPointTypeName","walk","serializeSpecialNumbers","deserializeSpecialNumbers","deserializeDates","deserializeGeoPoint","start","seenMarker","queue","current","mapped","Infinity","NaN","isGeoJSONPoint","requiredKeys","isValidObject","propertyValidator","isCoordinateArray","isCrs","maybeCoordinates","maybeCrs","isCrsProperties","maybeProperties","requiredKey","AcceptHeaderName","odataMetadataPolicy","createOdataMetadataPolicy","metadataLevel","IndexDocumentsBatch","doc","keyNameOrDocuments","keyValues","keyName","keyValue","decode","KnownTokenizerNames","KnownTokenFilterNames","KnownCharFilterNames","KnownAnalyzerNames","generatedSearchResultToPublicSearchResult","returnValues","rerankerScore","captions","restProps","score","highlights","generatedSuggestDocumentsResultToPublicSuggestDocumentsResult","searchDocumentsResult","defaultServiceVersion","KnownSearchAudience","libInfo","internalClientPipelineOptions","scope","audience","AzurePublicCloud","documentsCount","nonFieldOptions","fullOptions","convertSearchFields","RangeError","autocompletePost","includeTotalCount","restOptions","convertSelect","convertOrderBy","searchPost","resultNextPageParameters","restResult","modifiedResults","converted","continuationToken","encodeContinuationToken","settings","decodedContinuation","decodeContinuationToken","searchDocuments","firstPage","listSearchResultsPage","page","e_1_1","return","iter","listSearchResultsAll","asyncIterator","byPage","pageResult","listSearchResults","suggestPost","modifiedResult","throwOnAnyFailure","upload","indexDocuments","merge","mergeOrUpload","keyValuesOrOptions","decodedToken","azureProductSearch","SearchClient","_process$env$SEARCHUR","_process$env$SEARCH_P","_process$env$SEARCHKE"],"mappings":"iHAAA,8DAGA,MAAMA,EAAoB,IAAIC,IACxBC,EAAsC,qBAAZC,GAA2B,0IAAe,yIAAYC,sBAAoBC,EAC1G,IAAIC,EAMG,MAAMC,EAAc,eAAM,SACjCA,EAAYC,IAAM,IAAIC,KAClB,OAAMD,OAAOC,IAEjB,MAAMC,EAAmB,CAAC,UAAW,OAAQ,UAAW,SAmBjD,SAASC,EAAYC,GACxB,GAAIA,IAAUC,EAAgBD,GAC1B,MAAM,IAAIE,MAAM,sBAAsBF,0BAA8BF,EAAiBK,KAAK,QAE9FT,EAAgBM,EAChB,MAAMI,EAAoB,GAC1B,IAAK,MAAMC,KAAUjB,EACbkB,EAAaD,IACbD,EAAkBG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IAAIkF,WAAW,mDAAmDnvC,KAAKiqC,eAEjF,MAAO,CACH7E,SAAUvjC,EAAOujC,SACjBF,mBAAoBrjC,EAAOqjC,oBAGnC,MAAO1/B,GACH,MAAM,IAAI1H,MAAM,4CAA4CyzC,IAGpE,cAAclL,GACV,OAAIA,EACOA,EAAOtoC,KAAK,KAEhBsoC,EAEX,oBAAoBF,GAChB,OAAIA,EACOA,EAAapoC,KAAK,KAEtBooC,EAEX,eAAeP,GACX,OAAIA,EACOA,EAAQ7nC,KAAK,KAEjB6nC,G,aC3df,MAAM4L,GAAqB,IAAIC,GACN,QADkBC,GACvCv0C,kDAAqB,IAAAu0C,MAAI,GACO,QADLC,GAC3Bx0C,sBAAgC,IAAAw0C,MAAI,GACpC,IAAItH,GAAwC,QAAtBuH,GAACz0C,0CAAqB,IAAAy0C,MAAI,KAGrCJ,W,kCCCR,IAAKnxC,EAAZ,2CAAYA,GACVA,IAAA,wBACAA,IAAA,0BACAA,IAAA,gCAHF,CAAYA,MAAW","file":"js/chunk-3ec365af.bbfa3f3d.js","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport debug from \"./debug.js\";\nconst registeredLoggers = new Set();\nconst logLevelFromEnv = (typeof process !== \"undefined\" && process.env && process.env.AZURE_LOG_LEVEL) || undefined;\nlet azureLogLevel;\n/**\n * The AzureLogger provides a mechanism for overriding where logs are output to.\n * By default, logs are sent to stderr.\n * Override the `log` method to redirect logs to another location.\n */\nexport const AzureLogger = debug(\"azure\");\nAzureLogger.log = (...args) => {\n debug.log(...args);\n};\nconst AZURE_LOG_LEVELS = [\"verbose\", \"info\", \"warning\", \"error\"];\nif (logLevelFromEnv) {\n // avoid calling setLogLevel because we don't want a mis-set environment variable to crash\n if (isAzureLogLevel(logLevelFromEnv)) {\n setLogLevel(logLevelFromEnv);\n }\n else {\n console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(\", \")}.`);\n }\n}\n/**\n * Immediately enables logging at the specified log level. If no level is specified, logging is disabled.\n * @param level - The log level to enable for logging.\n * Options from most verbose to least verbose are:\n * - verbose\n * - info\n * - warning\n * - error\n */\nexport function setLogLevel(level) {\n if (level && !isAzureLogLevel(level)) {\n throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(\",\")}`);\n }\n azureLogLevel = level;\n const enabledNamespaces = [];\n for (const logger of registeredLoggers) {\n if (shouldEnable(logger)) {\n enabledNamespaces.push(logger.namespace);\n }\n }\n debug.enable(enabledNamespaces.join(\",\"));\n}\n/**\n * Retrieves the currently specified log level.\n */\nexport function getLogLevel() {\n return azureLogLevel;\n}\nconst levelMap = {\n verbose: 400,\n info: 300,\n warning: 200,\n error: 100,\n};\n/**\n * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`.\n * @param namespace - The name of the SDK package.\n * @hidden\n */\nexport function createClientLogger(namespace) {\n const clientRootLogger = AzureLogger.extend(namespace);\n patchLogMethod(AzureLogger, clientRootLogger);\n return {\n error: createLogger(clientRootLogger, \"error\"),\n warning: createLogger(clientRootLogger, \"warning\"),\n info: createLogger(clientRootLogger, \"info\"),\n verbose: createLogger(clientRootLogger, \"verbose\"),\n };\n}\nfunction patchLogMethod(parent, child) {\n child.log = (...args) => {\n parent.log(...args);\n };\n}\nfunction createLogger(parent, level) {\n const logger = Object.assign(parent.extend(level), {\n level,\n });\n patchLogMethod(parent, logger);\n if (shouldEnable(logger)) {\n const enabledNamespaces = debug.disable();\n debug.enable(enabledNamespaces + \",\" + logger.namespace);\n }\n registeredLoggers.add(logger);\n return logger;\n}\nfunction shouldEnable(logger) {\n return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]);\n}\nfunction isAzureLogLevel(logLevel) {\n return AZURE_LOG_LEVELS.includes(logLevel);\n}\n//# sourceMappingURL=index.js.map","import { VuexModule, Module, MutationAction, getModule, Action, Mutation } from 'vuex-module-decorators'\nimport store from '@/store'\nimport { eFilterType, Filter } from './types'\nimport axios from 'axios'\nimport { Product } from '../../../models/Product'\n\n@Module({ namespaced: true, name: 'filters', store, dynamic: true })\nclass FilterModule extends VuexModule {\n filters: Filter[] = []\n selectedCategoryId: number | undefined = undefined\n selectedSubCategoryId: number | undefined = undefined\n paginationResult: { products: Product[], total: number } = { products: [], total: 0 };\n\n get categories() {\n return this.filters.filter(f => f.type == eFilterType.Category);\n }\n\n get selectedCategory() {\n return this.filters.find(f => f.id == this.selectedCategoryId);\n }\n\n get selectedCategorySubcategories() {\n return this.filters.filter(f => f.parentId == this.selectedCategoryId);\n }\n\n @MutationAction\n async fetchFilters() {\n const response = await axios.get('/api/filters')\n return { filters: response.data }\n }\n\n @Mutation\n saveSelectedCategoryId(categoryName: string) {\n const categoryId = this.filters.find(x => x.friendlyUrl === categoryName)?.id\n if (categoryId != this.selectedCategoryId) {\n this.selectedCategoryId = categoryId;\n //Reset subCategoryId when categoryId is changed\n this.selectedSubCategoryId = undefined;\n }\n }\n\n @Mutation\n saveSelectedSubcategoryId(subCategoryName: string) {\n const subCategoryId = this.filters.find(x => x.friendlyUrl === subCategoryName)?.id;\n if (subCategoryId != this.selectedSubCategoryId) {\n this.selectedSubCategoryId = subCategoryId;\n }\n }\n\n @Action({ commit: 'saveSelectedCategoryId' })\n actionSaveSelectedCategoryId(categoryName: string) {\n return categoryName\n }\n\n @Action({ commit: 'saveSelectedSubcategoryId' })\n actionSaveSelectedSubcategoryId(subCategoryName: string) {\n return subCategoryName\n }\n\n @Mutation\n saveProducts(result: { data: Product[], total: number }) {\n this.paginationResult.products = [];\n this.paginationResult.products = result.data;\n this.paginationResult.total = result.total;\n }\n}\n\nexport default getModule(FilterModule);","/**\r\n * Takes the properties on object from parameter source and adds them to the object\r\n * parameter target\r\n * @param {object} target Object to have properties copied onto from y\r\n * @param {object} source Object with properties to be copied to x\r\n */\r\nfunction addPropertiesToObject(target, source) {\r\n var _loop_1 = function (k) {\r\n Object.defineProperty(target, k, {\r\n get: function () { return source[k]; }\r\n });\r\n };\r\n for (var _i = 0, _a = Object.keys(source || {}); _i < _a.length; _i++) {\r\n var k = _a[_i];\r\n _loop_1(k);\r\n }\r\n}\r\n/**\r\n * Returns a namespaced name of the module to be used as a store getter\r\n * @param module\r\n */\r\nfunction getModuleName(module) {\r\n if (!module._vmdModuleName) {\r\n throw new Error(\"ERR_GET_MODULE_NAME : Could not get module accessor.\\n Make sure your module has name, we can't make accessors for unnamed modules\\n i.e. @Module({ name: 'something' })\");\r\n }\r\n return \"vuexModuleDecorators/\".concat(module._vmdModuleName);\r\n}\n\nvar VuexModule = /** @class */ (function () {\r\n function VuexModule(module) {\r\n this.actions = module.actions;\r\n this.mutations = module.mutations;\r\n this.state = module.state;\r\n this.getters = module.getters;\r\n this.namespaced = module.namespaced;\r\n this.modules = module.modules;\r\n }\r\n return VuexModule;\r\n}());\r\nfunction getModule(moduleClass, store) {\r\n var moduleName = getModuleName(moduleClass);\r\n if (store && store.getters[moduleName]) {\r\n return store.getters[moduleName];\r\n }\r\n else if (moduleClass._statics) {\r\n return moduleClass._statics;\r\n }\r\n var genStatic = moduleClass._genStatic;\r\n if (!genStatic) {\r\n throw new Error(\"ERR_GET_MODULE_NO_STATICS : Could not get module accessor.\\n Make sure your module has name, we can't make accessors for unnamed modules\\n i.e. @Module({ name: 'something' })\");\r\n }\r\n var storeModule = genStatic(store);\r\n if (store) {\r\n store.getters[moduleName] = storeModule;\r\n }\r\n else {\r\n moduleClass._statics = storeModule;\r\n }\r\n return storeModule;\r\n}\n\nvar reservedKeys = ['actions', 'getters', 'mutations', 'modules', 'state', 'namespaced', 'commit'];\r\nfunction stateFactory(module) {\r\n var state = new module.prototype.constructor({});\r\n var s = {};\r\n Object.keys(state).forEach(function (key) {\r\n if (reservedKeys.indexOf(key) !== -1) {\r\n if (typeof state[key] !== 'undefined') {\r\n throw new Error(\"ERR_RESERVED_STATE_KEY_USED: You cannot use the following\\n ['actions', 'getters', 'mutations', 'modules', 'state', 'namespaced', 'commit']\\n as fields in your module. These are reserved as they have special purpose in Vuex\");\r\n }\r\n return;\r\n }\r\n if (state.hasOwnProperty(key)) {\r\n if (typeof state[key] !== 'function') {\r\n s[key] = state[key];\r\n }\r\n }\r\n });\r\n return s;\r\n}\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nfunction __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\n\nfunction staticStateGenerator(module, modOpt, statics) {\r\n var state = modOpt.stateFactory ? module.state() : module.state;\r\n Object.keys(state).forEach(function (key) {\r\n if (state.hasOwnProperty(key)) {\r\n // If not undefined or function means it is a state value\r\n if (['undefined', 'function'].indexOf(typeof state[key]) === -1) {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n var path = modOpt.name.split('/');\r\n var data = statics.store.state;\r\n for (var _i = 0, path_1 = path; _i < path_1.length; _i++) {\r\n var segment = path_1[_i];\r\n data = data[segment];\r\n }\r\n return data[key];\r\n }\r\n });\r\n }\r\n }\r\n });\r\n}\r\nfunction staticGetterGenerator(module, modOpt, statics) {\r\n Object.keys(module.getters).forEach(function (key) {\r\n if (module.namespaced) {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return statics.store.getters[\"\".concat(modOpt.name, \"/\").concat(key)];\r\n }\r\n });\r\n }\r\n else {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return statics.store.getters[key];\r\n }\r\n });\r\n }\r\n });\r\n}\r\nfunction staticMutationGenerator(module, modOpt, statics) {\r\n Object.keys(module.mutations).forEach(function (key) {\r\n if (module.namespaced) {\r\n statics[key] = function () {\r\n var _a;\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n (_a = statics.store).commit.apply(_a, __spreadArray([\"\".concat(modOpt.name, \"/\").concat(key)], args, false));\r\n };\r\n }\r\n else {\r\n statics[key] = function () {\r\n var _a;\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n (_a = statics.store).commit.apply(_a, __spreadArray([key], args, false));\r\n };\r\n }\r\n });\r\n}\r\nfunction staticActionGenerators(module, modOpt, statics) {\r\n Object.keys(module.actions).forEach(function (key) {\r\n if (module.namespaced) {\r\n statics[key] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _a;\r\n return __generator(this, function (_b) {\r\n return [2 /*return*/, (_a = statics.store).dispatch.apply(_a, __spreadArray([\"\".concat(modOpt.name, \"/\").concat(key)], args, false))];\r\n });\r\n });\r\n };\r\n }\r\n else {\r\n statics[key] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _a;\r\n return __generator(this, function (_b) {\r\n return [2 /*return*/, (_a = statics.store).dispatch.apply(_a, __spreadArray([key], args, false))];\r\n });\r\n });\r\n };\r\n }\r\n });\r\n}\n\nfunction registerDynamicModule(module, modOpt) {\r\n if (!modOpt.name) {\r\n throw new Error('Name of module not provided in decorator options');\r\n }\r\n if (!modOpt.store) {\r\n throw new Error('Store not provided in decorator options when using dynamic option');\r\n }\r\n modOpt.store.registerModule(modOpt.name, // TODO: Handle nested modules too in future\r\n module, { preserveState: modOpt.preserveState || false });\r\n}\r\nfunction addGettersToModule(targetModule, srcModule) {\r\n Object.getOwnPropertyNames(srcModule.prototype).forEach(function (funcName) {\r\n var descriptor = Object.getOwnPropertyDescriptor(srcModule.prototype, funcName);\r\n if (descriptor.get && targetModule.getters) {\r\n targetModule.getters[funcName] = function (state, getters, rootState, rootGetters) {\r\n var thisObj = { context: { state: state, getters: getters, rootState: rootState, rootGetters: rootGetters } };\r\n addPropertiesToObject(thisObj, state);\r\n addPropertiesToObject(thisObj, getters);\r\n var got = descriptor.get.call(thisObj);\r\n return got;\r\n };\r\n }\r\n });\r\n}\r\nfunction moduleDecoratorFactory(moduleOptions) {\r\n return function (constructor) {\r\n var module = constructor;\r\n var stateFactory$1 = function () { return stateFactory(module); };\r\n if (!module.state) {\r\n module.state = moduleOptions && moduleOptions.stateFactory ? stateFactory$1 : stateFactory$1();\r\n }\r\n if (!module.getters) {\r\n module.getters = {};\r\n }\r\n if (!module.namespaced) {\r\n module.namespaced = moduleOptions && moduleOptions.namespaced;\r\n }\r\n var parentModule = Object.getPrototypeOf(module);\r\n while (parentModule.name !== 'VuexModule' && parentModule.name !== '') {\r\n addGettersToModule(module, parentModule);\r\n parentModule = Object.getPrototypeOf(parentModule);\r\n }\r\n addGettersToModule(module, module);\r\n var modOpt = moduleOptions;\r\n if (modOpt.name) {\r\n Object.defineProperty(constructor, '_genStatic', {\r\n value: function (store) {\r\n var statics = { store: store || modOpt.store };\r\n if (!statics.store) {\r\n throw new Error(\"ERR_STORE_NOT_PROVIDED: To use getModule(), either the module\\n should be decorated with store in decorator, i.e. @Module({store: store}) or\\n store should be passed when calling getModule(), i.e. getModule(MyModule, this.$store)\");\r\n }\r\n // =========== For statics ==============\r\n // ------ state -------\r\n staticStateGenerator(module, modOpt, statics);\r\n // ------- getters -------\r\n if (module.getters) {\r\n staticGetterGenerator(module, modOpt, statics);\r\n }\r\n // -------- mutations --------\r\n if (module.mutations) {\r\n staticMutationGenerator(module, modOpt, statics);\r\n }\r\n // -------- actions ---------\r\n if (module.actions) {\r\n staticActionGenerators(module, modOpt, statics);\r\n }\r\n return statics;\r\n }\r\n });\r\n Object.defineProperty(constructor, '_vmdModuleName', {\r\n value: modOpt.name\r\n });\r\n }\r\n if (modOpt.dynamic) {\r\n registerDynamicModule(module, modOpt);\r\n }\r\n return constructor;\r\n };\r\n}\r\nfunction Module(modOrOpt) {\r\n if (typeof modOrOpt === 'function') {\r\n /*\r\n * @Module decorator called without options (directly on the class definition)\r\n */\r\n moduleDecoratorFactory({})(modOrOpt);\r\n }\r\n else {\r\n /*\r\n * @Module({...}) decorator called with options\r\n */\r\n return moduleDecoratorFactory(modOrOpt);\r\n }\r\n}\n\nvar config = {};\n\nfunction actionDecoratorFactory(params) {\r\n var _a = params || {}, _b = _a.commit, commit = _b === void 0 ? undefined : _b, _c = _a.rawError, rawError = _c === void 0 ? !!config.rawError : _c, _d = _a.root, root = _d === void 0 ? false : _d;\r\n return function (target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.hasOwnProperty('actions')) {\r\n module.actions = Object.assign({}, module.actions);\r\n }\r\n var actionFunction = descriptor.value;\r\n var action = function (context, payload) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var actionPayload, moduleName, moduleAccessor, thisObj, e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, 5, , 6]);\r\n actionPayload = null;\r\n if (!module._genStatic) return [3 /*break*/, 2];\r\n moduleName = getModuleName(module);\r\n moduleAccessor = context.rootGetters[moduleName]\r\n ? context.rootGetters[moduleName]\r\n : getModule(module);\r\n moduleAccessor.context = context;\r\n return [4 /*yield*/, actionFunction.call(moduleAccessor, payload)];\r\n case 1:\r\n actionPayload = _a.sent();\r\n return [3 /*break*/, 4];\r\n case 2:\r\n thisObj = { context: context };\r\n addPropertiesToObject(thisObj, context.state);\r\n addPropertiesToObject(thisObj, context.getters);\r\n return [4 /*yield*/, actionFunction.call(thisObj, payload)];\r\n case 3:\r\n actionPayload = _a.sent();\r\n _a.label = 4;\r\n case 4:\r\n if (commit) {\r\n context.commit(commit, actionPayload);\r\n }\r\n return [2 /*return*/, actionPayload];\r\n case 5:\r\n e_1 = _a.sent();\r\n throw rawError\r\n ? e_1\r\n : new Error('ERR_ACTION_ACCESS_UNDEFINED: Are you trying to access ' +\r\n 'this.someMutation() or this.someGetter inside an @Action? \\n' +\r\n 'That works only in dynamic modules. \\n' +\r\n 'If not dynamic use this.context.commit(\"mutationName\", payload) ' +\r\n 'and this.context.getters[\"getterName\"]' +\r\n '\\n' +\r\n new Error(\"Could not perform action \".concat(key.toString())).stack +\r\n '\\n' +\r\n e_1.stack);\r\n case 6: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n module.actions[key] = root ? { root: root, handler: action } : action;\r\n };\r\n}\r\n/**\r\n * The @Action decorator turns an async function into an Vuex action\r\n *\r\n * @param targetOrParams the module class\r\n * @param key name of the action\r\n * @param descriptor the action function descriptor\r\n * @constructor\r\n */\r\nfunction Action(targetOrParams, key, descriptor) {\r\n if (!key && !descriptor) {\r\n /*\r\n * This is the case when `targetOrParams` is params.\r\n * i.e. when used as -\r\n *
\r\n            @Action({commit: 'incrCount'})\r\n            async getCountDelta() {\r\n              return 5\r\n            }\r\n         * 
\r\n */\r\n return actionDecoratorFactory(targetOrParams);\r\n }\r\n else {\r\n /*\r\n * This is the case when @Action is called on action function\r\n * without any params\r\n *
\r\n         *   @Action\r\n         *   async doSomething() {\r\n         *    ...\r\n         *   }\r\n         * 
\r\n */\r\n actionDecoratorFactory()(targetOrParams, key, descriptor);\r\n }\r\n}\n\nfunction Mutation(target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.hasOwnProperty('mutations')) {\r\n module.mutations = Object.assign({}, module.mutations);\r\n }\r\n var mutationFunction = descriptor.value;\r\n var mutation = function (state, payload) {\r\n mutationFunction.call(state, payload);\r\n };\r\n module.mutations[key] = mutation;\r\n}\n\nfunction mutationActionDecoratorFactory(params) {\r\n return function (target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.hasOwnProperty('mutations')) {\r\n module.mutations = Object.assign({}, module.mutations);\r\n }\r\n if (!module.hasOwnProperty('actions')) {\r\n module.actions = Object.assign({}, module.actions);\r\n }\r\n var mutactFunction = descriptor.value;\r\n var action = function (context, payload) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var thisObj, actionPayload, e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, 2, , 3]);\r\n thisObj = { context: context };\r\n addPropertiesToObject(thisObj, context.state);\r\n addPropertiesToObject(thisObj, context.getters);\r\n return [4 /*yield*/, mutactFunction.call(thisObj, payload)];\r\n case 1:\r\n actionPayload = _a.sent();\r\n if (actionPayload === undefined)\r\n return [2 /*return*/];\r\n context.commit(key, actionPayload);\r\n return [3 /*break*/, 3];\r\n case 2:\r\n e_1 = _a.sent();\r\n if (params.rawError) {\r\n throw e_1;\r\n }\r\n else {\r\n console.error('Could not perform action ' + key.toString());\r\n console.error(e_1);\r\n return [2 /*return*/, Promise.reject(e_1)];\r\n }\r\n case 3: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n var mutation = function (state, payload) {\r\n if (!params.mutate) {\r\n params.mutate = Object.keys(payload);\r\n }\r\n for (var _i = 0, _a = params.mutate; _i < _a.length; _i++) {\r\n var stateItem = _a[_i];\r\n if (state.hasOwnProperty(stateItem) && payload.hasOwnProperty(stateItem)) {\r\n state[stateItem] = payload[stateItem];\r\n }\r\n else {\r\n throw new Error(\"ERR_MUTATE_PARAMS_NOT_IN_PAYLOAD\\n In @MutationAction, mutate: ['a', 'b', ...] array keys must\\n match with return type = {a: {}, b: {}, ...} and must\\n also be in state.\");\r\n }\r\n }\r\n };\r\n module.actions[key] = params.root ? { root: true, handler: action } : action;\r\n module.mutations[key] = mutation;\r\n };\r\n}\r\n/**\r\n * The @MutationAction decorator turns this into an action that further calls a mutation\r\n * Both the action and the mutation are generated for you\r\n *\r\n * @param paramsOrTarget the params or the target class\r\n * @param key the name of the function\r\n * @param descriptor the function body\r\n * @constructor\r\n */\r\nfunction MutationAction(paramsOrTarget, key, descriptor) {\r\n if (!key && !descriptor) {\r\n /*\r\n * This is the case when `paramsOrTarget` is params.\r\n * i.e. when used as -\r\n *
\r\n            @MutationAction({mutate: ['incrCount']})\r\n            async getCountDelta() {\r\n              return {incrCount: 5}\r\n            }\r\n         * 
\r\n */\r\n return mutationActionDecoratorFactory(paramsOrTarget);\r\n }\r\n else {\r\n /*\r\n * This is the case when `paramsOrTarget` is target.\r\n * i.e. when used as -\r\n *
\r\n            @MutationAction\r\n            async getCountDelta() {\r\n              return {incrCount: 5}\r\n            }\r\n         * 
\r\n */\r\n mutationActionDecoratorFactory({})(paramsOrTarget, key, descriptor);\r\n }\r\n}\n\nexport { Action, Module, Mutation, MutationAction, VuexModule, config, getModule };\n//# sourceMappingURL=index.js.map\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { log } from \"./log.js\";\nconst debugEnvVariable = (typeof process !== \"undefined\" && process.env && process.env.DEBUG) || undefined;\nlet enabledString;\nlet enabledNamespaces = [];\nlet skippedNamespaces = [];\nconst debuggers = [];\nif (debugEnvVariable) {\n enable(debugEnvVariable);\n}\nconst debugObj = Object.assign((namespace) => {\n return createDebugger(namespace);\n}, {\n enable,\n enabled,\n disable,\n log,\n});\nfunction enable(namespaces) {\n enabledString = namespaces;\n enabledNamespaces = [];\n skippedNamespaces = [];\n const wildcard = /\\*/g;\n const namespaceList = namespaces.split(\",\").map((ns) => ns.trim().replace(wildcard, \".*?\"));\n for (const ns of namespaceList) {\n if (ns.startsWith(\"-\")) {\n skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`));\n }\n else {\n enabledNamespaces.push(new RegExp(`^${ns}$`));\n }\n }\n for (const instance of debuggers) {\n instance.enabled = enabled(instance.namespace);\n }\n}\nfunction enabled(namespace) {\n if (namespace.endsWith(\"*\")) {\n return true;\n }\n for (const skipped of skippedNamespaces) {\n if (skipped.test(namespace)) {\n return false;\n }\n }\n for (const enabledNamespace of enabledNamespaces) {\n if (enabledNamespace.test(namespace)) {\n return true;\n }\n }\n return false;\n}\nfunction disable() {\n const result = enabledString || \"\";\n enable(\"\");\n return result;\n}\nfunction createDebugger(namespace) {\n const newDebugger = Object.assign(debug, {\n enabled: enabled(namespace),\n destroy,\n log: debugObj.log,\n namespace,\n extend,\n });\n function debug(...args) {\n if (!newDebugger.enabled) {\n return;\n }\n if (args.length > 0) {\n args[0] = `${namespace} ${args[0]}`;\n }\n newDebugger.log(...args);\n }\n debuggers.push(newDebugger);\n return newDebugger;\n}\nfunction destroy() {\n const index = debuggers.indexOf(this);\n if (index >= 0) {\n debuggers.splice(index, 1);\n return true;\n }\n return false;\n}\nfunction extend(namespace) {\n const newDebugger = createDebugger(`${this.namespace}:${namespace}`);\n newDebugger.log = this.log;\n return newDebugger;\n}\nexport default debugObj;\n//# sourceMappingURL=debug.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport function log(...args) {\n if (args.length > 0) {\n const firstArg = String(args[0]);\n if (firstArg.includes(\":error\")) {\n console.error(...args);\n }\n else if (firstArg.includes(\":warning\")) {\n console.warn(...args);\n }\n else if (firstArg.includes(\":info\")) {\n console.info(...args);\n }\n else if (firstArg.includes(\":verbose\")) {\n console.debug(...args);\n }\n else {\n console.debug(...args);\n }\n }\n}\n//# sourceMappingURL=log.common.js.map","import filter from \"@/store/modules/filter\";\nimport { eFilterType, Filter } from \"@/store/modules/filter/types\";\nimport { Vue, Component } from \"vue-property-decorator\";\nimport { RawLocation } from \"vue-router\";\n\ninterface LeftNav extends Filter {\n route?: { name: string, params?: any },\n}\n\n@Component\nexport class FilterMixin extends Vue {\n get leftNavigations() {\n return filter.filters.map(c => {\n switch (c.type) {\n case eFilterType.Category:\n return { ...c, route: { name: 'Category', params: { categorySlug: c.friendlyUrl } } }\n\n case eFilterType.Subcategory: {\n const parentCat = filter.filters.find(f => f.id == c.parentId);\n if (parentCat)\n return { ...c, route: { name: 'SubCategory', params: { categorySlug: parentCat.friendlyUrl, subCategorySlug: c.friendlyUrl } } };\n return undefined;\n }\n\n default:\n break;\n }\n })\n }\n\n get selectedCategory() {\n return filter.selectedCategory;\n }\n\n onFilterSelected(filterId: number) {\n const selectedFilter = this.leftNavigations.find(f => f?.id == filterId);\n if (selectedFilter)\n this.$router.push(selectedFilter.route as RawLocation);\n }\n\n fuzzyQuerySearch(str: any): any {\n\n if (str.indexOf(\"-\") > -1) {\n return '\"' + this.escapingCharacters(str) + '\"';\n }\n else return this.escapingCharacters(str.replace(\" \", \"~ \") + \"~\");\n }\n\n escapingCharacters(str: any): any {\n return [].map.call(str, function escapeSpecialCharacter(char) {\n if (char === '+'\n || char === '&'\n || char === '|'\n || char === '!'\n || char === '('\n || char === ')'\n || char === '{'\n || char === '}'\n || char === '['\n || char === ']'\n || char === '^'\n || char === '\"'\n || char === '*'\n || char === '?'\n || char === ':'\n || char === '\\\\'\n || char === '/'\n ) return '\\\\' + char\n else return char\n }).join('')\n }\n\n}","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nconst ValidPhaseNames = new Set([\"Deserialize\", \"Serialize\", \"Retry\", \"Sign\"]);\n/**\n * A private implementation of Pipeline.\n * Do not export this class from the package.\n * @internal\n */\nclass HttpPipeline {\n constructor(policies) {\n var _a;\n this._policies = [];\n this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : [];\n this._orderedPolicies = undefined;\n }\n addPolicy(policy, options = {}) {\n if (options.phase && options.afterPhase) {\n throw new Error(\"Policies inside a phase cannot specify afterPhase.\");\n }\n if (options.phase && !ValidPhaseNames.has(options.phase)) {\n throw new Error(`Invalid phase name: ${options.phase}`);\n }\n if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) {\n throw new Error(`Invalid afterPhase name: ${options.afterPhase}`);\n }\n this._policies.push({\n policy,\n options,\n });\n this._orderedPolicies = undefined;\n }\n removePolicy(options) {\n const removedPolicies = [];\n this._policies = this._policies.filter((policyDescriptor) => {\n if ((options.name && policyDescriptor.policy.name === options.name) ||\n (options.phase && policyDescriptor.options.phase === options.phase)) {\n removedPolicies.push(policyDescriptor.policy);\n return false;\n }\n else {\n return true;\n }\n });\n this._orderedPolicies = undefined;\n return removedPolicies;\n }\n sendRequest(httpClient, request) {\n const policies = this.getOrderedPolicies();\n const pipeline = policies.reduceRight((next, policy) => {\n return (req) => {\n return policy.sendRequest(req, next);\n };\n }, (req) => httpClient.sendRequest(req));\n return pipeline(request);\n }\n getOrderedPolicies() {\n if (!this._orderedPolicies) {\n this._orderedPolicies = this.orderPolicies();\n }\n return this._orderedPolicies;\n }\n clone() {\n return new HttpPipeline(this._policies);\n }\n static create() {\n return new HttpPipeline();\n }\n orderPolicies() {\n /**\n * The goal of this method is to reliably order pipeline policies\n * based on their declared requirements when they were added.\n *\n * Order is first determined by phase:\n *\n * 1. Serialize Phase\n * 2. Policies not in a phase\n * 3. Deserialize Phase\n * 4. Retry Phase\n * 5. Sign Phase\n *\n * Within each phase, policies are executed in the order\n * they were added unless they were specified to execute\n * before/after other policies or after a particular phase.\n *\n * To determine the final order, we will walk the policy list\n * in phase order multiple times until all dependencies are\n * satisfied.\n *\n * `afterPolicies` are the set of policies that must be\n * executed before a given policy. This requirement is\n * considered satisfied when each of the listed policies\n * have been scheduled.\n *\n * `beforePolicies` are the set of policies that must be\n * executed after a given policy. Since this dependency\n * can be expressed by converting it into a equivalent\n * `afterPolicies` declarations, they are normalized\n * into that form for simplicity.\n *\n * An `afterPhase` dependency is considered satisfied when all\n * policies in that phase have scheduled.\n *\n */\n const result = [];\n // Track all policies we know about.\n const policyMap = new Map();\n function createPhase(name) {\n return {\n name,\n policies: new Set(),\n hasRun: false,\n hasAfterPolicies: false,\n };\n }\n // Track policies for each phase.\n const serializePhase = createPhase(\"Serialize\");\n const noPhase = createPhase(\"None\");\n const deserializePhase = createPhase(\"Deserialize\");\n const retryPhase = createPhase(\"Retry\");\n const signPhase = createPhase(\"Sign\");\n // a list of phases in order\n const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase];\n // Small helper function to map phase name to each Phase\n function getPhase(phase) {\n if (phase === \"Retry\") {\n return retryPhase;\n }\n else if (phase === \"Serialize\") {\n return serializePhase;\n }\n else if (phase === \"Deserialize\") {\n return deserializePhase;\n }\n else if (phase === \"Sign\") {\n return signPhase;\n }\n else {\n return noPhase;\n }\n }\n // First walk each policy and create a node to track metadata.\n for (const descriptor of this._policies) {\n const policy = descriptor.policy;\n const options = descriptor.options;\n const policyName = policy.name;\n if (policyMap.has(policyName)) {\n throw new Error(\"Duplicate policy names not allowed in pipeline\");\n }\n const node = {\n policy,\n dependsOn: new Set(),\n dependants: new Set(),\n };\n if (options.afterPhase) {\n node.afterPhase = getPhase(options.afterPhase);\n node.afterPhase.hasAfterPolicies = true;\n }\n policyMap.set(policyName, node);\n const phase = getPhase(options.phase);\n phase.policies.add(node);\n }\n // Now that each policy has a node, connect dependency references.\n for (const descriptor of this._policies) {\n const { policy, options } = descriptor;\n const policyName = policy.name;\n const node = policyMap.get(policyName);\n if (!node) {\n throw new Error(`Missing node for policy ${policyName}`);\n }\n if (options.afterPolicies) {\n for (const afterPolicyName of options.afterPolicies) {\n const afterNode = policyMap.get(afterPolicyName);\n if (afterNode) {\n // Linking in both directions helps later\n // when we want to notify dependants.\n node.dependsOn.add(afterNode);\n afterNode.dependants.add(node);\n }\n }\n }\n if (options.beforePolicies) {\n for (const beforePolicyName of options.beforePolicies) {\n const beforeNode = policyMap.get(beforePolicyName);\n if (beforeNode) {\n // To execute before another node, make it\n // depend on the current node.\n beforeNode.dependsOn.add(node);\n node.dependants.add(beforeNode);\n }\n }\n }\n }\n function walkPhase(phase) {\n phase.hasRun = true;\n // Sets iterate in insertion order\n for (const node of phase.policies) {\n if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) {\n // If this node is waiting on a phase to complete,\n // we need to skip it for now.\n // Even if the phase is empty, we should wait for it\n // to be walked to avoid re-ordering policies.\n continue;\n }\n if (node.dependsOn.size === 0) {\n // If there's nothing else we're waiting for, we can\n // add this policy to the result list.\n result.push(node.policy);\n // Notify anything that depends on this policy that\n // the policy has been scheduled.\n for (const dependant of node.dependants) {\n dependant.dependsOn.delete(node);\n }\n policyMap.delete(node.policy.name);\n phase.policies.delete(node);\n }\n }\n }\n function walkPhases() {\n for (const phase of orderedPhases) {\n walkPhase(phase);\n // if the phase isn't complete\n if (phase.policies.size > 0 && phase !== noPhase) {\n if (!noPhase.hasRun) {\n // Try running noPhase to see if that unblocks this phase next tick.\n // This can happen if a phase that happens before noPhase\n // is waiting on a noPhase policy to complete.\n walkPhase(noPhase);\n }\n // Don't proceed to the next phase until this phase finishes.\n return;\n }\n if (phase.hasAfterPolicies) {\n // Run any policies unblocked by this phase\n walkPhase(noPhase);\n }\n }\n }\n // Iterate until we've put every node in the result list.\n let iteration = 0;\n while (policyMap.size > 0) {\n iteration++;\n const initialResultLength = result.length;\n // Keep walking each phase in order until we can order every node.\n walkPhases();\n // The result list *should* get at least one larger each time\n // after the first full pass.\n // Otherwise, we're going to loop forever.\n if (result.length <= initialResultLength && iteration > 1) {\n throw new Error(\"Cannot satisfy policy dependencies due to requirements cycle.\");\n }\n }\n return result;\n }\n}\n/**\n * Creates a totally empty pipeline.\n * Useful for testing or creating a custom one.\n */\nexport function createEmptyPipeline() {\n return HttpPipeline.create();\n}\n//# sourceMappingURL=pipeline.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"core-rest-pipeline\");\n//# sourceMappingURL=log.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * This error is thrown when an asynchronous operation has been aborted.\n * Check for this error by testing the `name` that the name property of the\n * error matches `\"AbortError\"`.\n *\n * @example\n * ```ts\n * const controller = new AbortController();\n * controller.abort();\n * try {\n * doAsyncWork(controller.signal)\n * } catch (e) {\n * if (e.name === 'AbortError') {\n * // handle abort error here.\n * }\n * }\n * ```\n */\nexport class AbortError extends Error {\n constructor(message) {\n super(message);\n this.name = \"AbortError\";\n }\n}\n//# sourceMappingURL=AbortError.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * Returns a random integer value between a lower and upper bound,\n * inclusive of both bounds.\n * Note that this uses Math.random and isn't secure. If you need to use\n * this for any kind of security purpose, find a better source of random.\n * @param min - The smallest integer value allowed.\n * @param max - The largest integer value allowed.\n */\nexport function getRandomIntegerInclusive(min, max) {\n // Make sure inputs are integers.\n min = Math.ceil(min);\n max = Math.floor(max);\n // Pick a random offset from zero to the size of the range.\n // Since Math.random() can never return 1, we have to make the range one larger\n // in order to be inclusive of the maximum value after we take the floor.\n const offset = Math.floor(Math.random() * (max - min + 1));\n return offset + min;\n}\n//# sourceMappingURL=random.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createAbortablePromise } from \"./createAbortablePromise.js\";\nimport { getRandomIntegerInclusive } from \"./random.js\";\nconst StandardAbortMessage = \"The delay was aborted.\";\n/**\n * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds.\n * @param timeInMs - The number of milliseconds to be delayed.\n * @param options - The options for delay - currently abort options\n * @returns Promise that is resolved after timeInMs\n */\nexport function delay(timeInMs, options) {\n let token;\n const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {};\n return createAbortablePromise((resolve) => {\n token = setTimeout(resolve, timeInMs);\n }, {\n cleanupBeforeAbort: () => clearTimeout(token),\n abortSignal,\n abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage,\n });\n}\n/**\n * Calculates the delay interval for retry attempts using exponential delay with jitter.\n * @param retryAttempt - The current retry attempt number.\n * @param config - The exponential retry configuration.\n * @returns An object containing the calculated retry delay.\n */\nexport function calculateRetryDelay(retryAttempt, config) {\n // Exponentially increase the delay each time\n const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt);\n // Don't let the delay exceed the maximum\n const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay);\n // Allow the final value to have some \"jitter\" (within 50% of the delay size) so\n // that retries across multiple clients don't occur simultaneously.\n const retryAfterInMs = clampedDelay / 2 + getRandomIntegerInclusive(0, clampedDelay / 2);\n return { retryAfterInMs };\n}\n//# sourceMappingURL=delay.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * Helper to determine when an input is a generic JS object.\n * @returns true when input is an object type that is not null, Array, RegExp, or Date.\n */\nexport function isObject(input) {\n return (typeof input === \"object\" &&\n input !== null &&\n !Array.isArray(input) &&\n !(input instanceof RegExp) &&\n !(input instanceof Date));\n}\n//# sourceMappingURL=object.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { isObject } from \"./object.js\";\n/**\n * Typeguard for an error object shape (has name and message)\n * @param e - Something caught by a catch clause.\n */\nexport function isError(e) {\n if (isObject(e)) {\n const hasName = typeof e.name === \"string\";\n const hasMessage = typeof e.message === \"string\";\n return hasName && hasMessage;\n }\n return false;\n}\n/**\n * Given what is thought to be an error object, return the message if possible.\n * If the message is missing, returns a stringified version of the input.\n * @param e - Something thrown from a try block\n * @returns The error message or a string of the input\n */\nexport function getErrorMessage(e) {\n if (isError(e)) {\n return e.message;\n }\n else {\n let stringified;\n try {\n if (typeof e === \"object\" && e) {\n stringified = JSON.stringify(e);\n }\n else {\n stringified = String(e);\n }\n }\n catch (err) {\n stringified = \"[unable to stringify input]\";\n }\n return `Unknown error ${stringified}`;\n }\n}\n//# sourceMappingURL=error.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * The helper that transforms bytes with specific character encoding into string\n * @param bytes - the uint8array bytes\n * @param format - the format we use to encode the byte\n * @returns a string of the encoded string\n */\nexport function uint8ArrayToString(bytes, format) {\n switch (format) {\n case \"utf-8\":\n return uint8ArrayToUtf8String(bytes);\n case \"base64\":\n return uint8ArrayToBase64(bytes);\n case \"base64url\":\n return uint8ArrayToBase64Url(bytes);\n case \"hex\":\n return uint8ArrayToHexString(bytes);\n }\n}\n/**\n * The helper that transforms string to specific character encoded bytes array.\n * @param value - the string to be converted\n * @param format - the format we use to decode the value\n * @returns a uint8array\n */\nexport function stringToUint8Array(value, format) {\n switch (format) {\n case \"utf-8\":\n return utf8StringToUint8Array(value);\n case \"base64\":\n return base64ToUint8Array(value);\n case \"base64url\":\n return base64UrlToUint8Array(value);\n case \"hex\":\n return hexStringToUint8Array(value);\n }\n}\n/**\n * Decodes a Uint8Array into a Base64 string.\n * @internal\n */\nexport function uint8ArrayToBase64(bytes) {\n return btoa([...bytes].map((x) => String.fromCharCode(x)).join(\"\"));\n}\n/**\n * Decodes a Uint8Array into a Base64Url string.\n * @internal\n */\nexport function uint8ArrayToBase64Url(bytes) {\n return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\n/**\n * Decodes a Uint8Array into a javascript string.\n * @internal\n */\nexport function uint8ArrayToUtf8String(bytes) {\n const decoder = new TextDecoder();\n const dataString = decoder.decode(bytes);\n return dataString;\n}\n/**\n * Decodes a Uint8Array into a hex string\n * @internal\n */\nexport function uint8ArrayToHexString(bytes) {\n return [...bytes].map((x) => x.toString(16).padStart(2, \"0\")).join(\"\");\n}\n/**\n * Encodes a JavaScript string into a Uint8Array.\n * @internal\n */\nexport function utf8StringToUint8Array(value) {\n return new TextEncoder().encode(value);\n}\n/**\n * Encodes a Base64 string into a Uint8Array.\n * @internal\n */\nexport function base64ToUint8Array(value) {\n return new Uint8Array([...atob(value)].map((x) => x.charCodeAt(0)));\n}\n/**\n * Encodes a Base64Url string into a Uint8Array.\n * @internal\n */\nexport function base64UrlToUint8Array(value) {\n const base64String = value.replace(/-/g, \"+\").replace(/_/g, \"/\");\n return base64ToUint8Array(base64String);\n}\nconst hexDigits = new Set(\"0123456789abcdefABCDEF\");\n/**\n * Encodes a hex string into a Uint8Array\n * @internal\n */\nexport function hexStringToUint8Array(value) {\n // If value has odd length, the last character will be ignored, consistent with NodeJS Buffer behavior\n const bytes = new Uint8Array(value.length / 2);\n for (let i = 0; i < value.length / 2; ++i) {\n const highNibble = value[2 * i];\n const lowNibble = value[2 * i + 1];\n if (!hexDigits.has(highNibble) || !hexDigits.has(lowNibble)) {\n // Replicate Node Buffer behavior by exiting early when we encounter an invalid byte\n return bytes.slice(0, i);\n }\n bytes[i] = parseInt(`${highNibble}${lowNibble}`, 16);\n }\n return bytes;\n}\n//# sourceMappingURL=bytesEncoding.common.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function generateUUID() {\n let uuid = \"\";\n for (let i = 0; i < 32; i++) {\n // Generate a random number between 0 and 15\n const randomNumber = Math.floor(Math.random() * 16);\n // Set the UUID version to 4 in the 13th position\n if (i === 12) {\n uuid += \"4\";\n }\n else if (i === 16) {\n // Set the UUID variant to \"10\" in the 17th position\n uuid += (randomNumber & 0x3) | 0x8;\n }\n else {\n // Add a random hexadecimal digit to the UUID string\n uuid += randomNumber.toString(16);\n }\n // Add hyphens to the UUID string at the appropriate positions\n if (i === 7 || i === 11 || i === 15 || i === 19) {\n uuid += \"-\";\n }\n }\n return uuid;\n}\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function randomUUID() {\n return generateUUID();\n}\n//# sourceMappingURL=uuidUtils.common.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nvar _a;\nimport { generateUUID } from \"./uuidUtils.common.js\";\n// NOTE: This could be undefined if not used in a secure context\nconst uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === \"function\"\n ? globalThis.crypto.randomUUID.bind(globalThis.crypto)\n : generateUUID;\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function randomUUID() {\n return uuidFunction();\n}\n//# sourceMappingURL=uuidUtils-browser.mjs.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nvar _a, _b, _c, _d;\n/**\n * A constant that indicates whether the environment the code is running is a Web Browser.\n */\n// eslint-disable-next-line @azure/azure-sdk/ts-no-window\nexport const isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\";\n/**\n * A constant that indicates whether the environment the code is running is a Web Worker.\n */\nexport const isWebWorker = typeof self === \"object\" &&\n typeof (self === null || self === void 0 ? void 0 : self.importScripts) === \"function\" &&\n (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === \"DedicatedWorkerGlobalScope\" ||\n ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === \"ServiceWorkerGlobalScope\" ||\n ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === \"SharedWorkerGlobalScope\");\n/**\n * A constant that indicates whether the environment the code is running is Deno.\n */\nexport const isDeno = typeof Deno !== \"undefined\" &&\n typeof Deno.version !== \"undefined\" &&\n typeof Deno.version.deno !== \"undefined\";\n/**\n * A constant that indicates whether the environment the code is running is Bun.sh.\n */\nexport const isBun = typeof Bun !== \"undefined\" && typeof Bun.version !== \"undefined\";\n/**\n * A constant that indicates whether the environment the code is running is a Node.js compatible environment.\n */\nexport const isNodeLike = typeof globalThis.process !== \"undefined\" &&\n Boolean(globalThis.process.version) &&\n Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node);\n/**\n * A constant that indicates whether the environment the code is running is a Node.js compatible environment.\n * @deprecated Use `isNodeLike` instead.\n */\nexport const isNode = isNodeLike;\n/**\n * A constant that indicates whether the environment the code is running is Node.JS.\n */\nexport const isNodeRuntime = isNodeLike && !isBun && !isDeno;\n/**\n * A constant that indicates whether the environment the code is running is in React-Native.\n */\n// https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js\nexport const isReactNative = typeof navigator !== \"undefined\" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === \"ReactNative\";\n//# sourceMappingURL=checkEnvironment.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { isObject } from \"@azure/core-util\";\nconst RedactedString = \"REDACTED\";\n// Make sure this list is up-to-date with the one under core/logger/Readme#Keyconcepts\nconst defaultAllowedHeaderNames = [\n \"x-ms-client-request-id\",\n \"x-ms-return-client-request-id\",\n \"x-ms-useragent\",\n \"x-ms-correlation-request-id\",\n \"x-ms-request-id\",\n \"client-request-id\",\n \"ms-cv\",\n \"return-client-request-id\",\n \"traceparent\",\n \"Access-Control-Allow-Credentials\",\n \"Access-Control-Allow-Headers\",\n \"Access-Control-Allow-Methods\",\n \"Access-Control-Allow-Origin\",\n \"Access-Control-Expose-Headers\",\n \"Access-Control-Max-Age\",\n \"Access-Control-Request-Headers\",\n \"Access-Control-Request-Method\",\n \"Origin\",\n \"Accept\",\n \"Accept-Encoding\",\n \"Cache-Control\",\n \"Connection\",\n \"Content-Length\",\n \"Content-Type\",\n \"Date\",\n \"ETag\",\n \"Expires\",\n \"If-Match\",\n \"If-Modified-Since\",\n \"If-None-Match\",\n \"If-Unmodified-Since\",\n \"Last-Modified\",\n \"Pragma\",\n \"Request-Id\",\n \"Retry-After\",\n \"Server\",\n \"Transfer-Encoding\",\n \"User-Agent\",\n \"WWW-Authenticate\",\n];\nconst defaultAllowedQueryParameters = [\"api-version\"];\n/**\n * @internal\n */\nexport class Sanitizer {\n constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [], } = {}) {\n allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames);\n allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters);\n this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase()));\n this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase()));\n }\n sanitize(obj) {\n const seen = new Set();\n return JSON.stringify(obj, (key, value) => {\n // Ensure Errors include their interesting non-enumerable members\n if (value instanceof Error) {\n return Object.assign(Object.assign({}, value), { name: value.name, message: value.message });\n }\n if (key === \"headers\") {\n return this.sanitizeHeaders(value);\n }\n else if (key === \"url\") {\n return this.sanitizeUrl(value);\n }\n else if (key === \"query\") {\n return this.sanitizeQuery(value);\n }\n else if (key === \"body\") {\n // Don't log the request body\n return undefined;\n }\n else if (key === \"response\") {\n // Don't log response again\n return undefined;\n }\n else if (key === \"operationSpec\") {\n // When using sendOperationRequest, the request carries a massive\n // field with the autorest spec. No need to log it.\n return undefined;\n }\n else if (Array.isArray(value) || isObject(value)) {\n if (seen.has(value)) {\n return \"[Circular]\";\n }\n seen.add(value);\n }\n return value;\n }, 2);\n }\n sanitizeUrl(value) {\n if (typeof value !== \"string\" || value === null || value === \"\") {\n return value;\n }\n const url = new URL(value);\n if (!url.search) {\n return value;\n }\n for (const [key] of url.searchParams) {\n if (!this.allowedQueryParameters.has(key.toLowerCase())) {\n url.searchParams.set(key, RedactedString);\n }\n }\n return url.toString();\n }\n sanitizeHeaders(obj) {\n const sanitized = {};\n for (const key of Object.keys(obj)) {\n if (this.allowedHeaderNames.has(key.toLowerCase())) {\n sanitized[key] = obj[key];\n }\n else {\n sanitized[key] = RedactedString;\n }\n }\n return sanitized;\n }\n sanitizeQuery(value) {\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n const sanitized = {};\n for (const k of Object.keys(value)) {\n if (this.allowedQueryParameters.has(k.toLowerCase())) {\n sanitized[k] = value[k];\n }\n else {\n sanitized[k] = RedactedString;\n }\n }\n return sanitized;\n }\n}\n//# sourceMappingURL=sanitizer.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { logger as coreLogger } from \"../log.js\";\nimport { Sanitizer } from \"../util/sanitizer.js\";\n/**\n * The programmatic identifier of the logPolicy.\n */\nexport const logPolicyName = \"logPolicy\";\n/**\n * A policy that logs all requests and responses.\n * @param options - Options to configure logPolicy.\n */\nexport function logPolicy(options = {}) {\n var _a;\n const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : coreLogger.info;\n const sanitizer = new Sanitizer({\n additionalAllowedHeaderNames: options.additionalAllowedHeaderNames,\n additionalAllowedQueryParameters: options.additionalAllowedQueryParameters,\n });\n return {\n name: logPolicyName,\n async sendRequest(request, next) {\n if (!logger.enabled) {\n return next(request);\n }\n logger(`Request: ${sanitizer.sanitize(request)}`);\n const response = await next(request);\n logger(`Response status code: ${response.status}`);\n logger(`Headers: ${sanitizer.sanitize(response.headers)}`);\n return response;\n },\n };\n}\n//# sourceMappingURL=logPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * The programmatic identifier of the redirectPolicy.\n */\nexport const redirectPolicyName = \"redirectPolicy\";\n/**\n * Methods that are allowed to follow redirects 301 and 302\n */\nconst allowedRedirect = [\"GET\", \"HEAD\"];\n/**\n * A policy to follow Location headers from the server in order\n * to support server-side redirection.\n * In the browser, this policy is not used.\n * @param options - Options to control policy behavior.\n */\nexport function redirectPolicy(options = {}) {\n const { maxRetries = 20 } = options;\n return {\n name: redirectPolicyName,\n async sendRequest(request, next) {\n const response = await next(request);\n return handleRedirect(next, response, maxRetries);\n },\n };\n}\nasync function handleRedirect(next, response, maxRetries, currentRetries = 0) {\n const { request, status, headers } = response;\n const locationHeader = headers.get(\"location\");\n if (locationHeader &&\n (status === 300 ||\n (status === 301 && allowedRedirect.includes(request.method)) ||\n (status === 302 && allowedRedirect.includes(request.method)) ||\n (status === 303 && request.method === \"POST\") ||\n status === 307) &&\n currentRetries < maxRetries) {\n const url = new URL(locationHeader, request.url);\n request.url = url.toString();\n // POST request with Status code 303 should be converted into a\n // redirected GET request if the redirect url is present in the location header\n if (status === 303) {\n request.method = \"GET\";\n request.headers.delete(\"Content-Length\");\n delete request.body;\n }\n request.headers.delete(\"Authorization\");\n const res = await next(request);\n return handleRedirect(next, res, maxRetries, currentRetries + 1);\n }\n return response;\n}\n//# sourceMappingURL=redirectPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * @internal\n */\nexport function getHeaderName() {\n return \"x-ms-useragent\";\n}\nfunction getBrowserInfo(userAgent) {\n const browserRegexes = [\n { name: \"Firefox\", regex: /Firefox\\/([\\d.]+)/ },\n { name: \"Safari\", regex: /Version\\/([\\d.]+).*Safari/ },\n ];\n for (const browser of browserRegexes) {\n const match = userAgent.match(browser.regex);\n if (match) {\n return { brand: browser.name, version: match[1] };\n }\n }\n return undefined;\n}\nfunction getBrandVersionString(brands) {\n const brandOrder = [\"Google Chrome\", \"Microsoft Edge\", \"Opera\", \"Brave\", \"Chromium\"];\n for (const brand of brandOrder) {\n const foundBrand = brands.find((b) => b.brand === brand);\n if (foundBrand) {\n return foundBrand;\n }\n }\n return undefined;\n}\n/**\n * @internal\n */\nexport async function setPlatformSpecificData(map) {\n const localNavigator = globalThis.navigator;\n let osPlatform = \"unknown\";\n if (localNavigator === null || localNavigator === void 0 ? void 0 : localNavigator.userAgentData) {\n const entropyValues = await localNavigator.userAgentData.getHighEntropyValues([\n \"architecture\",\n \"platformVersion\",\n ]);\n osPlatform = `${entropyValues.architecture}-${entropyValues.platform}-${entropyValues.platformVersion}`;\n // Get the brand and version\n const brand = getBrandVersionString(localNavigator.userAgentData.brands);\n if (brand) {\n map.set(brand.brand, brand.version);\n }\n }\n else if (localNavigator === null || localNavigator === void 0 ? void 0 : localNavigator.platform) {\n osPlatform = localNavigator.platform;\n const brand = getBrowserInfo(localNavigator.userAgent);\n if (brand) {\n map.set(brand.brand, brand.version);\n }\n }\n else if (typeof globalThis.EdgeRuntime === \"string\") {\n map.set(\"EdgeRuntime\", globalThis.EdgeRuntime);\n }\n map.set(\"OS\", osPlatform);\n}\n//# sourceMappingURL=userAgentPlatform-browser.mjs.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nexport const SDK_VERSION = \"1.19.0\";\nexport const DEFAULT_RETRY_POLICY_COUNT = 3;\n//# sourceMappingURL=constants.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { getHeaderName, setPlatformSpecificData } from \"./userAgentPlatform.js\";\nimport { SDK_VERSION } from \"../constants.js\";\nfunction getUserAgentString(telemetryInfo) {\n const parts = [];\n for (const [key, value] of telemetryInfo) {\n const token = value ? `${key}/${value}` : key;\n parts.push(token);\n }\n return parts.join(\" \");\n}\n/**\n * @internal\n */\nexport function getUserAgentHeaderName() {\n return getHeaderName();\n}\n/**\n * @internal\n */\nexport async function getUserAgentValue(prefix) {\n const runtimeInfo = new Map();\n runtimeInfo.set(\"core-rest-pipeline\", SDK_VERSION);\n await setPlatformSpecificData(runtimeInfo);\n const defaultAgent = getUserAgentString(runtimeInfo);\n const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent;\n return userAgentValue;\n}\n//# sourceMappingURL=userAgent.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { getUserAgentHeaderName, getUserAgentValue } from \"../util/userAgent.js\";\nconst UserAgentHeaderName = getUserAgentHeaderName();\n/**\n * The programmatic identifier of the userAgentPolicy.\n */\nexport const userAgentPolicyName = \"userAgentPolicy\";\n/**\n * A policy that sets the User-Agent header (or equivalent) to reflect\n * the library version.\n * @param options - Options to customize the user agent value.\n */\nexport function userAgentPolicy(options = {}) {\n const userAgentValue = getUserAgentValue(options.userAgentPrefix);\n return {\n name: userAgentPolicyName,\n async sendRequest(request, next) {\n if (!request.headers.has(UserAgentHeaderName)) {\n request.headers.set(UserAgentHeaderName, await userAgentValue);\n }\n return next(request);\n },\n };\n}\n//# sourceMappingURL=userAgentPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nexport function isNodeReadableStream(x) {\n return Boolean(x && typeof x[\"pipe\"] === \"function\");\n}\nexport function isWebReadableStream(x) {\n return Boolean(x &&\n typeof x.getReader === \"function\" &&\n typeof x.tee === \"function\");\n}\nexport function isReadableStream(x) {\n return isNodeReadableStream(x) || isWebReadableStream(x);\n}\nexport function isBlob(x) {\n return typeof x.stream === \"function\";\n}\n//# sourceMappingURL=typeGuards.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { isNodeLike } from \"@azure/core-util\";\nimport { isNodeReadableStream } from \"./typeGuards.js\";\nconst unimplementedMethods = {\n arrayBuffer: () => {\n throw new Error(\"Not implemented\");\n },\n bytes: () => {\n throw new Error(\"Not implemented\");\n },\n slice: () => {\n throw new Error(\"Not implemented\");\n },\n text: () => {\n throw new Error(\"Not implemented\");\n },\n};\n/**\n * Private symbol used as key on objects created using createFile containing the\n * original source of the file object.\n *\n * This is used in Node to access the original Node stream without using Blob#stream, which\n * returns a web stream. This is done to avoid a couple of bugs to do with Blob#stream and\n * Readable#to/fromWeb in Node versions we support:\n * - https://github.com/nodejs/node/issues/42694 (fixed in Node 18.14)\n * - https://github.com/nodejs/node/issues/48916 (fixed in Node 20.6)\n *\n * Once these versions are no longer supported, we may be able to stop doing this.\n *\n * @internal\n */\nconst rawContent = Symbol(\"rawContent\");\nfunction hasRawContent(x) {\n return typeof x[rawContent] === \"function\";\n}\n/**\n * Extract the raw content from a given blob-like object. If the input was created using createFile\n * or createFileFromStream, the exact content passed into createFile/createFileFromStream will be used.\n * For true instances of Blob and File, returns the blob's content as a Web ReadableStream.\n *\n * @internal\n */\nexport function getRawContent(blob) {\n if (hasRawContent(blob)) {\n return blob[rawContent]();\n }\n else {\n return blob.stream();\n }\n}\n/**\n * Create an object that implements the File interface. This object is intended to be\n * passed into RequestBodyType.formData, and is not guaranteed to work as expected in\n * other situations.\n *\n * Use this function to:\n * - Create a File object for use in RequestBodyType.formData in environments where the\n * global File object is unavailable.\n * - Create a File-like object from a readable stream without reading the stream into memory.\n *\n * @param stream - the content of the file as a callback returning a stream. When a File object made using createFile is\n * passed in a request's form data map, the stream will not be read into memory\n * and instead will be streamed when the request is made. In the event of a retry, the\n * stream needs to be read again, so this callback SHOULD return a fresh stream if possible.\n * @param name - the name of the file.\n * @param options - optional metadata about the file, e.g. file name, file size, MIME type.\n */\nexport function createFileFromStream(stream, name, options = {}) {\n var _a, _b, _c, _d;\n return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : \"\", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : new Date().getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : \"\", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => {\n const s = stream();\n if (isNodeReadableStream(s)) {\n throw new Error(\"Not supported: a Node stream was provided as input to createFileFromStream.\");\n }\n return s;\n }, [rawContent]: stream });\n}\n/**\n * Create an object that implements the File interface. This object is intended to be\n * passed into RequestBodyType.formData, and is not guaranteed to work as expected in\n * other situations.\n *\n * Use this function create a File object for use in RequestBodyType.formData in environments where the global File object is unavailable.\n *\n * @param content - the content of the file as a Uint8Array in memory.\n * @param name - the name of the file.\n * @param options - optional metadata about the file, e.g. file name, file size, MIME type.\n */\nexport function createFile(content, name, options = {}) {\n var _a, _b, _c;\n if (isNodeLike) {\n return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : \"\", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : new Date().getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : \"\", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content });\n }\n else {\n return new File([content], name, options);\n }\n}\n//# sourceMappingURL=file.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { getRawContent } from \"./file.js\";\nimport { isNodeReadableStream, isWebReadableStream } from \"./typeGuards.js\";\n/**\n * Drain the content of the given ReadableStream into a Blob.\n * The blob's content may end up in memory or on disk dependent on size.\n */\nfunction drain(stream) {\n return new Response(stream).blob();\n}\nasync function toBlobPart(source) {\n if (source instanceof Blob || source instanceof Uint8Array) {\n return source;\n }\n if (isWebReadableStream(source)) {\n return drain(source);\n }\n // If it's not a true Blob, and it's not a Uint8Array, we can assume the source\n // is a fake File created by createFileFromStream and we can get the original stream\n // using getRawContent.\n const rawContent = getRawContent(source);\n // Shouldn't happen but guard for it anyway\n if (isNodeReadableStream(rawContent)) {\n throw new Error(\"Encountered unexpected type. In the browser, `concat` supports Web ReadableStream, Blob, Uint8Array, and files created using `createFile` only.\");\n }\n return toBlobPart(rawContent);\n}\n/**\n * Utility function that concatenates a set of binary inputs into one combined output.\n *\n * @param sources - array of sources for the concatenation\n * @returns - in Node, a (() =\\> NodeJS.ReadableStream) which, when read, produces a concatenation of all the inputs.\n * In browser, returns a `Blob` representing all the concatenated inputs.\n *\n * @internal\n */\nexport async function concat(sources) {\n const parts = [];\n for (const source of sources) {\n parts.push(await toBlobPart(typeof source === \"function\" ? source() : source));\n }\n return new Blob(parts);\n}\n//# sourceMappingURL=concat.common.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { randomUUID, stringToUint8Array } from \"@azure/core-util\";\nimport { concat } from \"../util/concat.js\";\nimport { isBlob } from \"../util/typeGuards.js\";\nfunction generateBoundary() {\n return `----AzSDKFormBoundary${randomUUID()}`;\n}\nfunction encodeHeaders(headers) {\n let result = \"\";\n for (const [key, value] of headers) {\n result += `${key}: ${value}\\r\\n`;\n }\n return result;\n}\nfunction getLength(source) {\n if (source instanceof Uint8Array) {\n return source.byteLength;\n }\n else if (isBlob(source)) {\n // if was created using createFile then -1 means we have an unknown size\n return source.size === -1 ? undefined : source.size;\n }\n else {\n return undefined;\n }\n}\nfunction getTotalLength(sources) {\n let total = 0;\n for (const source of sources) {\n const partLength = getLength(source);\n if (partLength === undefined) {\n return undefined;\n }\n else {\n total += partLength;\n }\n }\n return total;\n}\nasync function buildRequestBody(request, parts, boundary) {\n const sources = [\n stringToUint8Array(`--${boundary}`, \"utf-8\"),\n ...parts.flatMap((part) => [\n stringToUint8Array(\"\\r\\n\", \"utf-8\"),\n stringToUint8Array(encodeHeaders(part.headers), \"utf-8\"),\n stringToUint8Array(\"\\r\\n\", \"utf-8\"),\n part.body,\n stringToUint8Array(`\\r\\n--${boundary}`, \"utf-8\"),\n ]),\n stringToUint8Array(\"--\\r\\n\\r\\n\", \"utf-8\"),\n ];\n const contentLength = getTotalLength(sources);\n if (contentLength) {\n request.headers.set(\"Content-Length\", contentLength);\n }\n request.body = await concat(sources);\n}\n/**\n * Name of multipart policy\n */\nexport const multipartPolicyName = \"multipartPolicy\";\nconst maxBoundaryLength = 70;\nconst validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`);\nfunction assertValidBoundary(boundary) {\n if (boundary.length > maxBoundaryLength) {\n throw new Error(`Multipart boundary \"${boundary}\" exceeds maximum length of 70 characters`);\n }\n if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) {\n throw new Error(`Multipart boundary \"${boundary}\" contains invalid characters`);\n }\n}\n/**\n * Pipeline policy for multipart requests\n */\nexport function multipartPolicy() {\n return {\n name: multipartPolicyName,\n async sendRequest(request, next) {\n var _a;\n if (!request.multipartBody) {\n return next(request);\n }\n if (request.body) {\n throw new Error(\"multipartBody and regular body cannot be set at the same time\");\n }\n let boundary = request.multipartBody.boundary;\n const contentTypeHeader = (_a = request.headers.get(\"Content-Type\")) !== null && _a !== void 0 ? _a : \"multipart/mixed\";\n const parsedHeader = contentTypeHeader.match(/^(multipart\\/[^ ;]+)(?:; *boundary=(.+))?$/);\n if (!parsedHeader) {\n throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`);\n }\n const [, contentType, parsedBoundary] = parsedHeader;\n if (parsedBoundary && boundary && parsedBoundary !== boundary) {\n throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`);\n }\n boundary !== null && boundary !== void 0 ? boundary : (boundary = parsedBoundary);\n if (boundary) {\n assertValidBoundary(boundary);\n }\n else {\n boundary = generateBoundary();\n }\n request.headers.set(\"Content-Type\", `${contentType}; boundary=${boundary}`);\n await buildRequestBody(request, request.multipartBody.parts, boundary);\n request.multipartBody = undefined;\n return next(request);\n },\n };\n}\n//# sourceMappingURL=multipartPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/*\n * NOTE: When moving this file, please update \"browser\" section in package.json\n */\nexport const decompressResponsePolicyName = \"decompressResponsePolicy\";\n/**\n * decompressResponsePolicy is not supported in the browser and attempting\n * to use it will raise an error.\n */\nexport function decompressResponsePolicy() {\n throw new Error(\"decompressResponsePolicy is not supported in browser environment\");\n}\n//# sourceMappingURL=decompressResponsePolicy-browser.mjs.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { AbortError } from \"@azure/abort-controller\";\nconst StandardAbortMessage = \"The operation was aborted.\";\n/**\n * A wrapper for setTimeout that resolves a promise after delayInMs milliseconds.\n * @param delayInMs - The number of milliseconds to be delayed.\n * @param value - The value to be resolved with after a timeout of t milliseconds.\n * @param options - The options for delay - currently abort options\n * - abortSignal - The abortSignal associated with containing operation.\n * - abortErrorMsg - The abort error message associated with containing operation.\n * @returns Resolved promise\n */\nexport function delay(delayInMs, value, options) {\n return new Promise((resolve, reject) => {\n let timer = undefined;\n let onAborted = undefined;\n const rejectOnAbort = () => {\n return reject(new AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage));\n };\n const removeListeners = () => {\n if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) {\n options.abortSignal.removeEventListener(\"abort\", onAborted);\n }\n };\n onAborted = () => {\n if (timer) {\n clearTimeout(timer);\n }\n removeListeners();\n return rejectOnAbort();\n };\n if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) {\n return rejectOnAbort();\n }\n timer = setTimeout(() => {\n removeListeners();\n resolve(value);\n }, delayInMs);\n if (options === null || options === void 0 ? void 0 : options.abortSignal) {\n options.abortSignal.addEventListener(\"abort\", onAborted);\n }\n });\n}\n/**\n * @internal\n * @returns the parsed value or undefined if the parsed value is invalid.\n */\nexport function parseHeaderValueAsNumber(response, headerName) {\n const value = response.headers.get(headerName);\n if (!value)\n return;\n const valueAsNum = Number(value);\n if (Number.isNaN(valueAsNum))\n return;\n return valueAsNum;\n}\n//# sourceMappingURL=helpers.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { parseHeaderValueAsNumber } from \"../util/helpers.js\";\n/**\n * The header that comes back from Azure services representing\n * the amount of time (minimum) to wait to retry (in seconds or timestamp after which we can retry).\n */\nconst RetryAfterHeader = \"Retry-After\";\n/**\n * The headers that come back from Azure services representing\n * the amount of time (minimum) to wait to retry.\n *\n * \"retry-after-ms\", \"x-ms-retry-after-ms\" : milliseconds\n * \"Retry-After\" : seconds or timestamp\n */\nconst AllRetryAfterHeaders = [\"retry-after-ms\", \"x-ms-retry-after-ms\", RetryAfterHeader];\n/**\n * A response is a throttling retry response if it has a throttling status code (429 or 503),\n * as long as one of the [ \"Retry-After\" or \"retry-after-ms\" or \"x-ms-retry-after-ms\" ] headers has a valid value.\n *\n * Returns the `retryAfterInMs` value if the response is a throttling retry response.\n * If not throttling retry response, returns `undefined`.\n *\n * @internal\n */\nfunction getRetryAfterInMs(response) {\n if (!(response && [429, 503].includes(response.status)))\n return undefined;\n try {\n // Headers: \"retry-after-ms\", \"x-ms-retry-after-ms\", \"Retry-After\"\n for (const header of AllRetryAfterHeaders) {\n const retryAfterValue = parseHeaderValueAsNumber(response, header);\n if (retryAfterValue === 0 || retryAfterValue) {\n // \"Retry-After\" header ==> seconds\n // \"retry-after-ms\", \"x-ms-retry-after-ms\" headers ==> milli-seconds\n const multiplyingFactor = header === RetryAfterHeader ? 1000 : 1;\n return retryAfterValue * multiplyingFactor; // in milli-seconds\n }\n }\n // RetryAfterHeader (\"Retry-After\") has a special case where it might be formatted as a date instead of a number of seconds\n const retryAfterHeader = response.headers.get(RetryAfterHeader);\n if (!retryAfterHeader)\n return;\n const date = Date.parse(retryAfterHeader);\n const diff = date - Date.now();\n // negative diff would mean a date in the past, so retry asap with 0 milliseconds\n return Number.isFinite(diff) ? Math.max(0, diff) : undefined;\n }\n catch (_a) {\n return undefined;\n }\n}\n/**\n * A response is a retry response if it has a throttling status code (429 or 503),\n * as long as one of the [ \"Retry-After\" or \"retry-after-ms\" or \"x-ms-retry-after-ms\" ] headers has a valid value.\n */\nexport function isThrottlingRetryResponse(response) {\n return Number.isFinite(getRetryAfterInMs(response));\n}\nexport function throttlingRetryStrategy() {\n return {\n name: \"throttlingRetryStrategy\",\n retry({ response }) {\n const retryAfterInMs = getRetryAfterInMs(response);\n if (!Number.isFinite(retryAfterInMs)) {\n return { skipStrategy: true };\n }\n return {\n retryAfterInMs,\n };\n },\n };\n}\n//# sourceMappingURL=throttlingRetryStrategy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { calculateRetryDelay } from \"@azure/core-util\";\nimport { isThrottlingRetryResponse } from \"./throttlingRetryStrategy.js\";\n// intervals are in milliseconds\nconst DEFAULT_CLIENT_RETRY_INTERVAL = 1000;\nconst DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64;\n/**\n * A retry strategy that retries with an exponentially increasing delay in these two cases:\n * - When there are errors in the underlying transport layer (e.g. DNS lookup failures).\n * - Or otherwise if the outgoing request fails (408, greater or equal than 500, except for 501 and 505).\n */\nexport function exponentialRetryStrategy(options = {}) {\n var _a, _b;\n const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL;\n const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL;\n return {\n name: \"exponentialRetryStrategy\",\n retry({ retryCount, response, responseError }) {\n const matchedSystemError = isSystemError(responseError);\n const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors;\n const isExponential = isExponentialRetryResponse(response);\n const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes;\n const unknownResponse = response && (isThrottlingRetryResponse(response) || !isExponential);\n if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) {\n return { skipStrategy: true };\n }\n if (responseError && !matchedSystemError && !isExponential) {\n return { errorToThrow: responseError };\n }\n return calculateRetryDelay(retryCount, {\n retryDelayInMs: retryInterval,\n maxRetryDelayInMs: maxRetryInterval,\n });\n },\n };\n}\n/**\n * A response is a retry response if it has status codes:\n * - 408, or\n * - Greater or equal than 500, except for 501 and 505.\n */\nexport function isExponentialRetryResponse(response) {\n return Boolean(response &&\n response.status !== undefined &&\n (response.status >= 500 || response.status === 408) &&\n response.status !== 501 &&\n response.status !== 505);\n}\n/**\n * Determines whether an error from a pipeline response was triggered in the network layer.\n */\nexport function isSystemError(err) {\n if (!err) {\n return false;\n }\n return (err.code === \"ETIMEDOUT\" ||\n err.code === \"ESOCKETTIMEDOUT\" ||\n err.code === \"ECONNREFUSED\" ||\n err.code === \"ECONNRESET\" ||\n err.code === \"ENOENT\" ||\n err.code === \"ENOTFOUND\");\n}\n//# sourceMappingURL=exponentialRetryStrategy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { delay } from \"../util/helpers.js\";\nimport { createClientLogger } from \"@azure/logger\";\nimport { AbortError } from \"@azure/abort-controller\";\nimport { DEFAULT_RETRY_POLICY_COUNT } from \"../constants.js\";\nconst retryPolicyLogger = createClientLogger(\"core-rest-pipeline retryPolicy\");\n/**\n * The programmatic identifier of the retryPolicy.\n */\nconst retryPolicyName = \"retryPolicy\";\n/**\n * retryPolicy is a generic policy to enable retrying requests when certain conditions are met\n */\nexport function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_COUNT }) {\n const logger = options.logger || retryPolicyLogger;\n return {\n name: retryPolicyName,\n async sendRequest(request, next) {\n var _a, _b;\n let response;\n let responseError;\n let retryCount = -1;\n retryRequest: while (true) {\n retryCount += 1;\n response = undefined;\n responseError = undefined;\n try {\n logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId);\n response = await next(request);\n logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId);\n }\n catch (e) {\n logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId);\n // RestErrors are valid targets for the retry strategies.\n // If none of the retry strategies can work with them, they will be thrown later in this policy.\n // If the received error is not a RestError, it is immediately thrown.\n responseError = e;\n if (!e || responseError.name !== \"RestError\") {\n throw e;\n }\n response = responseError.response;\n }\n if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) {\n logger.error(`Retry ${retryCount}: Request aborted.`);\n const abortError = new AbortError();\n throw abortError;\n }\n if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_POLICY_COUNT)) {\n logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`);\n if (responseError) {\n throw responseError;\n }\n else if (response) {\n return response;\n }\n else {\n throw new Error(\"Maximum retries reached with no response or error to throw\");\n }\n }\n logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`);\n strategiesLoop: for (const strategy of strategies) {\n const strategyLogger = strategy.logger || retryPolicyLogger;\n strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`);\n const modifiers = strategy.retry({\n retryCount,\n response,\n responseError,\n });\n if (modifiers.skipStrategy) {\n strategyLogger.info(`Retry ${retryCount}: Skipped.`);\n continue strategiesLoop;\n }\n const { errorToThrow, retryAfterInMs, redirectTo } = modifiers;\n if (errorToThrow) {\n strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow);\n throw errorToThrow;\n }\n if (retryAfterInMs || retryAfterInMs === 0) {\n strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`);\n await delay(retryAfterInMs, undefined, { abortSignal: request.abortSignal });\n continue retryRequest;\n }\n if (redirectTo) {\n strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`);\n request.url = redirectTo;\n continue retryRequest;\n }\n }\n if (responseError) {\n logger.info(`None of the retry strategies could work with the received error. Throwing it.`);\n throw responseError;\n }\n if (response) {\n logger.info(`None of the retry strategies could work with the received response. Returning it.`);\n return response;\n }\n // If all the retries skip and there's no response,\n // we're still in the retry loop, so a new request will be sent\n // until `maxRetries` is reached.\n }\n },\n };\n}\n//# sourceMappingURL=retryPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { exponentialRetryStrategy } from \"../retryStrategies/exponentialRetryStrategy.js\";\nimport { throttlingRetryStrategy } from \"../retryStrategies/throttlingRetryStrategy.js\";\nimport { retryPolicy } from \"./retryPolicy.js\";\nimport { DEFAULT_RETRY_POLICY_COUNT } from \"../constants.js\";\n/**\n * Name of the {@link defaultRetryPolicy}\n */\nexport const defaultRetryPolicyName = \"defaultRetryPolicy\";\n/**\n * A policy that retries according to three strategies:\n * - When the server sends a 429 response with a Retry-After header.\n * - When there are errors in the underlying transport layer (e.g. DNS lookup failures).\n * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay.\n */\nexport function defaultRetryPolicy(options = {}) {\n var _a;\n return {\n name: defaultRetryPolicyName,\n sendRequest: retryPolicy([throttlingRetryStrategy(), exponentialRetryStrategy(options)], {\n maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_POLICY_COUNT,\n }).sendRequest,\n };\n}\n//# sourceMappingURL=defaultRetryPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nfunction normalizeName(name) {\n return name.toLowerCase();\n}\nfunction* headerIterator(map) {\n for (const entry of map.values()) {\n yield [entry.name, entry.value];\n }\n}\nclass HttpHeadersImpl {\n constructor(rawHeaders) {\n this._headersMap = new Map();\n if (rawHeaders) {\n for (const headerName of Object.keys(rawHeaders)) {\n this.set(headerName, rawHeaders[headerName]);\n }\n }\n }\n /**\n * Set a header in this collection with the provided name and value. The name is\n * case-insensitive.\n * @param name - The name of the header to set. This value is case-insensitive.\n * @param value - The value of the header to set.\n */\n set(name, value) {\n this._headersMap.set(normalizeName(name), { name, value: String(value).trim() });\n }\n /**\n * Get the header value for the provided header name, or undefined if no header exists in this\n * collection with the provided name.\n * @param name - The name of the header. This value is case-insensitive.\n */\n get(name) {\n var _a;\n return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value;\n }\n /**\n * Get whether or not this header collection contains a header entry for the provided header name.\n * @param name - The name of the header to set. This value is case-insensitive.\n */\n has(name) {\n return this._headersMap.has(normalizeName(name));\n }\n /**\n * Remove the header with the provided headerName.\n * @param name - The name of the header to remove.\n */\n delete(name) {\n this._headersMap.delete(normalizeName(name));\n }\n /**\n * Get the JSON object representation of this HTTP header collection.\n */\n toJSON(options = {}) {\n const result = {};\n if (options.preserveCase) {\n for (const entry of this._headersMap.values()) {\n result[entry.name] = entry.value;\n }\n }\n else {\n for (const [normalizedName, entry] of this._headersMap) {\n result[normalizedName] = entry.value;\n }\n }\n return result;\n }\n /**\n * Get the string representation of this HTTP header collection.\n */\n toString() {\n return JSON.stringify(this.toJSON({ preserveCase: true }));\n }\n /**\n * Iterate over tuples of header [name, value] pairs.\n */\n [Symbol.iterator]() {\n return headerIterator(this._headersMap);\n }\n}\n/**\n * Creates an object that satisfies the `HttpHeaders` interface.\n * @param rawHeaders - A simple object representing initial headers\n */\nexport function createHttpHeaders(rawHeaders) {\n return new HttpHeadersImpl(rawHeaders);\n}\n//# sourceMappingURL=httpHeaders.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { isNodeLike, stringToUint8Array } from \"@azure/core-util\";\nimport { createHttpHeaders } from \"../httpHeaders.js\";\n/**\n * The programmatic identifier of the formDataPolicy.\n */\nexport const formDataPolicyName = \"formDataPolicy\";\nfunction formDataToFormDataMap(formData) {\n var _a;\n const formDataMap = {};\n for (const [key, value] of formData.entries()) {\n (_a = formDataMap[key]) !== null && _a !== void 0 ? _a : (formDataMap[key] = []);\n formDataMap[key].push(value);\n }\n return formDataMap;\n}\n/**\n * A policy that encodes FormData on the request into the body.\n */\nexport function formDataPolicy() {\n return {\n name: formDataPolicyName,\n async sendRequest(request, next) {\n if (isNodeLike && typeof FormData !== \"undefined\" && request.body instanceof FormData) {\n request.formData = formDataToFormDataMap(request.body);\n request.body = undefined;\n }\n if (request.formData) {\n const contentType = request.headers.get(\"Content-Type\");\n if (contentType && contentType.indexOf(\"application/x-www-form-urlencoded\") !== -1) {\n request.body = wwwFormUrlEncode(request.formData);\n }\n else {\n await prepareFormData(request.formData, request);\n }\n request.formData = undefined;\n }\n return next(request);\n },\n };\n}\nfunction wwwFormUrlEncode(formData) {\n const urlSearchParams = new URLSearchParams();\n for (const [key, value] of Object.entries(formData)) {\n if (Array.isArray(value)) {\n for (const subValue of value) {\n urlSearchParams.append(key, subValue.toString());\n }\n }\n else {\n urlSearchParams.append(key, value.toString());\n }\n }\n return urlSearchParams.toString();\n}\nasync function prepareFormData(formData, request) {\n // validate content type (multipart/form-data)\n const contentType = request.headers.get(\"Content-Type\");\n if (contentType && !contentType.startsWith(\"multipart/form-data\")) {\n // content type is specified and is not multipart/form-data. Exit.\n return;\n }\n request.headers.set(\"Content-Type\", contentType !== null && contentType !== void 0 ? contentType : \"multipart/form-data\");\n // set body to MultipartRequestBody using content from FormDataMap\n const parts = [];\n for (const [fieldName, values] of Object.entries(formData)) {\n for (const value of Array.isArray(values) ? values : [values]) {\n if (typeof value === \"string\") {\n parts.push({\n headers: createHttpHeaders({\n \"Content-Disposition\": `form-data; name=\"${fieldName}\"`,\n }),\n body: stringToUint8Array(value, \"utf-8\"),\n });\n }\n else if (value === undefined || value === null || typeof value !== \"object\") {\n throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`);\n }\n else {\n // using || instead of ?? here since if value.name is empty we should create a file name\n const fileName = value.name || \"blob\";\n const headers = createHttpHeaders();\n headers.set(\"Content-Disposition\", `form-data; name=\"${fieldName}\"; filename=\"${fileName}\"`);\n // again, || is used since an empty value.type means the content type is unset\n headers.set(\"Content-Type\", value.type || \"application/octet-stream\");\n parts.push({\n headers,\n body: value,\n });\n }\n }\n }\n request.multipartBody = { parts };\n}\n//# sourceMappingURL=formDataPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nexport const proxyPolicyName = \"proxyPolicy\";\nconst errorMessage = \"proxyPolicy is not supported in browser environment\";\nexport function getDefaultProxySettings() {\n throw new Error(errorMessage);\n}\n/**\n * proxyPolicy is not supported in the browser and attempting\n * to use it will raise an error.\n */\nexport function proxyPolicy() {\n throw new Error(errorMessage);\n}\n/**\n * A function to reset the cached agents.\n * proxyPolicy is not supported in the browser and attempting\n * to use it will raise an error.\n * @internal\n */\nexport function resetCachedProxyAgents() {\n throw new Error(errorMessage);\n}\n//# sourceMappingURL=proxyPolicy.common.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * The programmatic identifier of the setClientRequestIdPolicy.\n */\nexport const setClientRequestIdPolicyName = \"setClientRequestIdPolicy\";\n/**\n * Each PipelineRequest gets a unique id upon creation.\n * This policy passes that unique id along via an HTTP header to enable better\n * telemetry and tracing.\n * @param requestIdHeaderName - The name of the header to pass the request ID to.\n */\nexport function setClientRequestIdPolicy(requestIdHeaderName = \"x-ms-client-request-id\") {\n return {\n name: setClientRequestIdPolicyName,\n async sendRequest(request, next) {\n if (!request.headers.has(requestIdHeaderName)) {\n request.headers.set(requestIdHeaderName, request.requestId);\n }\n return next(request);\n },\n };\n}\n//# sourceMappingURL=setClientRequestIdPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * Name of the Agent Policy\n */\nexport const agentPolicyName = \"agentPolicy\";\n/**\n * Gets a pipeline policy that sets http.agent\n */\nexport function agentPolicy(agent) {\n return {\n name: agentPolicyName,\n sendRequest: async (req, next) => {\n // Users may define an agent on the request, honor it over the client level one\n if (!req.agent) {\n req.agent = agent;\n }\n return next(req);\n },\n };\n}\n//# sourceMappingURL=agentPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * Name of the TLS Policy\n */\nexport const tlsPolicyName = \"tlsPolicy\";\n/**\n * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication.\n */\nexport function tlsPolicy(tlsSettings) {\n return {\n name: tlsPolicyName,\n sendRequest: async (req, next) => {\n // Users may define a request tlsSettings, honor those over the client level one\n if (!req.tlsSettings) {\n req.tlsSettings = tlsSettings;\n }\n return next(req);\n },\n };\n}\n//# sourceMappingURL=tlsPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/** @internal */\nexport const knownContextKeys = {\n span: Symbol.for(\"@azure/core-tracing span\"),\n namespace: Symbol.for(\"@azure/core-tracing namespace\"),\n};\n/**\n * Creates a new {@link TracingContext} with the given options.\n * @param options - A set of known keys that may be set on the context.\n * @returns A new {@link TracingContext} with the given options.\n *\n * @internal\n */\nexport function createTracingContext(options = {}) {\n let context = new TracingContextImpl(options.parentContext);\n if (options.span) {\n context = context.setValue(knownContextKeys.span, options.span);\n }\n if (options.namespace) {\n context = context.setValue(knownContextKeys.namespace, options.namespace);\n }\n return context;\n}\n/** @internal */\nexport class TracingContextImpl {\n constructor(initialContext) {\n this._contextMap =\n initialContext instanceof TracingContextImpl\n ? new Map(initialContext._contextMap)\n : new Map();\n }\n setValue(key, value) {\n const newContext = new TracingContextImpl(this);\n newContext._contextMap.set(key, value);\n return newContext;\n }\n getValue(key) {\n return this._contextMap.get(key);\n }\n deleteValue(key) {\n const newContext = new TracingContextImpl(this);\n newContext._contextMap.delete(key);\n return newContext;\n }\n}\n//# sourceMappingURL=tracingContext.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * Browser-only implementation of the module's state. The browser esm variant will not load the commonjs state, so we do not need to share state between the two.\n */\nexport const state = {\n instrumenterImplementation: undefined,\n};\n//# sourceMappingURL=state-browser.mjs.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createTracingContext } from \"./tracingContext.js\";\nimport { state } from \"./state.js\";\nexport function createDefaultTracingSpan() {\n return {\n end: () => {\n // noop\n },\n isRecording: () => false,\n recordException: () => {\n // noop\n },\n setAttribute: () => {\n // noop\n },\n setStatus: () => {\n // noop\n },\n addEvent: () => {\n // noop\n },\n };\n}\nexport function createDefaultInstrumenter() {\n return {\n createRequestHeaders: () => {\n return {};\n },\n parseTraceparentHeader: () => {\n return undefined;\n },\n startSpan: (_name, spanOptions) => {\n return {\n span: createDefaultTracingSpan(),\n tracingContext: createTracingContext({ parentContext: spanOptions.tracingContext }),\n };\n },\n withContext(_context, callback, ...callbackArgs) {\n return callback(...callbackArgs);\n },\n };\n}\n/**\n * Extends the Azure SDK with support for a given instrumenter implementation.\n *\n * @param instrumenter - The instrumenter implementation to use.\n */\nexport function useInstrumenter(instrumenter) {\n state.instrumenterImplementation = instrumenter;\n}\n/**\n * Gets the currently set instrumenter, a No-Op instrumenter by default.\n *\n * @returns The currently set instrumenter\n */\nexport function getInstrumenter() {\n if (!state.instrumenterImplementation) {\n state.instrumenterImplementation = createDefaultInstrumenter();\n }\n return state.instrumenterImplementation;\n}\n//# sourceMappingURL=instrumenter.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { getInstrumenter } from \"./instrumenter.js\";\nimport { knownContextKeys } from \"./tracingContext.js\";\n/**\n * Creates a new tracing client.\n *\n * @param options - Options used to configure the tracing client.\n * @returns - An instance of {@link TracingClient}.\n */\nexport function createTracingClient(options) {\n const { namespace, packageName, packageVersion } = options;\n function startSpan(name, operationOptions, spanOptions) {\n var _a;\n const startSpanResult = getInstrumenter().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName: packageName, packageVersion: packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext }));\n let tracingContext = startSpanResult.tracingContext;\n const span = startSpanResult.span;\n if (!tracingContext.getValue(knownContextKeys.namespace)) {\n tracingContext = tracingContext.setValue(knownContextKeys.namespace, namespace);\n }\n span.setAttribute(\"az.namespace\", tracingContext.getValue(knownContextKeys.namespace));\n const updatedOptions = Object.assign({}, operationOptions, {\n tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }),\n });\n return {\n span,\n updatedOptions,\n };\n }\n async function withSpan(name, operationOptions, callback, spanOptions) {\n const { span, updatedOptions } = startSpan(name, operationOptions, spanOptions);\n try {\n const result = await withContext(updatedOptions.tracingOptions.tracingContext, () => Promise.resolve(callback(updatedOptions, span)));\n span.setStatus({ status: \"success\" });\n return result;\n }\n catch (err) {\n span.setStatus({ status: \"error\", error: err });\n throw err;\n }\n finally {\n span.end();\n }\n }\n function withContext(context, callback, ...callbackArgs) {\n return getInstrumenter().withContext(context, callback, ...callbackArgs);\n }\n /**\n * Parses a traceparent header value into a span identifier.\n *\n * @param traceparentHeader - The traceparent header to parse.\n * @returns An implementation-specific identifier for the span.\n */\n function parseTraceparentHeader(traceparentHeader) {\n return getInstrumenter().parseTraceparentHeader(traceparentHeader);\n }\n /**\n * Creates a set of request headers to propagate tracing information to a backend.\n *\n * @param tracingContext - The context containing the span to serialize.\n * @returns The set of headers to add to a request.\n */\n function createRequestHeaders(tracingContext) {\n return getInstrumenter().createRequestHeaders(tracingContext);\n }\n return {\n startSpan,\n withSpan,\n withContext,\n parseTraceparentHeader,\n createRequestHeaders,\n };\n}\n//# sourceMappingURL=tracingClient.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nexport const custom = {};\n//# sourceMappingURL=inspect.common.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { isError } from \"@azure/core-util\";\nimport { custom } from \"./util/inspect.js\";\nimport { Sanitizer } from \"./util/sanitizer.js\";\nconst errorSanitizer = new Sanitizer();\n/**\n * A custom error type for failed pipeline requests.\n */\nexport class RestError extends Error {\n constructor(message, options = {}) {\n super(message);\n this.name = \"RestError\";\n this.code = options.code;\n this.statusCode = options.statusCode;\n // The request and response may contain sensitive information in the headers or body.\n // To help prevent this sensitive information being accidentally logged, the request and response\n // properties are marked as non-enumerable here. This prevents them showing up in the output of\n // JSON.stringify and console.log.\n Object.defineProperty(this, \"request\", { value: options.request, enumerable: false });\n Object.defineProperty(this, \"response\", { value: options.response, enumerable: false });\n Object.setPrototypeOf(this, RestError.prototype);\n }\n /**\n * Logging method for util.inspect in Node\n */\n [custom]() {\n // Extract non-enumerable properties and add them back. This is OK since in this output the request and\n // response get sanitized.\n return `RestError: ${this.message} \\n ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`;\n }\n}\n/**\n * Something went wrong when making the request.\n * This means the actual request failed for some reason,\n * such as a DNS issue or the connection being lost.\n */\nRestError.REQUEST_SEND_ERROR = \"REQUEST_SEND_ERROR\";\n/**\n * This means that parsing the response from the server failed.\n * It may have been malformed.\n */\nRestError.PARSE_ERROR = \"PARSE_ERROR\";\n/**\n * Typeguard for RestError\n * @param e - Something caught by a catch clause.\n */\nexport function isRestError(e) {\n if (e instanceof RestError) {\n return true;\n }\n return isError(e) && e.name === \"RestError\";\n}\n//# sourceMappingURL=restError.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createTracingClient, } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"../constants.js\";\nimport { getUserAgentValue } from \"../util/userAgent.js\";\nimport { logger } from \"../log.js\";\nimport { getErrorMessage, isError } from \"@azure/core-util\";\nimport { isRestError } from \"../restError.js\";\nimport { Sanitizer } from \"../util/sanitizer.js\";\n/**\n * The programmatic identifier of the tracingPolicy.\n */\nexport const tracingPolicyName = \"tracingPolicy\";\n/**\n * A simple policy to create OpenTelemetry Spans for each request made by the pipeline\n * that has SpanOptions with a parent.\n * Requests made without a parent Span will not be recorded.\n * @param options - Options to configure the telemetry logged by the tracing policy.\n */\nexport function tracingPolicy(options = {}) {\n const userAgentPromise = getUserAgentValue(options.userAgentPrefix);\n const sanitizer = new Sanitizer({\n additionalAllowedQueryParameters: options.additionalAllowedQueryParameters,\n });\n const tracingClient = tryCreateTracingClient();\n return {\n name: tracingPolicyName,\n async sendRequest(request, next) {\n var _a;\n if (!tracingClient) {\n return next(request);\n }\n const userAgent = await userAgentPromise;\n const spanAttributes = {\n \"http.url\": sanitizer.sanitizeUrl(request.url),\n \"http.method\": request.method,\n \"http.user_agent\": userAgent,\n requestId: request.requestId,\n };\n if (userAgent) {\n spanAttributes[\"http.user_agent\"] = userAgent;\n }\n const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {};\n if (!span || !tracingContext) {\n return next(request);\n }\n try {\n const response = await tracingClient.withContext(tracingContext, next, request);\n tryProcessResponse(span, response);\n return response;\n }\n catch (err) {\n tryProcessError(span, err);\n throw err;\n }\n },\n };\n}\nfunction tryCreateTracingClient() {\n try {\n return createTracingClient({\n namespace: \"\",\n packageName: \"@azure/core-rest-pipeline\",\n packageVersion: SDK_VERSION,\n });\n }\n catch (e) {\n logger.warning(`Error when creating the TracingClient: ${getErrorMessage(e)}`);\n return undefined;\n }\n}\nfunction tryCreateSpan(tracingClient, request, spanAttributes) {\n try {\n // As per spec, we do not need to differentiate between HTTP and HTTPS in span name.\n const { span, updatedOptions } = tracingClient.startSpan(`HTTP ${request.method}`, { tracingOptions: request.tracingOptions }, {\n spanKind: \"client\",\n spanAttributes,\n });\n // If the span is not recording, don't do any more work.\n if (!span.isRecording()) {\n span.end();\n return undefined;\n }\n // set headers\n const headers = tracingClient.createRequestHeaders(updatedOptions.tracingOptions.tracingContext);\n for (const [key, value] of Object.entries(headers)) {\n request.headers.set(key, value);\n }\n return { span, tracingContext: updatedOptions.tracingOptions.tracingContext };\n }\n catch (e) {\n logger.warning(`Skipping creating a tracing span due to an error: ${getErrorMessage(e)}`);\n return undefined;\n }\n}\nfunction tryProcessError(span, error) {\n try {\n span.setStatus({\n status: \"error\",\n error: isError(error) ? error : undefined,\n });\n if (isRestError(error) && error.statusCode) {\n span.setAttribute(\"http.status_code\", error.statusCode);\n }\n span.end();\n }\n catch (e) {\n logger.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e)}`);\n }\n}\nfunction tryProcessResponse(span, response) {\n try {\n span.setAttribute(\"http.status_code\", response.status);\n const serviceRequestId = response.headers.get(\"x-ms-request-id\");\n if (serviceRequestId) {\n span.setAttribute(\"serviceRequestId\", serviceRequestId);\n }\n // Per semantic conventions, only set the status to error if the status code is 4xx or 5xx.\n // Otherwise, the status MUST remain unset.\n // https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status\n if (response.status >= 400) {\n span.setStatus({\n status: \"error\",\n });\n }\n span.end();\n }\n catch (e) {\n logger.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e)}`);\n }\n}\n//# sourceMappingURL=tracingPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { logPolicy } from \"./policies/logPolicy.js\";\nimport { createEmptyPipeline } from \"./pipeline.js\";\nimport { redirectPolicy } from \"./policies/redirectPolicy.js\";\nimport { userAgentPolicy } from \"./policies/userAgentPolicy.js\";\nimport { multipartPolicy, multipartPolicyName } from \"./policies/multipartPolicy.js\";\nimport { decompressResponsePolicy } from \"./policies/decompressResponsePolicy.js\";\nimport { defaultRetryPolicy } from \"./policies/defaultRetryPolicy.js\";\nimport { formDataPolicy } from \"./policies/formDataPolicy.js\";\nimport { isNodeLike } from \"@azure/core-util\";\nimport { proxyPolicy } from \"./policies/proxyPolicy.js\";\nimport { setClientRequestIdPolicy } from \"./policies/setClientRequestIdPolicy.js\";\nimport { agentPolicy } from \"./policies/agentPolicy.js\";\nimport { tlsPolicy } from \"./policies/tlsPolicy.js\";\nimport { tracingPolicy } from \"./policies/tracingPolicy.js\";\n/**\n * Create a new pipeline with a default set of customizable policies.\n * @param options - Options to configure a custom pipeline.\n */\nexport function createPipelineFromOptions(options) {\n var _a;\n const pipeline = createEmptyPipeline();\n if (isNodeLike) {\n if (options.agent) {\n pipeline.addPolicy(agentPolicy(options.agent));\n }\n if (options.tlsOptions) {\n pipeline.addPolicy(tlsPolicy(options.tlsOptions));\n }\n pipeline.addPolicy(proxyPolicy(options.proxyOptions));\n pipeline.addPolicy(decompressResponsePolicy());\n }\n pipeline.addPolicy(formDataPolicy(), { beforePolicies: [multipartPolicyName] });\n pipeline.addPolicy(userAgentPolicy(options.userAgentOptions));\n pipeline.addPolicy(setClientRequestIdPolicy((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName));\n // The multipart policy is added after policies with no phase, so that\n // policies can be added between it and formDataPolicy to modify\n // properties (e.g., making the boundary constant in recorded tests).\n pipeline.addPolicy(multipartPolicy(), { afterPhase: \"Deserialize\" });\n pipeline.addPolicy(defaultRetryPolicy(options.retryOptions), { phase: \"Retry\" });\n pipeline.addPolicy(tracingPolicy(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), {\n afterPhase: \"Retry\",\n });\n if (isNodeLike) {\n // Both XHR and Fetch expect to handle redirects automatically,\n // so only include this policy when we're in Node.\n pipeline.addPolicy(redirectPolicy(options.redirectOptions), { afterPhase: \"Retry\" });\n }\n pipeline.addPolicy(logPolicy(options.loggingOptions), { afterPhase: \"Sign\" });\n return pipeline;\n}\n//# sourceMappingURL=createPipelineFromOptions.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { AbortError } from \"@azure/abort-controller\";\nimport { RestError } from \"./restError.js\";\nimport { createHttpHeaders } from \"./httpHeaders.js\";\nimport { isNodeReadableStream, isWebReadableStream } from \"./util/typeGuards.js\";\n/**\n * Checks if the body is a Blob or Blob-like\n */\nfunction isBlob(body) {\n // File objects count as a type of Blob, so we want to use instanceof explicitly\n return (typeof Blob === \"function\" || typeof Blob === \"object\") && body instanceof Blob;\n}\n/**\n * A HttpClient implementation that uses window.fetch to send HTTP requests.\n * @internal\n */\nclass FetchHttpClient {\n /**\n * Makes a request over an underlying transport layer and returns the response.\n * @param request - The request to be made.\n */\n async sendRequest(request) {\n const url = new URL(request.url);\n const isInsecure = url.protocol !== \"https:\";\n if (isInsecure && !request.allowInsecureConnection) {\n throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`);\n }\n if (request.proxySettings) {\n throw new Error(\"HTTP proxy is not supported in browser environment\");\n }\n try {\n return await makeRequest(request);\n }\n catch (e) {\n throw getError(e, request);\n }\n }\n}\n/**\n * Sends a request\n */\nasync function makeRequest(request) {\n const { abortController, abortControllerCleanup } = setupAbortSignal(request);\n try {\n const headers = buildFetchHeaders(request.headers);\n const { streaming, body: requestBody } = buildRequestBody(request);\n const requestInit = Object.assign(Object.assign({ body: requestBody, method: request.method, headers: headers, signal: abortController.signal }, (\"credentials\" in Request.prototype\n ? { credentials: request.withCredentials ? \"include\" : \"same-origin\" }\n : {})), (\"cache\" in Request.prototype ? { cache: \"no-store\" } : {}));\n // According to https://fetch.spec.whatwg.org/#fetch-method,\n // init.duplex must be set when body is a ReadableStream object.\n // currently \"half\" is the only valid value.\n if (streaming) {\n requestInit.duplex = \"half\";\n }\n /**\n * Developers of the future:\n * Do not set redirect: \"manual\" as part\n * of request options.\n * It will not work as you expect.\n */\n const response = await fetch(request.url, requestInit);\n // If we're uploading a blob, we need to fire the progress event manually\n if (isBlob(request.body) && request.onUploadProgress) {\n request.onUploadProgress({ loadedBytes: request.body.size });\n }\n return buildPipelineResponse(response, request, abortControllerCleanup);\n }\n catch (e) {\n abortControllerCleanup === null || abortControllerCleanup === void 0 ? void 0 : abortControllerCleanup();\n throw e;\n }\n}\n/**\n * Creates a pipeline response from a Fetch response;\n */\nasync function buildPipelineResponse(httpResponse, request, abortControllerCleanup) {\n var _a, _b;\n const headers = buildPipelineHeaders(httpResponse);\n const response = {\n request,\n headers,\n status: httpResponse.status,\n };\n const bodyStream = isWebReadableStream(httpResponse.body)\n ? buildBodyStream(httpResponse.body, {\n onProgress: request.onDownloadProgress,\n onEnd: abortControllerCleanup,\n })\n : httpResponse.body;\n if (\n // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code\n ((_a = request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(Number.POSITIVE_INFINITY)) ||\n ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(response.status))) {\n if (request.enableBrowserStreams) {\n response.browserStreamBody = bodyStream !== null && bodyStream !== void 0 ? bodyStream : undefined;\n }\n else {\n const responseStream = new Response(bodyStream);\n response.blobBody = responseStream.blob();\n abortControllerCleanup === null || abortControllerCleanup === void 0 ? void 0 : abortControllerCleanup();\n }\n }\n else {\n const responseStream = new Response(bodyStream);\n response.bodyAsText = await responseStream.text();\n abortControllerCleanup === null || abortControllerCleanup === void 0 ? void 0 : abortControllerCleanup();\n }\n return response;\n}\nfunction setupAbortSignal(request) {\n const abortController = new AbortController();\n // Cleanup function\n let abortControllerCleanup;\n /**\n * Attach an abort listener to the request\n */\n let abortListener;\n if (request.abortSignal) {\n if (request.abortSignal.aborted) {\n throw new AbortError(\"The operation was aborted.\");\n }\n abortListener = (event) => {\n if (event.type === \"abort\") {\n abortController.abort();\n }\n };\n request.abortSignal.addEventListener(\"abort\", abortListener);\n abortControllerCleanup = () => {\n var _a;\n if (abortListener) {\n (_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.removeEventListener(\"abort\", abortListener);\n }\n };\n }\n // If a timeout was passed, call the abort signal once the time elapses\n if (request.timeout > 0) {\n setTimeout(() => {\n abortController.abort();\n }, request.timeout);\n }\n return { abortController, abortControllerCleanup };\n}\n/**\n * Gets the specific error\n */\n// eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters\nfunction getError(e, request) {\n var _a;\n if (e && (e === null || e === void 0 ? void 0 : e.name) === \"AbortError\") {\n return e;\n }\n else {\n return new RestError(`Error sending request: ${e.message}`, {\n code: (_a = e === null || e === void 0 ? void 0 : e.code) !== null && _a !== void 0 ? _a : RestError.REQUEST_SEND_ERROR,\n request,\n });\n }\n}\n/**\n * Converts PipelineRequest headers to Fetch headers\n */\nfunction buildFetchHeaders(pipelineHeaders) {\n const headers = new Headers();\n for (const [name, value] of pipelineHeaders) {\n headers.append(name, value);\n }\n return headers;\n}\nfunction buildPipelineHeaders(httpResponse) {\n const responseHeaders = createHttpHeaders();\n for (const [name, value] of httpResponse.headers) {\n responseHeaders.set(name, value);\n }\n return responseHeaders;\n}\nfunction buildRequestBody(request) {\n const body = typeof request.body === \"function\" ? request.body() : request.body;\n if (isNodeReadableStream(body)) {\n throw new Error(\"Node streams are not supported in browser environment.\");\n }\n return isWebReadableStream(body)\n ? { streaming: true, body: buildBodyStream(body, { onProgress: request.onUploadProgress }) }\n : { streaming: false, body };\n}\n/**\n * Reads the request/response original stream and stream it through a new\n * ReadableStream, this is done to be able to report progress in a way that\n * all modern browsers support. TransformStreams would be an alternative,\n * however they are not yet supported by all browsers i.e Firefox\n */\nfunction buildBodyStream(readableStream, options = {}) {\n let loadedBytes = 0;\n const { onProgress, onEnd } = options;\n // If the current browser supports pipeThrough we use a TransformStream\n // to report progress\n if (isTransformStreamSupported(readableStream)) {\n return readableStream.pipeThrough(new TransformStream({\n transform(chunk, controller) {\n if (chunk === null) {\n controller.terminate();\n return;\n }\n controller.enqueue(chunk);\n loadedBytes += chunk.length;\n if (onProgress) {\n onProgress({ loadedBytes });\n }\n },\n flush() {\n onEnd === null || onEnd === void 0 ? void 0 : onEnd();\n },\n }));\n }\n else {\n // If we can't use transform streams, wrap the original stream in a new readable stream\n // and use pull to enqueue each chunk and report progress.\n const reader = readableStream.getReader();\n return new ReadableStream({\n async pull(controller) {\n var _a;\n const { done, value } = await reader.read();\n // When no more data needs to be consumed, break the reading\n if (done || !value) {\n onEnd === null || onEnd === void 0 ? void 0 : onEnd();\n // Close the stream\n controller.close();\n reader.releaseLock();\n return;\n }\n loadedBytes += (_a = value === null || value === void 0 ? void 0 : value.length) !== null && _a !== void 0 ? _a : 0;\n // Enqueue the next data chunk into our target stream\n controller.enqueue(value);\n if (onProgress) {\n onProgress({ loadedBytes });\n }\n },\n cancel(reason) {\n onEnd === null || onEnd === void 0 ? void 0 : onEnd();\n return reader.cancel(reason);\n },\n });\n }\n}\n/**\n * Create a new HttpClient instance for the browser environment.\n * @internal\n */\nexport function createFetchHttpClient() {\n return new FetchHttpClient();\n}\nfunction isTransformStreamSupported(readableStream) {\n return readableStream.pipeThrough !== undefined && self.TransformStream !== undefined;\n}\n//# sourceMappingURL=fetchHttpClient.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createFetchHttpClient } from \"./fetchHttpClient.js\";\n/**\n * Create the correct HttpClient for the current environment.\n */\nexport function createDefaultHttpClient() {\n return createFetchHttpClient();\n}\n//# sourceMappingURL=defaultHttpClient-browser.mjs.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createHttpHeaders } from \"./httpHeaders.js\";\nimport { randomUUID } from \"@azure/core-util\";\nclass PipelineRequestImpl {\n constructor(options) {\n var _a, _b, _c, _d, _e, _f, _g;\n this.url = options.url;\n this.body = options.body;\n this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : createHttpHeaders();\n this.method = (_b = options.method) !== null && _b !== void 0 ? _b : \"GET\";\n this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0;\n this.multipartBody = options.multipartBody;\n this.formData = options.formData;\n this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false;\n this.proxySettings = options.proxySettings;\n this.streamResponseStatusCodes = options.streamResponseStatusCodes;\n this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false;\n this.abortSignal = options.abortSignal;\n this.tracingOptions = options.tracingOptions;\n this.onUploadProgress = options.onUploadProgress;\n this.onDownloadProgress = options.onDownloadProgress;\n this.requestId = options.requestId || randomUUID();\n this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false;\n this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false;\n this.agent = options.agent;\n this.tlsSettings = options.tlsSettings;\n }\n}\n/**\n * Creates a new pipeline request with the given options.\n * This method is to allow for the easy setting of default values and not required.\n * @param options - The options to create the request with.\n */\nexport function createPipelineRequest(options) {\n return new PipelineRequestImpl(options);\n}\n//# sourceMappingURL=pipelineRequest.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { delay } from \"./helpers.js\";\n// Default options for the cycler if none are provided\nexport const DEFAULT_CYCLER_OPTIONS = {\n forcedRefreshWindowInMs: 1000, // Force waiting for a refresh 1s before the token expires\n retryIntervalInMs: 3000, // Allow refresh attempts every 3s\n refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry\n};\n/**\n * Converts an an unreliable access token getter (which may resolve with null)\n * into an AccessTokenGetter by retrying the unreliable getter in a regular\n * interval.\n *\n * @param getAccessToken - A function that produces a promise of an access token that may fail by returning null.\n * @param retryIntervalInMs - The time (in milliseconds) to wait between retry attempts.\n * @param refreshTimeout - The timestamp after which the refresh attempt will fail, throwing an exception.\n * @returns - A promise that, if it resolves, will resolve with an access token.\n */\nasync function beginRefresh(getAccessToken, retryIntervalInMs, refreshTimeout) {\n // This wrapper handles exceptions gracefully as long as we haven't exceeded\n // the timeout.\n async function tryGetAccessToken() {\n if (Date.now() < refreshTimeout) {\n try {\n return await getAccessToken();\n }\n catch (_a) {\n return null;\n }\n }\n else {\n const finalToken = await getAccessToken();\n // Timeout is up, so throw if it's still null\n if (finalToken === null) {\n throw new Error(\"Failed to refresh access token.\");\n }\n return finalToken;\n }\n }\n let token = await tryGetAccessToken();\n while (token === null) {\n await delay(retryIntervalInMs);\n token = await tryGetAccessToken();\n }\n return token;\n}\n/**\n * Creates a token cycler from a credential, scopes, and optional settings.\n *\n * A token cycler represents a way to reliably retrieve a valid access token\n * from a TokenCredential. It will handle initializing the token, refreshing it\n * when it nears expiration, and synchronizes refresh attempts to avoid\n * concurrency hazards.\n *\n * @param credential - the underlying TokenCredential that provides the access\n * token\n * @param tokenCyclerOptions - optionally override default settings for the cycler\n *\n * @returns - a function that reliably produces a valid access token\n */\nexport function createTokenCycler(credential, tokenCyclerOptions) {\n let refreshWorker = null;\n let token = null;\n let tenantId;\n const options = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions);\n /**\n * This little holder defines several predicates that we use to construct\n * the rules of refreshing the token.\n */\n const cycler = {\n /**\n * Produces true if a refresh job is currently in progress.\n */\n get isRefreshing() {\n return refreshWorker !== null;\n },\n /**\n * Produces true if the cycler SHOULD refresh (we are within the refresh\n * window and not already refreshing)\n */\n get shouldRefresh() {\n var _a;\n if (cycler.isRefreshing) {\n return false;\n }\n if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) {\n return true;\n }\n return ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now();\n },\n /**\n * Produces true if the cycler MUST refresh (null or nearly-expired\n * token).\n */\n get mustRefresh() {\n return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now());\n },\n };\n /**\n * Starts a refresh job or returns the existing job if one is already\n * running.\n */\n function refresh(scopes, getTokenOptions) {\n var _a;\n if (!cycler.isRefreshing) {\n // We bind `scopes` here to avoid passing it around a lot\n const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);\n // Take advantage of promise chaining to insert an assignment to `token`\n // before the refresh can be considered done.\n refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, \n // If we don't have a token, then we should timeout immediately\n (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())\n .then((_token) => {\n refreshWorker = null;\n token = _token;\n tenantId = getTokenOptions.tenantId;\n return token;\n })\n .catch((reason) => {\n // We also should reset the refresher if we enter a failed state. All\n // existing awaiters will throw, but subsequent requests will start a\n // new retry chain.\n refreshWorker = null;\n token = null;\n tenantId = undefined;\n throw reason;\n });\n }\n return refreshWorker;\n }\n return async (scopes, tokenOptions) => {\n //\n // Simple rules:\n // - If we MUST refresh, then return the refresh task, blocking\n // the pipeline until a token is available.\n // - If we SHOULD refresh, then run refresh but don't return it\n // (we can still use the cached token).\n // - Return the token, since it's fine if we didn't return in\n // step 1.\n //\n const hasClaimChallenge = Boolean(tokenOptions.claims);\n const tenantIdChanged = tenantId !== tokenOptions.tenantId;\n if (hasClaimChallenge) {\n // If we've received a claim, we know the existing token isn't valid\n // We want to clear it so that that refresh worker won't use the old expiration time as a timeout\n token = null;\n }\n // If the tenantId passed in token options is different to the one we have\n // Or if we are in claim challenge and the token was rejected and a new access token need to be issued, we need to\n // refresh the token with the new tenantId or token.\n const mustRefresh = tenantIdChanged || hasClaimChallenge || cycler.mustRefresh;\n if (mustRefresh) {\n return refresh(scopes, tokenOptions);\n }\n if (cycler.shouldRefresh) {\n refresh(scopes, tokenOptions);\n }\n return token;\n };\n}\n//# sourceMappingURL=tokenCycler.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createTokenCycler } from \"../util/tokenCycler.js\";\nimport { logger as coreLogger } from \"../log.js\";\nimport { isRestError } from \"../restError.js\";\n/**\n * The programmatic identifier of the bearerTokenAuthenticationPolicy.\n */\nexport const bearerTokenAuthenticationPolicyName = \"bearerTokenAuthenticationPolicy\";\n/**\n * Try to send the given request.\n *\n * When a response is received, returns a tuple of the response received and, if the response was received\n * inside a thrown RestError, the RestError that was thrown.\n *\n * Otherwise, if an error was thrown while sending the request that did not provide an underlying response, it\n * will be rethrown.\n */\nasync function trySendRequest(request, next) {\n try {\n return [await next(request), undefined];\n }\n catch (e) {\n if (isRestError(e) && e.response) {\n return [e.response, e];\n }\n else {\n throw e;\n }\n }\n}\n/**\n * Default authorize request handler\n */\nasync function defaultAuthorizeRequest(options) {\n const { scopes, getAccessToken, request } = options;\n // Enable CAE true by default\n const getTokenOptions = {\n abortSignal: request.abortSignal,\n tracingOptions: request.tracingOptions,\n enableCae: true,\n };\n const accessToken = await getAccessToken(scopes, getTokenOptions);\n if (accessToken) {\n options.request.headers.set(\"Authorization\", `Bearer ${accessToken.token}`);\n }\n}\n/**\n * We will retrieve the challenge only if the response status code was 401,\n * and if the response contained the header \"WWW-Authenticate\" with a non-empty value.\n */\nfunction isChallengeResponse(response) {\n return response.status === 401 && response.headers.has(\"WWW-Authenticate\");\n}\n/**\n * Re-authorize the request for CAE challenge.\n * The response containing the challenge is `options.response`.\n * If this method returns true, the underlying request will be sent once again.\n */\nasync function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) {\n var _a;\n const { scopes } = onChallengeOptions;\n const accessToken = await onChallengeOptions.getAccessToken(scopes, {\n enableCae: true,\n claims: caeClaims,\n });\n if (!accessToken) {\n return false;\n }\n onChallengeOptions.request.headers.set(\"Authorization\", `${(_a = accessToken.tokenType) !== null && _a !== void 0 ? _a : \"Bearer\"} ${accessToken.token}`);\n return true;\n}\n/**\n * A policy that can request a token from a TokenCredential implementation and\n * then apply it to the Authorization header of a request as a Bearer token.\n */\nexport function bearerTokenAuthenticationPolicy(options) {\n var _a, _b, _c;\n const { credential, scopes, challengeCallbacks } = options;\n const logger = options.logger || coreLogger;\n const callbacks = {\n authorizeRequest: (_b = (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) === null || _a === void 0 ? void 0 : _a.bind(challengeCallbacks)) !== null && _b !== void 0 ? _b : defaultAuthorizeRequest,\n authorizeRequestOnChallenge: (_c = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge) === null || _c === void 0 ? void 0 : _c.bind(challengeCallbacks),\n };\n // This function encapsulates the entire process of reliably retrieving the token\n // The options are left out of the public API until there's demand to configure this.\n // Remember to extend `BearerTokenAuthenticationPolicyOptions` with `TokenCyclerOptions`\n // in order to pass through the `options` object.\n const getAccessToken = credential\n ? createTokenCycler(credential /* , options */)\n : () => Promise.resolve(null);\n return {\n name: bearerTokenAuthenticationPolicyName,\n /**\n * If there's no challenge parameter:\n * - It will try to retrieve the token using the cache, or the credential's getToken.\n * - Then it will try the next policy with or without the retrieved token.\n *\n * It uses the challenge parameters to:\n * - Skip a first attempt to get the token from the credential if there's no cached token,\n * since it expects the token to be retrievable only after the challenge.\n * - Prepare the outgoing request if the `prepareRequest` method has been provided.\n * - Send an initial request to receive the challenge if it fails.\n * - Process a challenge if the response contains it.\n * - Retrieve a token with the challenge information, then re-send the request.\n */\n async sendRequest(request, next) {\n if (!request.url.toLowerCase().startsWith(\"https://\")) {\n throw new Error(\"Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.\");\n }\n await callbacks.authorizeRequest({\n scopes: Array.isArray(scopes) ? scopes : [scopes],\n request,\n getAccessToken,\n logger,\n });\n let response;\n let error;\n let shouldSendRequest;\n [response, error] = await trySendRequest(request, next);\n if (isChallengeResponse(response)) {\n let claims = getCaeChallengeClaims(response.headers.get(\"WWW-Authenticate\"));\n // Handle CAE by default when receive CAE claim\n if (claims) {\n let parsedClaim;\n // Return the response immediately if claims is not a valid base64 encoded string\n try {\n parsedClaim = atob(claims);\n }\n catch (e) {\n logger.warning(`The WWW-Authenticate header contains \"claims\" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`);\n return response;\n }\n shouldSendRequest = await authorizeRequestOnCaeChallenge({\n scopes: Array.isArray(scopes) ? scopes : [scopes],\n response,\n request,\n getAccessToken,\n logger,\n }, parsedClaim);\n // Send updated request and handle response for RestError\n if (shouldSendRequest) {\n [response, error] = await trySendRequest(request, next);\n }\n }\n else if (callbacks.authorizeRequestOnChallenge) {\n // Handle custom challenges when client provides custom callback\n shouldSendRequest = await callbacks.authorizeRequestOnChallenge({\n scopes: Array.isArray(scopes) ? scopes : [scopes],\n request,\n response,\n getAccessToken,\n logger,\n });\n // Send updated request and handle response for RestError\n if (shouldSendRequest) {\n [response, error] = await trySendRequest(request, next);\n }\n // If we get another CAE Claim, we will handle it by default and return whatever value we receive for this\n if (isChallengeResponse(response)) {\n claims = getCaeChallengeClaims(response.headers.get(\"WWW-Authenticate\"));\n if (claims) {\n let parsedClaim;\n try {\n parsedClaim = atob(claims);\n }\n catch (e) {\n logger.warning(`The WWW-Authenticate header contains \"claims\" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`);\n return response;\n }\n shouldSendRequest = await authorizeRequestOnCaeChallenge({\n scopes: Array.isArray(scopes) ? scopes : [scopes],\n response,\n request,\n getAccessToken,\n logger,\n }, parsedClaim);\n // Send updated request and handle response for RestError\n if (shouldSendRequest) {\n [response, error] = await trySendRequest(request, next);\n }\n }\n }\n }\n }\n if (error) {\n throw error;\n }\n else {\n return response;\n }\n },\n };\n}\n/**\n * Converts: `Bearer a=\"b\", c=\"d\", Pop e=\"f\", g=\"h\"`.\n * Into: `[ { scheme: 'Bearer', params: { a: 'b', c: 'd' } }, { scheme: 'Pop', params: { e: 'f', g: 'h' } } ]`.\n *\n * @internal\n */\nexport function parseChallenges(challenges) {\n // Challenge regex seperates the string to individual challenges with different schemes in the format `Scheme a=\"b\", c=d`\n // The challenge regex captures parameteres with either quotes values or unquoted values\n const challengeRegex = /(\\w+)\\s+((?:\\w+=(?:\"[^\"]*\"|[^,]*),?\\s*)+)/g;\n // Parameter regex captures the claims group removed from the scheme in the format `a=\"b\"` and `c=\"d\"`\n // CAE challenge always have quoted parameters. For more reference, https://learn.microsoft.com/entra/identity-platform/claims-challenge\n const paramRegex = /(\\w+)=\"([^\"]*)\"/g;\n const parsedChallenges = [];\n let match;\n // Iterate over each challenge match\n while ((match = challengeRegex.exec(challenges)) !== null) {\n const scheme = match[1];\n const paramsString = match[2];\n const params = {};\n let paramMatch;\n // Iterate over each parameter match\n while ((paramMatch = paramRegex.exec(paramsString)) !== null) {\n params[paramMatch[1]] = paramMatch[2];\n }\n parsedChallenges.push({ scheme, params });\n }\n return parsedChallenges;\n}\n/**\n * Parse a pipeline response and look for a CAE challenge with \"Bearer\" scheme\n * Return the value in the header without parsing the challenge\n * @internal\n */\nfunction getCaeChallengeClaims(challenges) {\n var _a;\n if (!challenges) {\n return;\n }\n // Find all challenges present in the header\n const parsedChallenges = parseChallenges(challenges);\n return (_a = parsedChallenges.find((x) => x.scheme === \"Bearer\" && x.params.claims && x.params.error === \"insufficient_claims\")) === null || _a === void 0 ? void 0 : _a.params.claims;\n}\n//# sourceMappingURL=bearerTokenAuthenticationPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Encodes a string in base64 format.\n * @param value - the string to encode\n * @internal\n */\nexport function encodeString(value) {\n return btoa(value);\n}\n/**\n * Encodes a byte array in base64 format.\n * @param value - the Uint8Aray to encode\n * @internal\n */\nexport function encodeByteArray(value) {\n let str = \"\";\n for (let i = 0; i < value.length; i++) {\n str += String.fromCharCode(value[i]);\n }\n return btoa(str);\n}\n/**\n * Decodes a base64 string into a byte array.\n * @param value - the base64 string to decode\n * @internal\n */\nexport function decodeString(value) {\n const byteString = atob(value);\n const arr = new Uint8Array(byteString.length);\n for (let i = 0; i < byteString.length; i++) {\n arr[i] = byteString.charCodeAt(i);\n }\n return arr;\n}\n/**\n * Decodes a base64 string into a string.\n * @param value - the base64 string to decode\n * @internal\n */\nexport function decodeStringToString(value) {\n return atob(value);\n}\n//# sourceMappingURL=base64-browser.mjs.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Default key used to access the XML attributes.\n */\nexport const XML_ATTRKEY = \"$\";\n/**\n * Default key used to access the XML value content.\n */\nexport const XML_CHARKEY = \"_\";\n//# sourceMappingURL=interfaces.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * A type guard for a primitive response body.\n * @param value - Value to test\n *\n * @internal\n */\nexport function isPrimitiveBody(value, mapperTypeName) {\n return (mapperTypeName !== \"Composite\" &&\n mapperTypeName !== \"Dictionary\" &&\n (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\" ||\n (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !==\n null ||\n value === undefined ||\n value === null));\n}\nconst validateISODuration = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n/**\n * Returns true if the given string is in ISO 8601 format.\n * @param value - The value to be validated for ISO 8601 duration format.\n * @internal\n */\nexport function isDuration(value) {\n return validateISODuration.test(value);\n}\nconst validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;\n/**\n * Returns true if the provided uuid is valid.\n *\n * @param uuid - The uuid that needs to be validated.\n *\n * @internal\n */\nexport function isValidUuid(uuid) {\n return validUuidRegex.test(uuid);\n}\n/**\n * Maps the response as follows:\n * - wraps the response body if needed (typically if its type is primitive).\n * - returns null if the combination of the headers and the body is empty.\n * - otherwise, returns the combination of the headers and the body.\n *\n * @param responseObject - a representation of the parsed response\n * @returns the response that will be returned to the user which can be null and/or wrapped\n *\n * @internal\n */\nfunction handleNullableResponseAndWrappableBody(responseObject) {\n const combinedHeadersAndBody = Object.assign(Object.assign({}, responseObject.headers), responseObject.body);\n if (responseObject.hasNullableType &&\n Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) {\n return responseObject.shouldWrapBody ? { body: null } : null;\n }\n else {\n return responseObject.shouldWrapBody\n ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody;\n }\n}\n/**\n * Take a `FullOperationResponse` and turn it into a flat\n * response object to hand back to the consumer.\n * @param fullResponse - The processed response from the operation request\n * @param responseSpec - The response map from the OperationSpec\n *\n * @internal\n */\nexport function flattenResponse(fullResponse, responseSpec) {\n var _a, _b;\n const parsedHeaders = fullResponse.parsedHeaders;\n // head methods never have a body, but we return a boolean set to body property\n // to indicate presence/absence of the resource\n if (fullResponse.request.method === \"HEAD\") {\n return Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody });\n }\n const bodyMapper = responseSpec && responseSpec.bodyMapper;\n const isNullable = Boolean(bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.nullable);\n const expectedBodyTypeName = bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.type.name;\n /** If the body is asked for, we look at the expected body type to handle it */\n if (expectedBodyTypeName === \"Stream\") {\n return Object.assign(Object.assign({}, parsedHeaders), { blobBody: fullResponse.blobBody, readableStreamBody: fullResponse.readableStreamBody });\n }\n const modelProperties = (expectedBodyTypeName === \"Composite\" &&\n bodyMapper.type.modelProperties) ||\n {};\n const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === \"\");\n if (expectedBodyTypeName === \"Sequence\" || isPageableResponse) {\n const arrayResponse = (_a = fullResponse.parsedBody) !== null && _a !== void 0 ? _a : [];\n for (const key of Object.keys(modelProperties)) {\n if (modelProperties[key].serializedName) {\n arrayResponse[key] = (_b = fullResponse.parsedBody) === null || _b === void 0 ? void 0 : _b[key];\n }\n }\n if (parsedHeaders) {\n for (const key of Object.keys(parsedHeaders)) {\n arrayResponse[key] = parsedHeaders[key];\n }\n }\n return isNullable &&\n !fullResponse.parsedBody &&\n !parsedHeaders &&\n Object.getOwnPropertyNames(modelProperties).length === 0\n ? null\n : arrayResponse;\n }\n return handleNullableResponseAndWrappableBody({\n body: fullResponse.parsedBody,\n headers: parsedHeaders,\n hasNullableType: isNullable,\n shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName),\n });\n}\n//# sourceMappingURL=utils.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport * as base64 from \"./base64.js\";\nimport { XML_ATTRKEY, XML_CHARKEY, } from \"./interfaces.js\";\nimport { isDuration, isValidUuid } from \"./utils.js\";\nclass SerializerImpl {\n constructor(modelMappers = {}, isXML = false) {\n this.modelMappers = modelMappers;\n this.isXML = isXML;\n }\n /**\n * @deprecated Removing the constraints validation on client side.\n */\n validateConstraints(mapper, value, objectName) {\n const failValidation = (constraintName, constraintValue) => {\n throw new Error(`\"${objectName}\" with value \"${value}\" should satisfy the constraint \"${constraintName}\": ${constraintValue}.`);\n };\n if (mapper.constraints && value !== undefined && value !== null) {\n const { ExclusiveMaximum, ExclusiveMinimum, InclusiveMaximum, InclusiveMinimum, MaxItems, MaxLength, MinItems, MinLength, MultipleOf, Pattern, UniqueItems, } = mapper.constraints;\n if (ExclusiveMaximum !== undefined && value >= ExclusiveMaximum) {\n failValidation(\"ExclusiveMaximum\", ExclusiveMaximum);\n }\n if (ExclusiveMinimum !== undefined && value <= ExclusiveMinimum) {\n failValidation(\"ExclusiveMinimum\", ExclusiveMinimum);\n }\n if (InclusiveMaximum !== undefined && value > InclusiveMaximum) {\n failValidation(\"InclusiveMaximum\", InclusiveMaximum);\n }\n if (InclusiveMinimum !== undefined && value < InclusiveMinimum) {\n failValidation(\"InclusiveMinimum\", InclusiveMinimum);\n }\n if (MaxItems !== undefined && value.length > MaxItems) {\n failValidation(\"MaxItems\", MaxItems);\n }\n if (MaxLength !== undefined && value.length > MaxLength) {\n failValidation(\"MaxLength\", MaxLength);\n }\n if (MinItems !== undefined && value.length < MinItems) {\n failValidation(\"MinItems\", MinItems);\n }\n if (MinLength !== undefined && value.length < MinLength) {\n failValidation(\"MinLength\", MinLength);\n }\n if (MultipleOf !== undefined && value % MultipleOf !== 0) {\n failValidation(\"MultipleOf\", MultipleOf);\n }\n if (Pattern) {\n const pattern = typeof Pattern === \"string\" ? new RegExp(Pattern) : Pattern;\n if (typeof value !== \"string\" || value.match(pattern) === null) {\n failValidation(\"Pattern\", Pattern);\n }\n }\n if (UniqueItems &&\n value.some((item, i, ar) => ar.indexOf(item) !== i)) {\n failValidation(\"UniqueItems\", UniqueItems);\n }\n }\n }\n /**\n * Serialize the given object based on its metadata defined in the mapper\n *\n * @param mapper - The mapper which defines the metadata of the serializable object\n *\n * @param object - A valid Javascript object to be serialized\n *\n * @param objectName - Name of the serialized object\n *\n * @param options - additional options to serialization\n *\n * @returns A valid serialized Javascript object\n */\n serialize(mapper, object, objectName, options = { xml: {} }) {\n var _a, _b, _c;\n const updatedOptions = {\n xml: {\n rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : \"\",\n includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false,\n xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY,\n },\n };\n let payload = {};\n const mapperType = mapper.type.name;\n if (!objectName) {\n objectName = mapper.serializedName;\n }\n if (mapperType.match(/^Sequence$/i) !== null) {\n payload = [];\n }\n if (mapper.isConstant) {\n object = mapper.defaultValue;\n }\n // This table of allowed values should help explain\n // the mapper.required and mapper.nullable properties.\n // X means \"neither undefined or null are allowed\".\n // || required\n // || true | false\n // nullable || ==========================\n // true || null | undefined/null\n // false || X | undefined\n // undefined || X | undefined/null\n const { required, nullable } = mapper;\n if (required && nullable && object === undefined) {\n throw new Error(`${objectName} cannot be undefined.`);\n }\n if (required && !nullable && (object === undefined || object === null)) {\n throw new Error(`${objectName} cannot be null or undefined.`);\n }\n if (!required && nullable === false && object === null) {\n throw new Error(`${objectName} cannot be null.`);\n }\n if (object === undefined || object === null) {\n payload = object;\n }\n else {\n if (mapperType.match(/^any$/i) !== null) {\n payload = object;\n }\n else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i) !== null) {\n payload = serializeBasicTypes(mapperType, objectName, object);\n }\n else if (mapperType.match(/^Enum$/i) !== null) {\n const enumMapper = mapper;\n payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object);\n }\n else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i) !== null) {\n payload = serializeDateTypes(mapperType, object, objectName);\n }\n else if (mapperType.match(/^ByteArray$/i) !== null) {\n payload = serializeByteArrayType(objectName, object);\n }\n else if (mapperType.match(/^Base64Url$/i) !== null) {\n payload = serializeBase64UrlType(objectName, object);\n }\n else if (mapperType.match(/^Sequence$/i) !== null) {\n payload = serializeSequenceType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions);\n }\n else if (mapperType.match(/^Dictionary$/i) !== null) {\n payload = serializeDictionaryType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions);\n }\n else if (mapperType.match(/^Composite$/i) !== null) {\n payload = serializeCompositeType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions);\n }\n }\n return payload;\n }\n /**\n * Deserialize the given object based on its metadata defined in the mapper\n *\n * @param mapper - The mapper which defines the metadata of the serializable object\n *\n * @param responseBody - A valid Javascript entity to be deserialized\n *\n * @param objectName - Name of the deserialized object\n *\n * @param options - Controls behavior of XML parser and builder.\n *\n * @returns A valid deserialized Javascript object\n */\n deserialize(mapper, responseBody, objectName, options = { xml: {} }) {\n var _a, _b, _c, _d;\n const updatedOptions = {\n xml: {\n rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : \"\",\n includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false,\n xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY,\n },\n ignoreUnknownProperties: (_d = options.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false,\n };\n if (responseBody === undefined || responseBody === null) {\n if (this.isXML && mapper.type.name === \"Sequence\" && !mapper.xmlIsWrapped) {\n // Edge case for empty XML non-wrapped lists. xml2js can't distinguish\n // between the list being empty versus being missing,\n // so let's do the more user-friendly thing and return an empty list.\n responseBody = [];\n }\n // specifically check for undefined as default value can be a falsey value `0, \"\", false, null`\n if (mapper.defaultValue !== undefined) {\n responseBody = mapper.defaultValue;\n }\n return responseBody;\n }\n let payload;\n const mapperType = mapper.type.name;\n if (!objectName) {\n objectName = mapper.serializedName;\n }\n if (mapperType.match(/^Composite$/i) !== null) {\n payload = deserializeCompositeType(this, mapper, responseBody, objectName, updatedOptions);\n }\n else {\n if (this.isXML) {\n const xmlCharKey = updatedOptions.xml.xmlCharKey;\n /**\n * If the mapper specifies this as a non-composite type value but the responseBody contains\n * both header (\"$\" i.e., XML_ATTRKEY) and body (\"#\" i.e., XML_CHARKEY) properties,\n * then just reduce the responseBody value to the body (\"#\" i.e., XML_CHARKEY) property.\n */\n if (responseBody[XML_ATTRKEY] !== undefined && responseBody[xmlCharKey] !== undefined) {\n responseBody = responseBody[xmlCharKey];\n }\n }\n if (mapperType.match(/^Number$/i) !== null) {\n payload = parseFloat(responseBody);\n if (isNaN(payload)) {\n payload = responseBody;\n }\n }\n else if (mapperType.match(/^Boolean$/i) !== null) {\n if (responseBody === \"true\") {\n payload = true;\n }\n else if (responseBody === \"false\") {\n payload = false;\n }\n else {\n payload = responseBody;\n }\n }\n else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i) !== null) {\n payload = responseBody;\n }\n else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/i) !== null) {\n payload = new Date(responseBody);\n }\n else if (mapperType.match(/^UnixTime$/i) !== null) {\n payload = unixTimeToDate(responseBody);\n }\n else if (mapperType.match(/^ByteArray$/i) !== null) {\n payload = base64.decodeString(responseBody);\n }\n else if (mapperType.match(/^Base64Url$/i) !== null) {\n payload = base64UrlToByteArray(responseBody);\n }\n else if (mapperType.match(/^Sequence$/i) !== null) {\n payload = deserializeSequenceType(this, mapper, responseBody, objectName, updatedOptions);\n }\n else if (mapperType.match(/^Dictionary$/i) !== null) {\n payload = deserializeDictionaryType(this, mapper, responseBody, objectName, updatedOptions);\n }\n }\n if (mapper.isConstant) {\n payload = mapper.defaultValue;\n }\n return payload;\n }\n}\n/**\n * Method that creates and returns a Serializer.\n * @param modelMappers - Known models to map\n * @param isXML - If XML should be supported\n */\nexport function createSerializer(modelMappers = {}, isXML = false) {\n return new SerializerImpl(modelMappers, isXML);\n}\nfunction trimEnd(str, ch) {\n let len = str.length;\n while (len - 1 >= 0 && str[len - 1] === ch) {\n --len;\n }\n return str.substr(0, len);\n}\nfunction bufferToBase64Url(buffer) {\n if (!buffer) {\n return undefined;\n }\n if (!(buffer instanceof Uint8Array)) {\n throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`);\n }\n // Uint8Array to Base64.\n const str = base64.encodeByteArray(buffer);\n // Base64 to Base64Url.\n return trimEnd(str, \"=\").replace(/\\+/g, \"-\").replace(/\\//g, \"_\");\n}\nfunction base64UrlToByteArray(str) {\n if (!str) {\n return undefined;\n }\n if (str && typeof str.valueOf() !== \"string\") {\n throw new Error(\"Please provide an input of type string for converting to Uint8Array\");\n }\n // Base64Url to Base64.\n str = str.replace(/-/g, \"+\").replace(/_/g, \"/\");\n // Base64 to Uint8Array.\n return base64.decodeString(str);\n}\nfunction splitSerializeName(prop) {\n const classes = [];\n let partialclass = \"\";\n if (prop) {\n const subwords = prop.split(\".\");\n for (const item of subwords) {\n if (item.charAt(item.length - 1) === \"\\\\\") {\n partialclass += item.substr(0, item.length - 1) + \".\";\n }\n else {\n partialclass += item;\n classes.push(partialclass);\n partialclass = \"\";\n }\n }\n }\n return classes;\n}\nfunction dateToUnixTime(d) {\n if (!d) {\n return undefined;\n }\n if (typeof d.valueOf() === \"string\") {\n d = new Date(d);\n }\n return Math.floor(d.getTime() / 1000);\n}\nfunction unixTimeToDate(n) {\n if (!n) {\n return undefined;\n }\n return new Date(n * 1000);\n}\nfunction serializeBasicTypes(typeName, objectName, value) {\n if (value !== null && value !== undefined) {\n if (typeName.match(/^Number$/i) !== null) {\n if (typeof value !== \"number\") {\n throw new Error(`${objectName} with value ${value} must be of type number.`);\n }\n }\n else if (typeName.match(/^String$/i) !== null) {\n if (typeof value.valueOf() !== \"string\") {\n throw new Error(`${objectName} with value \"${value}\" must be of type string.`);\n }\n }\n else if (typeName.match(/^Uuid$/i) !== null) {\n if (!(typeof value.valueOf() === \"string\" && isValidUuid(value))) {\n throw new Error(`${objectName} with value \"${value}\" must be of type string and a valid uuid.`);\n }\n }\n else if (typeName.match(/^Boolean$/i) !== null) {\n if (typeof value !== \"boolean\") {\n throw new Error(`${objectName} with value ${value} must be of type boolean.`);\n }\n }\n else if (typeName.match(/^Stream$/i) !== null) {\n const objectType = typeof value;\n if (objectType !== \"string\" &&\n typeof value.pipe !== \"function\" && // NodeJS.ReadableStream\n typeof value.tee !== \"function\" && // browser ReadableStream\n !(value instanceof ArrayBuffer) &&\n !ArrayBuffer.isView(value) &&\n // File objects count as a type of Blob, so we want to use instanceof explicitly\n !((typeof Blob === \"function\" || typeof Blob === \"object\") && value instanceof Blob) &&\n objectType !== \"function\") {\n throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`);\n }\n }\n }\n return value;\n}\nfunction serializeEnumType(objectName, allowedValues, value) {\n if (!allowedValues) {\n throw new Error(`Please provide a set of allowedValues to validate ${objectName} as an Enum Type.`);\n }\n const isPresent = allowedValues.some((item) => {\n if (typeof item.valueOf() === \"string\") {\n return item.toLowerCase() === value.toLowerCase();\n }\n return item === value;\n });\n if (!isPresent) {\n throw new Error(`${value} is not a valid value for ${objectName}. The valid values are: ${JSON.stringify(allowedValues)}.`);\n }\n return value;\n}\nfunction serializeByteArrayType(objectName, value) {\n if (value !== undefined && value !== null) {\n if (!(value instanceof Uint8Array)) {\n throw new Error(`${objectName} must be of type Uint8Array.`);\n }\n value = base64.encodeByteArray(value);\n }\n return value;\n}\nfunction serializeBase64UrlType(objectName, value) {\n if (value !== undefined && value !== null) {\n if (!(value instanceof Uint8Array)) {\n throw new Error(`${objectName} must be of type Uint8Array.`);\n }\n value = bufferToBase64Url(value);\n }\n return value;\n}\nfunction serializeDateTypes(typeName, value, objectName) {\n if (value !== undefined && value !== null) {\n if (typeName.match(/^Date$/i) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`);\n }\n value =\n value instanceof Date\n ? value.toISOString().substring(0, 10)\n : new Date(value).toISOString().substring(0, 10);\n }\n else if (typeName.match(/^DateTime$/i) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`);\n }\n value = value instanceof Date ? value.toISOString() : new Date(value).toISOString();\n }\n else if (typeName.match(/^DateTimeRfc1123$/i) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123 format.`);\n }\n value = value instanceof Date ? value.toUTCString() : new Date(value).toUTCString();\n }\n else if (typeName.match(/^UnixTime$/i) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123/ISO8601 format ` +\n `for it to be serialized in UnixTime/Epoch format.`);\n }\n value = dateToUnixTime(value);\n }\n else if (typeName.match(/^TimeSpan$/i) !== null) {\n if (!isDuration(value)) {\n throw new Error(`${objectName} must be a string in ISO 8601 format. Instead was \"${value}\".`);\n }\n }\n }\n return value;\n}\nfunction serializeSequenceType(serializer, mapper, object, objectName, isXml, options) {\n var _a;\n if (!Array.isArray(object)) {\n throw new Error(`${objectName} must be of type Array.`);\n }\n let elementType = mapper.type.element;\n if (!elementType || typeof elementType !== \"object\") {\n throw new Error(`element\" metadata for an Array must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}.`);\n }\n // Quirk: Composite mappers referenced by `element` might\n // not have *all* properties declared (like uberParent),\n // so let's try to look up the full definition by name.\n if (elementType.type.name === \"Composite\" && elementType.type.className) {\n elementType = (_a = serializer.modelMappers[elementType.type.className]) !== null && _a !== void 0 ? _a : elementType;\n }\n const tempArray = [];\n for (let i = 0; i < object.length; i++) {\n const serializedValue = serializer.serialize(elementType, object[i], objectName, options);\n if (isXml && elementType.xmlNamespace) {\n const xmlnsKey = elementType.xmlNamespacePrefix\n ? `xmlns:${elementType.xmlNamespacePrefix}`\n : \"xmlns\";\n if (elementType.type.name === \"Composite\") {\n tempArray[i] = Object.assign({}, serializedValue);\n tempArray[i][XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace };\n }\n else {\n tempArray[i] = {};\n tempArray[i][options.xml.xmlCharKey] = serializedValue;\n tempArray[i][XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace };\n }\n }\n else {\n tempArray[i] = serializedValue;\n }\n }\n return tempArray;\n}\nfunction serializeDictionaryType(serializer, mapper, object, objectName, isXml, options) {\n if (typeof object !== \"object\") {\n throw new Error(`${objectName} must be of type object.`);\n }\n const valueType = mapper.type.value;\n if (!valueType || typeof valueType !== \"object\") {\n throw new Error(`\"value\" metadata for a Dictionary must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}.`);\n }\n const tempDictionary = {};\n for (const key of Object.keys(object)) {\n const serializedValue = serializer.serialize(valueType, object[key], objectName, options);\n // If the element needs an XML namespace we need to add it within the $ property\n tempDictionary[key] = getXmlObjectValue(valueType, serializedValue, isXml, options);\n }\n // Add the namespace to the root element if needed\n if (isXml && mapper.xmlNamespace) {\n const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : \"xmlns\";\n const result = tempDictionary;\n result[XML_ATTRKEY] = { [xmlnsKey]: mapper.xmlNamespace };\n return result;\n }\n return tempDictionary;\n}\n/**\n * Resolves the additionalProperties property from a referenced mapper\n * @param serializer - the serializer containing the entire set of mappers\n * @param mapper - the composite mapper to resolve\n * @param objectName - name of the object being serialized\n */\nfunction resolveAdditionalProperties(serializer, mapper, objectName) {\n const additionalProperties = mapper.type.additionalProperties;\n if (!additionalProperties && mapper.type.className) {\n const modelMapper = resolveReferencedMapper(serializer, mapper, objectName);\n return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties;\n }\n return additionalProperties;\n}\n/**\n * Finds the mapper referenced by className\n * @param serializer - the serializer containing the entire set of mappers\n * @param mapper - the composite mapper to resolve\n * @param objectName - name of the object being serialized\n */\nfunction resolveReferencedMapper(serializer, mapper, objectName) {\n const className = mapper.type.className;\n if (!className) {\n throw new Error(`Class name for model \"${objectName}\" is not provided in the mapper \"${JSON.stringify(mapper, undefined, 2)}\".`);\n }\n return serializer.modelMappers[className];\n}\n/**\n * Resolves a composite mapper's modelProperties.\n * @param serializer - the serializer containing the entire set of mappers\n * @param mapper - the composite mapper to resolve\n */\nfunction resolveModelProperties(serializer, mapper, objectName) {\n let modelProps = mapper.type.modelProperties;\n if (!modelProps) {\n const modelMapper = resolveReferencedMapper(serializer, mapper, objectName);\n if (!modelMapper) {\n throw new Error(`mapper() cannot be null or undefined for model \"${mapper.type.className}\".`);\n }\n modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties;\n if (!modelProps) {\n throw new Error(`modelProperties cannot be null or undefined in the ` +\n `mapper \"${JSON.stringify(modelMapper)}\" of type \"${mapper.type.className}\" for object \"${objectName}\".`);\n }\n }\n return modelProps;\n}\nfunction serializeCompositeType(serializer, mapper, object, objectName, isXml, options) {\n if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) {\n mapper = getPolymorphicMapper(serializer, mapper, object, \"clientName\");\n }\n if (object !== undefined && object !== null) {\n const payload = {};\n const modelProps = resolveModelProperties(serializer, mapper, objectName);\n for (const key of Object.keys(modelProps)) {\n const propertyMapper = modelProps[key];\n if (propertyMapper.readOnly) {\n continue;\n }\n let propName;\n let parentObject = payload;\n if (serializer.isXML) {\n if (propertyMapper.xmlIsWrapped) {\n propName = propertyMapper.xmlName;\n }\n else {\n propName = propertyMapper.xmlElementName || propertyMapper.xmlName;\n }\n }\n else {\n const paths = splitSerializeName(propertyMapper.serializedName);\n propName = paths.pop();\n for (const pathName of paths) {\n const childObject = parentObject[pathName];\n if ((childObject === undefined || childObject === null) &&\n ((object[key] !== undefined && object[key] !== null) ||\n propertyMapper.defaultValue !== undefined)) {\n parentObject[pathName] = {};\n }\n parentObject = parentObject[pathName];\n }\n }\n if (parentObject !== undefined && parentObject !== null) {\n if (isXml && mapper.xmlNamespace) {\n const xmlnsKey = mapper.xmlNamespacePrefix\n ? `xmlns:${mapper.xmlNamespacePrefix}`\n : \"xmlns\";\n parentObject[XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace });\n }\n const propertyObjectName = propertyMapper.serializedName !== \"\"\n ? objectName + \".\" + propertyMapper.serializedName\n : objectName;\n let toSerialize = object[key];\n const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper);\n if (polymorphicDiscriminator &&\n polymorphicDiscriminator.clientName === key &&\n (toSerialize === undefined || toSerialize === null)) {\n toSerialize = mapper.serializedName;\n }\n const serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName, options);\n if (serializedValue !== undefined && propName !== undefined && propName !== null) {\n const value = getXmlObjectValue(propertyMapper, serializedValue, isXml, options);\n if (isXml && propertyMapper.xmlIsAttribute) {\n // XML_ATTRKEY, i.e., $ is the key attributes are kept under in xml2js.\n // This keeps things simple while preventing name collision\n // with names in user documents.\n parentObject[XML_ATTRKEY] = parentObject[XML_ATTRKEY] || {};\n parentObject[XML_ATTRKEY][propName] = serializedValue;\n }\n else if (isXml && propertyMapper.xmlIsWrapped) {\n parentObject[propName] = { [propertyMapper.xmlElementName]: value };\n }\n else {\n parentObject[propName] = value;\n }\n }\n }\n }\n const additionalPropertiesMapper = resolveAdditionalProperties(serializer, mapper, objectName);\n if (additionalPropertiesMapper) {\n const propNames = Object.keys(modelProps);\n for (const clientPropName in object) {\n const isAdditionalProperty = propNames.every((pn) => pn !== clientPropName);\n if (isAdditionalProperty) {\n payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '[\"' + clientPropName + '\"]', options);\n }\n }\n }\n return payload;\n }\n return object;\n}\nfunction getXmlObjectValue(propertyMapper, serializedValue, isXml, options) {\n if (!isXml || !propertyMapper.xmlNamespace) {\n return serializedValue;\n }\n const xmlnsKey = propertyMapper.xmlNamespacePrefix\n ? `xmlns:${propertyMapper.xmlNamespacePrefix}`\n : \"xmlns\";\n const xmlNamespace = { [xmlnsKey]: propertyMapper.xmlNamespace };\n if ([\"Composite\"].includes(propertyMapper.type.name)) {\n if (serializedValue[XML_ATTRKEY]) {\n return serializedValue;\n }\n else {\n const result = Object.assign({}, serializedValue);\n result[XML_ATTRKEY] = xmlNamespace;\n return result;\n }\n }\n const result = {};\n result[options.xml.xmlCharKey] = serializedValue;\n result[XML_ATTRKEY] = xmlNamespace;\n return result;\n}\nfunction isSpecialXmlProperty(propertyName, options) {\n return [XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName);\n}\nfunction deserializeCompositeType(serializer, mapper, responseBody, objectName, options) {\n var _a, _b;\n const xmlCharKey = (_a = options.xml.xmlCharKey) !== null && _a !== void 0 ? _a : XML_CHARKEY;\n if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) {\n mapper = getPolymorphicMapper(serializer, mapper, responseBody, \"serializedName\");\n }\n const modelProps = resolveModelProperties(serializer, mapper, objectName);\n let instance = {};\n const handledPropertyNames = [];\n for (const key of Object.keys(modelProps)) {\n const propertyMapper = modelProps[key];\n const paths = splitSerializeName(modelProps[key].serializedName);\n handledPropertyNames.push(paths[0]);\n const { serializedName, xmlName, xmlElementName } = propertyMapper;\n let propertyObjectName = objectName;\n if (serializedName !== \"\" && serializedName !== undefined) {\n propertyObjectName = objectName + \".\" + serializedName;\n }\n const headerCollectionPrefix = propertyMapper.headerCollectionPrefix;\n if (headerCollectionPrefix) {\n const dictionary = {};\n for (const headerKey of Object.keys(responseBody)) {\n if (headerKey.startsWith(headerCollectionPrefix)) {\n dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize(propertyMapper.type.value, responseBody[headerKey], propertyObjectName, options);\n }\n handledPropertyNames.push(headerKey);\n }\n instance[key] = dictionary;\n }\n else if (serializer.isXML) {\n if (propertyMapper.xmlIsAttribute && responseBody[XML_ATTRKEY]) {\n instance[key] = serializer.deserialize(propertyMapper, responseBody[XML_ATTRKEY][xmlName], propertyObjectName, options);\n }\n else if (propertyMapper.xmlIsMsText) {\n if (responseBody[xmlCharKey] !== undefined) {\n instance[key] = responseBody[xmlCharKey];\n }\n else if (typeof responseBody === \"string\") {\n // The special case where xml parser parses \"content\" into JSON of\n // `{ name: \"content\"}` instead of `{ name: { \"_\": \"content\" }}`\n instance[key] = responseBody;\n }\n }\n else {\n const propertyName = xmlElementName || xmlName || serializedName;\n if (propertyMapper.xmlIsWrapped) {\n /* a list of wrapped by \n For the xml example below\n \n ...\n ...\n \n the responseBody has\n {\n Cors: {\n CorsRule: [{...}, {...}]\n }\n }\n xmlName is \"Cors\" and xmlElementName is\"CorsRule\".\n */\n const wrapped = responseBody[xmlName];\n const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : [];\n instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options);\n handledPropertyNames.push(xmlName);\n }\n else {\n const property = responseBody[propertyName];\n instance[key] = serializer.deserialize(propertyMapper, property, propertyObjectName, options);\n handledPropertyNames.push(propertyName);\n }\n }\n }\n else {\n // deserialize the property if it is present in the provided responseBody instance\n let propertyInstance;\n let res = responseBody;\n // traversing the object step by step.\n let steps = 0;\n for (const item of paths) {\n if (!res)\n break;\n steps++;\n res = res[item];\n }\n // only accept null when reaching the last position of object otherwise it would be undefined\n if (res === null && steps < paths.length) {\n res = undefined;\n }\n propertyInstance = res;\n const polymorphicDiscriminator = mapper.type.polymorphicDiscriminator;\n // checking that the model property name (key)(ex: \"fishtype\") and the\n // clientName of the polymorphicDiscriminator {metadata} (ex: \"fishtype\")\n // instead of the serializedName of the polymorphicDiscriminator (ex: \"fish.type\")\n // is a better approach. The generator is not consistent with escaping '\\.' in the\n // serializedName of the property (ex: \"fish\\.type\") that is marked as polymorphic discriminator\n // and the serializedName of the metadata polymorphicDiscriminator (ex: \"fish.type\"). However,\n // the clientName transformation of the polymorphicDiscriminator (ex: \"fishtype\") and\n // the transformation of model property name (ex: \"fishtype\") is done consistently.\n // Hence, it is a safer bet to rely on the clientName of the polymorphicDiscriminator.\n if (polymorphicDiscriminator &&\n key === polymorphicDiscriminator.clientName &&\n (propertyInstance === undefined || propertyInstance === null)) {\n propertyInstance = mapper.serializedName;\n }\n let serializedValue;\n // paging\n if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === \"\") {\n propertyInstance = responseBody[key];\n const arrayInstance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options);\n // Copy over any properties that have already been added into the instance, where they do\n // not exist on the newly de-serialized array\n for (const [k, v] of Object.entries(instance)) {\n if (!Object.prototype.hasOwnProperty.call(arrayInstance, k)) {\n arrayInstance[k] = v;\n }\n }\n instance = arrayInstance;\n }\n else if (propertyInstance !== undefined || propertyMapper.defaultValue !== undefined) {\n serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options);\n instance[key] = serializedValue;\n }\n }\n }\n const additionalPropertiesMapper = mapper.type.additionalProperties;\n if (additionalPropertiesMapper) {\n const isAdditionalProperty = (responsePropName) => {\n for (const clientPropName in modelProps) {\n const paths = splitSerializeName(modelProps[clientPropName].serializedName);\n if (paths[0] === responsePropName) {\n return false;\n }\n }\n return true;\n };\n for (const responsePropName in responseBody) {\n if (isAdditionalProperty(responsePropName)) {\n instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '[\"' + responsePropName + '\"]', options);\n }\n }\n }\n else if (responseBody && !options.ignoreUnknownProperties) {\n for (const key of Object.keys(responseBody)) {\n if (instance[key] === undefined &&\n !handledPropertyNames.includes(key) &&\n !isSpecialXmlProperty(key, options)) {\n instance[key] = responseBody[key];\n }\n }\n }\n return instance;\n}\nfunction deserializeDictionaryType(serializer, mapper, responseBody, objectName, options) {\n /* jshint validthis: true */\n const value = mapper.type.value;\n if (!value || typeof value !== \"object\") {\n throw new Error(`\"value\" metadata for a Dictionary must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}`);\n }\n if (responseBody) {\n const tempDictionary = {};\n for (const key of Object.keys(responseBody)) {\n tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName, options);\n }\n return tempDictionary;\n }\n return responseBody;\n}\nfunction deserializeSequenceType(serializer, mapper, responseBody, objectName, options) {\n var _a;\n let element = mapper.type.element;\n if (!element || typeof element !== \"object\") {\n throw new Error(`element\" metadata for an Array must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}`);\n }\n if (responseBody) {\n if (!Array.isArray(responseBody)) {\n // xml2js will interpret a single element array as just the element, so force it to be an array\n responseBody = [responseBody];\n }\n // Quirk: Composite mappers referenced by `element` might\n // not have *all* properties declared (like uberParent),\n // so let's try to look up the full definition by name.\n if (element.type.name === \"Composite\" && element.type.className) {\n element = (_a = serializer.modelMappers[element.type.className]) !== null && _a !== void 0 ? _a : element;\n }\n const tempArray = [];\n for (let i = 0; i < responseBody.length; i++) {\n tempArray[i] = serializer.deserialize(element, responseBody[i], `${objectName}[${i}]`, options);\n }\n return tempArray;\n }\n return responseBody;\n}\nfunction getIndexDiscriminator(discriminators, discriminatorValue, typeName) {\n const typeNamesToCheck = [typeName];\n while (typeNamesToCheck.length) {\n const currentName = typeNamesToCheck.shift();\n const indexDiscriminator = discriminatorValue === currentName\n ? discriminatorValue\n : currentName + \".\" + discriminatorValue;\n if (Object.prototype.hasOwnProperty.call(discriminators, indexDiscriminator)) {\n return discriminators[indexDiscriminator];\n }\n else {\n for (const [name, mapper] of Object.entries(discriminators)) {\n if (name.startsWith(currentName + \".\") &&\n mapper.type.uberParent === currentName &&\n mapper.type.className) {\n typeNamesToCheck.push(mapper.type.className);\n }\n }\n }\n }\n return undefined;\n}\nfunction getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) {\n var _a;\n const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper);\n if (polymorphicDiscriminator) {\n let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName];\n if (discriminatorName) {\n // The serializedName might have \\\\, which we just want to ignore\n if (polymorphicPropertyName === \"serializedName\") {\n discriminatorName = discriminatorName.replace(/\\\\/gi, \"\");\n }\n const discriminatorValue = object[discriminatorName];\n const typeName = (_a = mapper.type.uberParent) !== null && _a !== void 0 ? _a : mapper.type.className;\n if (typeof discriminatorValue === \"string\" && typeName) {\n const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName);\n if (polymorphicMapper) {\n mapper = polymorphicMapper;\n }\n }\n }\n }\n return mapper;\n}\nfunction getPolymorphicDiscriminatorRecursively(serializer, mapper) {\n return (mapper.type.polymorphicDiscriminator ||\n getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) ||\n getPolymorphicDiscriminatorSafely(serializer, mapper.type.className));\n}\nfunction getPolymorphicDiscriminatorSafely(serializer, typeName) {\n return (typeName &&\n serializer.modelMappers[typeName] &&\n serializer.modelMappers[typeName].type.polymorphicDiscriminator);\n}\n/**\n * Known types of Mappers\n */\nexport const MapperTypeNames = {\n Base64Url: \"Base64Url\",\n Boolean: \"Boolean\",\n ByteArray: \"ByteArray\",\n Composite: \"Composite\",\n Date: \"Date\",\n DateTime: \"DateTime\",\n DateTimeRfc1123: \"DateTimeRfc1123\",\n Dictionary: \"Dictionary\",\n Enum: \"Enum\",\n Number: \"Number\",\n Object: \"Object\",\n Sequence: \"Sequence\",\n String: \"String\",\n Stream: \"Stream\",\n TimeSpan: \"TimeSpan\",\n UnixTime: \"UnixTime\",\n};\n//# sourceMappingURL=serializer.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Browser-only implementation of the module's state. The browser esm variant will not load the commonjs state, so we do not need to share state between the two.\n */\nexport const state = {\n operationRequestMap: new WeakMap(),\n};\n//# sourceMappingURL=state-browser.mjs.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { state } from \"./state.js\";\n/**\n * @internal\n * Retrieves the value to use for a given operation argument\n * @param operationArguments - The arguments passed from the generated client\n * @param parameter - The parameter description\n * @param fallbackObject - If something isn't found in the arguments bag, look here.\n * Generally used to look at the service client properties.\n */\nexport function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) {\n let parameterPath = parameter.parameterPath;\n const parameterMapper = parameter.mapper;\n let value;\n if (typeof parameterPath === \"string\") {\n parameterPath = [parameterPath];\n }\n if (Array.isArray(parameterPath)) {\n if (parameterPath.length > 0) {\n if (parameterMapper.isConstant) {\n value = parameterMapper.defaultValue;\n }\n else {\n let propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath);\n if (!propertySearchResult.propertyFound && fallbackObject) {\n propertySearchResult = getPropertyFromParameterPath(fallbackObject, parameterPath);\n }\n let useDefaultValue = false;\n if (!propertySearchResult.propertyFound) {\n useDefaultValue =\n parameterMapper.required ||\n (parameterPath[0] === \"options\" && parameterPath.length === 2);\n }\n value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue;\n }\n }\n }\n else {\n if (parameterMapper.required) {\n value = {};\n }\n for (const propertyName in parameterPath) {\n const propertyMapper = parameterMapper.type.modelProperties[propertyName];\n const propertyPath = parameterPath[propertyName];\n const propertyValue = getOperationArgumentValueFromParameter(operationArguments, {\n parameterPath: propertyPath,\n mapper: propertyMapper,\n }, fallbackObject);\n if (propertyValue !== undefined) {\n if (!value) {\n value = {};\n }\n value[propertyName] = propertyValue;\n }\n }\n }\n return value;\n}\nfunction getPropertyFromParameterPath(parent, parameterPath) {\n const result = { propertyFound: false };\n let i = 0;\n for (; i < parameterPath.length; ++i) {\n const parameterPathPart = parameterPath[i];\n // Make sure to check inherited properties too, so don't use hasOwnProperty().\n if (parent && parameterPathPart in parent) {\n parent = parent[parameterPathPart];\n }\n else {\n break;\n }\n }\n if (i === parameterPath.length) {\n result.propertyValue = parent;\n result.propertyFound = true;\n }\n return result;\n}\nconst originalRequestSymbol = Symbol.for(\"@azure/core-client original request\");\nfunction hasOriginalRequest(request) {\n return originalRequestSymbol in request;\n}\nexport function getOperationRequestInfo(request) {\n if (hasOriginalRequest(request)) {\n return getOperationRequestInfo(request[originalRequestSymbol]);\n }\n let info = state.operationRequestMap.get(request);\n if (!info) {\n info = {};\n state.operationRequestMap.set(request, info);\n }\n return info;\n}\n//# sourceMappingURL=operationHelpers.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { XML_CHARKEY, } from \"./interfaces.js\";\nimport { RestError, } from \"@azure/core-rest-pipeline\";\nimport { MapperTypeNames } from \"./serializer.js\";\nimport { getOperationRequestInfo } from \"./operationHelpers.js\";\nconst defaultJsonContentTypes = [\"application/json\", \"text/json\"];\nconst defaultXmlContentTypes = [\"application/xml\", \"application/atom+xml\"];\n/**\n * The programmatic identifier of the deserializationPolicy.\n */\nexport const deserializationPolicyName = \"deserializationPolicy\";\n/**\n * This policy handles parsing out responses according to OperationSpecs on the request.\n */\nexport function deserializationPolicy(options = {}) {\n var _a, _b, _c, _d, _e, _f, _g;\n const jsonContentTypes = (_b = (_a = options.expectedContentTypes) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : defaultJsonContentTypes;\n const xmlContentTypes = (_d = (_c = options.expectedContentTypes) === null || _c === void 0 ? void 0 : _c.xml) !== null && _d !== void 0 ? _d : defaultXmlContentTypes;\n const parseXML = options.parseXML;\n const serializerOptions = options.serializerOptions;\n const updatedOptions = {\n xml: {\n rootName: (_e = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _e !== void 0 ? _e : \"\",\n includeRoot: (_f = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _f !== void 0 ? _f : false,\n xmlCharKey: (_g = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _g !== void 0 ? _g : XML_CHARKEY,\n },\n };\n return {\n name: deserializationPolicyName,\n async sendRequest(request, next) {\n const response = await next(request);\n return deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, updatedOptions, parseXML);\n },\n };\n}\nfunction getOperationResponseMap(parsedResponse) {\n let result;\n const request = parsedResponse.request;\n const operationInfo = getOperationRequestInfo(request);\n const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec;\n if (operationSpec) {\n if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) {\n result = operationSpec.responses[parsedResponse.status];\n }\n else {\n result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse);\n }\n }\n return result;\n}\nfunction shouldDeserializeResponse(parsedResponse) {\n const request = parsedResponse.request;\n const operationInfo = getOperationRequestInfo(request);\n const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize;\n let result;\n if (shouldDeserialize === undefined) {\n result = true;\n }\n else if (typeof shouldDeserialize === \"boolean\") {\n result = shouldDeserialize;\n }\n else {\n result = shouldDeserialize(parsedResponse);\n }\n return result;\n}\nasync function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, options, parseXML) {\n const parsedResponse = await parse(jsonContentTypes, xmlContentTypes, response, options, parseXML);\n if (!shouldDeserializeResponse(parsedResponse)) {\n return parsedResponse;\n }\n const operationInfo = getOperationRequestInfo(parsedResponse.request);\n const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec;\n if (!operationSpec || !operationSpec.responses) {\n return parsedResponse;\n }\n const responseSpec = getOperationResponseMap(parsedResponse);\n const { error, shouldReturnResponse } = handleErrorResponse(parsedResponse, operationSpec, responseSpec, options);\n if (error) {\n throw error;\n }\n else if (shouldReturnResponse) {\n return parsedResponse;\n }\n // An operation response spec does exist for current status code, so\n // use it to deserialize the response.\n if (responseSpec) {\n if (responseSpec.bodyMapper) {\n let valueToDeserialize = parsedResponse.parsedBody;\n if (operationSpec.isXML && responseSpec.bodyMapper.type.name === MapperTypeNames.Sequence) {\n valueToDeserialize =\n typeof valueToDeserialize === \"object\"\n ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName]\n : [];\n }\n try {\n parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, \"operationRes.parsedBody\", options);\n }\n catch (deserializeError) {\n const restError = new RestError(`Error ${deserializeError} occurred in deserializing the responseBody - ${parsedResponse.bodyAsText}`, {\n statusCode: parsedResponse.status,\n request: parsedResponse.request,\n response: parsedResponse,\n });\n throw restError;\n }\n }\n else if (operationSpec.httpMethod === \"HEAD\") {\n // head methods never have a body, but we return a boolean to indicate presence/absence of the resource\n parsedResponse.parsedBody = response.status >= 200 && response.status < 300;\n }\n if (responseSpec.headersMapper) {\n parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.toJSON(), \"operationRes.parsedHeaders\", { xml: {}, ignoreUnknownProperties: true });\n }\n }\n return parsedResponse;\n}\nfunction isOperationSpecEmpty(operationSpec) {\n const expectedStatusCodes = Object.keys(operationSpec.responses);\n return (expectedStatusCodes.length === 0 ||\n (expectedStatusCodes.length === 1 && expectedStatusCodes[0] === \"default\"));\n}\nfunction handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) {\n var _a;\n const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300;\n const isExpectedStatusCode = isOperationSpecEmpty(operationSpec)\n ? isSuccessByStatus\n : !!responseSpec;\n if (isExpectedStatusCode) {\n if (responseSpec) {\n if (!responseSpec.isError) {\n return { error: null, shouldReturnResponse: false };\n }\n }\n else {\n return { error: null, shouldReturnResponse: false };\n }\n }\n const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default;\n const initialErrorMessage = ((_a = parsedResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(parsedResponse.status))\n ? `Unexpected status code: ${parsedResponse.status}`\n : parsedResponse.bodyAsText;\n const error = new RestError(initialErrorMessage, {\n statusCode: parsedResponse.status,\n request: parsedResponse.request,\n response: parsedResponse,\n });\n // If the item failed but there's no error spec or default spec to deserialize the error,\n // we should fail so we just throw the parsed response\n if (!errorResponseSpec) {\n throw error;\n }\n const defaultBodyMapper = errorResponseSpec.bodyMapper;\n const defaultHeadersMapper = errorResponseSpec.headersMapper;\n try {\n // If error response has a body, try to deserialize it using default body mapper.\n // Then try to extract error code & message from it\n if (parsedResponse.parsedBody) {\n const parsedBody = parsedResponse.parsedBody;\n let deserializedError;\n if (defaultBodyMapper) {\n let valueToDeserialize = parsedBody;\n if (operationSpec.isXML && defaultBodyMapper.type.name === MapperTypeNames.Sequence) {\n valueToDeserialize = [];\n const elementName = defaultBodyMapper.xmlElementName;\n if (typeof parsedBody === \"object\" && elementName) {\n valueToDeserialize = parsedBody[elementName];\n }\n }\n deserializedError = operationSpec.serializer.deserialize(defaultBodyMapper, valueToDeserialize, \"error.response.parsedBody\", options);\n }\n const internalError = parsedBody.error || deserializedError || parsedBody;\n error.code = internalError.code;\n if (internalError.message) {\n error.message = internalError.message;\n }\n if (defaultBodyMapper) {\n error.response.parsedBody = deserializedError;\n }\n }\n // If error response has headers, try to deserialize it using default header mapper\n if (parsedResponse.headers && defaultHeadersMapper) {\n error.response.parsedHeaders =\n operationSpec.serializer.deserialize(defaultHeadersMapper, parsedResponse.headers.toJSON(), \"operationRes.parsedHeaders\");\n }\n }\n catch (defaultError) {\n error.message = `Error \"${defaultError.message}\" occurred in deserializing the responseBody - \"${parsedResponse.bodyAsText}\" for the default response.`;\n }\n return { error, shouldReturnResponse: false };\n}\nasync function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) {\n var _a;\n if (!((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) &&\n operationResponse.bodyAsText) {\n const text = operationResponse.bodyAsText;\n const contentType = operationResponse.headers.get(\"Content-Type\") || \"\";\n const contentComponents = !contentType\n ? []\n : contentType.split(\";\").map((component) => component.toLowerCase());\n try {\n if (contentComponents.length === 0 ||\n contentComponents.some((component) => jsonContentTypes.indexOf(component) !== -1)) {\n operationResponse.parsedBody = JSON.parse(text);\n return operationResponse;\n }\n else if (contentComponents.some((component) => xmlContentTypes.indexOf(component) !== -1)) {\n if (!parseXML) {\n throw new Error(\"Parsing XML not supported.\");\n }\n const body = await parseXML(text, opts.xml);\n operationResponse.parsedBody = body;\n return operationResponse;\n }\n }\n catch (err) {\n const msg = `Error \"${err}\" occurred while parsing the response body - ${operationResponse.bodyAsText}.`;\n const errCode = err.code || RestError.PARSE_ERROR;\n const e = new RestError(msg, {\n code: errCode,\n statusCode: operationResponse.status,\n request: operationResponse.request,\n response: operationResponse,\n });\n throw e;\n }\n }\n return operationResponse;\n}\n//# sourceMappingURL=deserializationPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { MapperTypeNames } from \"./serializer.js\";\n/**\n * Gets the list of status codes for streaming responses.\n * @internal\n */\nexport function getStreamingResponseStatusCodes(operationSpec) {\n const result = new Set();\n for (const statusCode in operationSpec.responses) {\n const operationResponse = operationSpec.responses[statusCode];\n if (operationResponse.bodyMapper &&\n operationResponse.bodyMapper.type.name === MapperTypeNames.Stream) {\n result.add(Number(statusCode));\n }\n }\n return result;\n}\n/**\n * Get the path to this parameter's value as a dotted string (a.b.c).\n * @param parameter - The parameter to get the path string for.\n * @returns The path to this parameter's value as a dotted string.\n * @internal\n */\nexport function getPathStringFromParameter(parameter) {\n const { parameterPath, mapper } = parameter;\n let result;\n if (typeof parameterPath === \"string\") {\n result = parameterPath;\n }\n else if (Array.isArray(parameterPath)) {\n result = parameterPath.join(\".\");\n }\n else {\n result = mapper.serializedName;\n }\n return result;\n}\n//# sourceMappingURL=interfaceHelpers.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { XML_ATTRKEY, XML_CHARKEY, } from \"./interfaces.js\";\nimport { getOperationArgumentValueFromParameter, getOperationRequestInfo, } from \"./operationHelpers.js\";\nimport { MapperTypeNames } from \"./serializer.js\";\nimport { getPathStringFromParameter } from \"./interfaceHelpers.js\";\n/**\n * The programmatic identifier of the serializationPolicy.\n */\nexport const serializationPolicyName = \"serializationPolicy\";\n/**\n * This policy handles assembling the request body and headers using\n * an OperationSpec and OperationArguments on the request.\n */\nexport function serializationPolicy(options = {}) {\n const stringifyXML = options.stringifyXML;\n return {\n name: serializationPolicyName,\n async sendRequest(request, next) {\n const operationInfo = getOperationRequestInfo(request);\n const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec;\n const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments;\n if (operationSpec && operationArguments) {\n serializeHeaders(request, operationArguments, operationSpec);\n serializeRequestBody(request, operationArguments, operationSpec, stringifyXML);\n }\n return next(request);\n },\n };\n}\n/**\n * @internal\n */\nexport function serializeHeaders(request, operationArguments, operationSpec) {\n var _a, _b;\n if (operationSpec.headerParameters) {\n for (const headerParameter of operationSpec.headerParameters) {\n let headerValue = getOperationArgumentValueFromParameter(operationArguments, headerParameter);\n if ((headerValue !== null && headerValue !== undefined) || headerParameter.mapper.required) {\n headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, getPathStringFromParameter(headerParameter));\n const headerCollectionPrefix = headerParameter.mapper\n .headerCollectionPrefix;\n if (headerCollectionPrefix) {\n for (const key of Object.keys(headerValue)) {\n request.headers.set(headerCollectionPrefix + key, headerValue[key]);\n }\n }\n else {\n request.headers.set(headerParameter.mapper.serializedName || getPathStringFromParameter(headerParameter), headerValue);\n }\n }\n }\n }\n const customHeaders = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.requestOptions) === null || _b === void 0 ? void 0 : _b.customHeaders;\n if (customHeaders) {\n for (const customHeaderName of Object.keys(customHeaders)) {\n request.headers.set(customHeaderName, customHeaders[customHeaderName]);\n }\n }\n}\n/**\n * @internal\n */\nexport function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function () {\n throw new Error(\"XML serialization unsupported!\");\n}) {\n var _a, _b, _c, _d, _e;\n const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions;\n const updatedOptions = {\n xml: {\n rootName: (_b = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b !== void 0 ? _b : \"\",\n includeRoot: (_c = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c !== void 0 ? _c : false,\n xmlCharKey: (_d = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d !== void 0 ? _d : XML_CHARKEY,\n },\n };\n const xmlCharKey = updatedOptions.xml.xmlCharKey;\n if (operationSpec.requestBody && operationSpec.requestBody.mapper) {\n request.body = getOperationArgumentValueFromParameter(operationArguments, operationSpec.requestBody);\n const bodyMapper = operationSpec.requestBody.mapper;\n const { required, serializedName, xmlName, xmlElementName, xmlNamespace, xmlNamespacePrefix, nullable, } = bodyMapper;\n const typeName = bodyMapper.type.name;\n try {\n if ((request.body !== undefined && request.body !== null) ||\n (nullable && request.body === null) ||\n required) {\n const requestBodyParameterPathString = getPathStringFromParameter(operationSpec.requestBody);\n request.body = operationSpec.serializer.serialize(bodyMapper, request.body, requestBodyParameterPathString, updatedOptions);\n const isStream = typeName === MapperTypeNames.Stream;\n if (operationSpec.isXML) {\n const xmlnsKey = xmlNamespacePrefix ? `xmlns:${xmlNamespacePrefix}` : \"xmlns\";\n const value = getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, request.body, updatedOptions);\n if (typeName === MapperTypeNames.Sequence) {\n request.body = stringifyXML(prepareXMLRootList(value, xmlElementName || xmlName || serializedName, xmlnsKey, xmlNamespace), { rootName: xmlName || serializedName, xmlCharKey });\n }\n else if (!isStream) {\n request.body = stringifyXML(value, {\n rootName: xmlName || serializedName,\n xmlCharKey,\n });\n }\n }\n else if (typeName === MapperTypeNames.String &&\n (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match(\"text/plain\")) || operationSpec.mediaType === \"text\")) {\n // the String serializer has validated that request body is a string\n // so just send the string.\n return;\n }\n else if (!isStream) {\n request.body = JSON.stringify(request.body);\n }\n }\n }\n catch (error) {\n throw new Error(`Error \"${error.message}\" occurred in serializing the payload - ${JSON.stringify(serializedName, undefined, \" \")}.`);\n }\n }\n else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) {\n request.formData = {};\n for (const formDataParameter of operationSpec.formDataParameters) {\n const formDataParameterValue = getOperationArgumentValueFromParameter(operationArguments, formDataParameter);\n if (formDataParameterValue !== undefined && formDataParameterValue !== null) {\n const formDataParameterPropertyName = formDataParameter.mapper.serializedName || getPathStringFromParameter(formDataParameter);\n request.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, getPathStringFromParameter(formDataParameter), updatedOptions);\n }\n }\n }\n}\n/**\n * Adds an xml namespace to the xml serialized object if needed, otherwise it just returns the value itself\n */\nfunction getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) {\n // Composite and Sequence schemas already got their root namespace set during serialization\n // We just need to add xmlns to the other schema types\n if (xmlNamespace && ![\"Composite\", \"Sequence\", \"Dictionary\"].includes(typeName)) {\n const result = {};\n result[options.xml.xmlCharKey] = serializedValue;\n result[XML_ATTRKEY] = { [xmlnsKey]: xmlNamespace };\n return result;\n }\n return serializedValue;\n}\nfunction prepareXMLRootList(obj, elementName, xmlNamespaceKey, xmlNamespace) {\n if (!Array.isArray(obj)) {\n obj = [obj];\n }\n if (!xmlNamespaceKey || !xmlNamespace) {\n return { [elementName]: obj };\n }\n const result = { [elementName]: obj };\n result[XML_ATTRKEY] = { [xmlNamespaceKey]: xmlNamespace };\n return result;\n}\n//# sourceMappingURL=serializationPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { deserializationPolicy } from \"./deserializationPolicy.js\";\nimport { bearerTokenAuthenticationPolicy, createPipelineFromOptions, } from \"@azure/core-rest-pipeline\";\nimport { serializationPolicy } from \"./serializationPolicy.js\";\n/**\n * Creates a new Pipeline for use with a Service Client.\n * Adds in deserializationPolicy by default.\n * Also adds in bearerTokenAuthenticationPolicy if passed a TokenCredential.\n * @param options - Options to customize the created pipeline.\n */\nexport function createClientPipeline(options = {}) {\n const pipeline = createPipelineFromOptions(options !== null && options !== void 0 ? options : {});\n if (options.credentialOptions) {\n pipeline.addPolicy(bearerTokenAuthenticationPolicy({\n credential: options.credentialOptions.credential,\n scopes: options.credentialOptions.credentialScopes,\n }));\n }\n pipeline.addPolicy(serializationPolicy(options.serializationOptions), { phase: \"Serialize\" });\n pipeline.addPolicy(deserializationPolicy(options.deserializationOptions), {\n phase: \"Deserialize\",\n });\n return pipeline;\n}\n//# sourceMappingURL=pipeline.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { createDefaultHttpClient } from \"@azure/core-rest-pipeline\";\nlet cachedHttpClient;\nexport function getCachedDefaultHttpClient() {\n if (!cachedHttpClient) {\n cachedHttpClient = createDefaultHttpClient();\n }\n return cachedHttpClient;\n}\n//# sourceMappingURL=httpClientCache.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { getOperationArgumentValueFromParameter } from \"./operationHelpers.js\";\nimport { getPathStringFromParameter } from \"./interfaceHelpers.js\";\nconst CollectionFormatToDelimiterMap = {\n CSV: \",\",\n SSV: \" \",\n Multi: \"Multi\",\n TSV: \"\\t\",\n Pipes: \"|\",\n};\nexport function getRequestUrl(baseUri, operationSpec, operationArguments, fallbackObject) {\n const urlReplacements = calculateUrlReplacements(operationSpec, operationArguments, fallbackObject);\n let isAbsolutePath = false;\n let requestUrl = replaceAll(baseUri, urlReplacements);\n if (operationSpec.path) {\n let path = replaceAll(operationSpec.path, urlReplacements);\n // QUIRK: sometimes we get a path component like /{nextLink}\n // which may be a fully formed URL with a leading /. In that case, we should\n // remove the leading /\n if (operationSpec.path === \"/{nextLink}\" && path.startsWith(\"/\")) {\n path = path.substring(1);\n }\n // QUIRK: sometimes we get a path component like {nextLink}\n // which may be a fully formed URL. In that case, we should\n // ignore the baseUri.\n if (isAbsoluteUrl(path)) {\n requestUrl = path;\n isAbsolutePath = true;\n }\n else {\n requestUrl = appendPath(requestUrl, path);\n }\n }\n const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject);\n /**\n * Notice that this call sets the `noOverwrite` parameter to true if the `requestUrl`\n * is an absolute path. This ensures that existing query parameter values in `requestUrl`\n * do not get overwritten. On the other hand when `requestUrl` is not absolute path, it\n * is still being built so there is nothing to overwrite.\n */\n requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath);\n return requestUrl;\n}\nfunction replaceAll(input, replacements) {\n let result = input;\n for (const [searchValue, replaceValue] of replacements) {\n result = result.split(searchValue).join(replaceValue);\n }\n return result;\n}\nfunction calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) {\n var _a;\n const result = new Map();\n if ((_a = operationSpec.urlParameters) === null || _a === void 0 ? void 0 : _a.length) {\n for (const urlParameter of operationSpec.urlParameters) {\n let urlParameterValue = getOperationArgumentValueFromParameter(operationArguments, urlParameter, fallbackObject);\n const parameterPathString = getPathStringFromParameter(urlParameter);\n urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, parameterPathString);\n if (!urlParameter.skipEncoding) {\n urlParameterValue = encodeURIComponent(urlParameterValue);\n }\n result.set(`{${urlParameter.mapper.serializedName || parameterPathString}}`, urlParameterValue);\n }\n }\n return result;\n}\nfunction isAbsoluteUrl(url) {\n return url.includes(\"://\");\n}\nfunction appendPath(url, pathToAppend) {\n if (!pathToAppend) {\n return url;\n }\n const parsedUrl = new URL(url);\n let newPath = parsedUrl.pathname;\n if (!newPath.endsWith(\"/\")) {\n newPath = `${newPath}/`;\n }\n if (pathToAppend.startsWith(\"/\")) {\n pathToAppend = pathToAppend.substring(1);\n }\n const searchStart = pathToAppend.indexOf(\"?\");\n if (searchStart !== -1) {\n const path = pathToAppend.substring(0, searchStart);\n const search = pathToAppend.substring(searchStart + 1);\n newPath = newPath + path;\n if (search) {\n parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search;\n }\n }\n else {\n newPath = newPath + pathToAppend;\n }\n parsedUrl.pathname = newPath;\n return parsedUrl.toString();\n}\nfunction calculateQueryParameters(operationSpec, operationArguments, fallbackObject) {\n var _a;\n const result = new Map();\n const sequenceParams = new Set();\n if ((_a = operationSpec.queryParameters) === null || _a === void 0 ? void 0 : _a.length) {\n for (const queryParameter of operationSpec.queryParameters) {\n if (queryParameter.mapper.type.name === \"Sequence\" && queryParameter.mapper.serializedName) {\n sequenceParams.add(queryParameter.mapper.serializedName);\n }\n let queryParameterValue = getOperationArgumentValueFromParameter(operationArguments, queryParameter, fallbackObject);\n if ((queryParameterValue !== undefined && queryParameterValue !== null) ||\n queryParameter.mapper.required) {\n queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, getPathStringFromParameter(queryParameter));\n const delimiter = queryParameter.collectionFormat\n ? CollectionFormatToDelimiterMap[queryParameter.collectionFormat]\n : \"\";\n if (Array.isArray(queryParameterValue)) {\n // replace null and undefined\n queryParameterValue = queryParameterValue.map((item) => {\n if (item === null || item === undefined) {\n return \"\";\n }\n return item;\n });\n }\n if (queryParameter.collectionFormat === \"Multi\" && queryParameterValue.length === 0) {\n continue;\n }\n else if (Array.isArray(queryParameterValue) &&\n (queryParameter.collectionFormat === \"SSV\" || queryParameter.collectionFormat === \"TSV\")) {\n queryParameterValue = queryParameterValue.join(delimiter);\n }\n if (!queryParameter.skipEncoding) {\n if (Array.isArray(queryParameterValue)) {\n queryParameterValue = queryParameterValue.map((item) => {\n return encodeURIComponent(item);\n });\n }\n else {\n queryParameterValue = encodeURIComponent(queryParameterValue);\n }\n }\n // Join pipes and CSV *after* encoding, or the server will be upset.\n if (Array.isArray(queryParameterValue) &&\n (queryParameter.collectionFormat === \"CSV\" || queryParameter.collectionFormat === \"Pipes\")) {\n queryParameterValue = queryParameterValue.join(delimiter);\n }\n result.set(queryParameter.mapper.serializedName || getPathStringFromParameter(queryParameter), queryParameterValue);\n }\n }\n }\n return {\n queryParams: result,\n sequenceParams,\n };\n}\nfunction simpleParseQueryParams(queryString) {\n const result = new Map();\n if (!queryString || queryString[0] !== \"?\") {\n return result;\n }\n // remove the leading ?\n queryString = queryString.slice(1);\n const pairs = queryString.split(\"&\");\n for (const pair of pairs) {\n const [name, value] = pair.split(\"=\", 2);\n const existingValue = result.get(name);\n if (existingValue) {\n if (Array.isArray(existingValue)) {\n existingValue.push(value);\n }\n else {\n result.set(name, [existingValue, value]);\n }\n }\n else {\n result.set(name, value);\n }\n }\n return result;\n}\n/** @internal */\nexport function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false) {\n if (queryParams.size === 0) {\n return url;\n }\n const parsedUrl = new URL(url);\n // QUIRK: parsedUrl.searchParams will have their name/value pairs decoded, which\n // can change their meaning to the server, such as in the case of a SAS signature.\n // To avoid accidentally un-encoding a query param, we parse the key/values ourselves\n const combinedParams = simpleParseQueryParams(parsedUrl.search);\n for (const [name, value] of queryParams) {\n const existingValue = combinedParams.get(name);\n if (Array.isArray(existingValue)) {\n if (Array.isArray(value)) {\n existingValue.push(...value);\n const valueSet = new Set(existingValue);\n combinedParams.set(name, Array.from(valueSet));\n }\n else {\n existingValue.push(value);\n }\n }\n else if (existingValue) {\n if (Array.isArray(value)) {\n value.unshift(existingValue);\n }\n else if (sequenceParams.has(name)) {\n combinedParams.set(name, [existingValue, value]);\n }\n if (!noOverwrite) {\n combinedParams.set(name, value);\n }\n }\n else {\n combinedParams.set(name, value);\n }\n }\n const searchPieces = [];\n for (const [name, value] of combinedParams) {\n if (typeof value === \"string\") {\n searchPieces.push(`${name}=${value}`);\n }\n else if (Array.isArray(value)) {\n // QUIRK: If we get an array of values, include multiple key/value pairs\n for (const subValue of value) {\n searchPieces.push(`${name}=${subValue}`);\n }\n }\n else {\n searchPieces.push(`${name}=${value}`);\n }\n }\n // QUIRK: we have to set search manually as searchParams will encode comma when it shouldn't.\n parsedUrl.search = searchPieces.length ? `?${searchPieces.join(\"&\")}` : \"\";\n return parsedUrl.toString();\n}\n//# sourceMappingURL=urlHelpers.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"core-client\");\n//# sourceMappingURL=log.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { createPipelineRequest, } from \"@azure/core-rest-pipeline\";\nimport { createClientPipeline } from \"./pipeline.js\";\nimport { flattenResponse } from \"./utils.js\";\nimport { getCachedDefaultHttpClient } from \"./httpClientCache.js\";\nimport { getOperationRequestInfo } from \"./operationHelpers.js\";\nimport { getRequestUrl } from \"./urlHelpers.js\";\nimport { getStreamingResponseStatusCodes } from \"./interfaceHelpers.js\";\nimport { logger } from \"./log.js\";\n/**\n * Initializes a new instance of the ServiceClient.\n */\nexport class ServiceClient {\n /**\n * The ServiceClient constructor\n * @param credential - The credentials used for authentication with the service.\n * @param options - The service client options that govern the behavior of the client.\n */\n constructor(options = {}) {\n var _a, _b;\n this._requestContentType = options.requestContentType;\n this._endpoint = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri;\n if (options.baseUri) {\n logger.warning(\"The baseUri option for SDK Clients has been deprecated, please use endpoint instead.\");\n }\n this._allowInsecureConnection = options.allowInsecureConnection;\n this._httpClient = options.httpClient || getCachedDefaultHttpClient();\n this.pipeline = options.pipeline || createDefaultPipeline(options);\n if ((_b = options.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) {\n for (const { policy, position } of options.additionalPolicies) {\n // Sign happens after Retry and is commonly needed to occur\n // before policies that intercept post-retry.\n const afterPhase = position === \"perRetry\" ? \"Sign\" : undefined;\n this.pipeline.addPolicy(policy, {\n afterPhase,\n });\n }\n }\n }\n /**\n * Send the provided httpRequest.\n */\n async sendRequest(request) {\n return this.pipeline.sendRequest(this._httpClient, request);\n }\n /**\n * Send an HTTP request that is populated using the provided OperationSpec.\n * @typeParam T - The typed result of the request, based on the OperationSpec.\n * @param operationArguments - The arguments that the HTTP request's templated values will be populated from.\n * @param operationSpec - The OperationSpec to use to populate the httpRequest.\n */\n async sendOperationRequest(operationArguments, operationSpec) {\n const endpoint = operationSpec.baseUrl || this._endpoint;\n if (!endpoint) {\n throw new Error(\"If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.\");\n }\n // Templatized URLs sometimes reference properties on the ServiceClient child class,\n // so we have to pass `this` below in order to search these properties if they're\n // not part of OperationArguments\n const url = getRequestUrl(endpoint, operationSpec, operationArguments, this);\n const request = createPipelineRequest({\n url,\n });\n request.method = operationSpec.httpMethod;\n const operationInfo = getOperationRequestInfo(request);\n operationInfo.operationSpec = operationSpec;\n operationInfo.operationArguments = operationArguments;\n const contentType = operationSpec.contentType || this._requestContentType;\n if (contentType && operationSpec.requestBody) {\n request.headers.set(\"Content-Type\", contentType);\n }\n const options = operationArguments.options;\n if (options) {\n const requestOptions = options.requestOptions;\n if (requestOptions) {\n if (requestOptions.timeout) {\n request.timeout = requestOptions.timeout;\n }\n if (requestOptions.onUploadProgress) {\n request.onUploadProgress = requestOptions.onUploadProgress;\n }\n if (requestOptions.onDownloadProgress) {\n request.onDownloadProgress = requestOptions.onDownloadProgress;\n }\n if (requestOptions.shouldDeserialize !== undefined) {\n operationInfo.shouldDeserialize = requestOptions.shouldDeserialize;\n }\n if (requestOptions.allowInsecureConnection) {\n request.allowInsecureConnection = true;\n }\n }\n if (options.abortSignal) {\n request.abortSignal = options.abortSignal;\n }\n if (options.tracingOptions) {\n request.tracingOptions = options.tracingOptions;\n }\n }\n if (this._allowInsecureConnection) {\n request.allowInsecureConnection = true;\n }\n if (request.streamResponseStatusCodes === undefined) {\n request.streamResponseStatusCodes = getStreamingResponseStatusCodes(operationSpec);\n }\n try {\n const rawResponse = await this.sendRequest(request);\n const flatResponse = flattenResponse(rawResponse, operationSpec.responses[rawResponse.status]);\n if (options === null || options === void 0 ? void 0 : options.onResponse) {\n options.onResponse(rawResponse, flatResponse);\n }\n return flatResponse;\n }\n catch (error) {\n if (typeof error === \"object\" && (error === null || error === void 0 ? void 0 : error.response)) {\n const rawResponse = error.response;\n const flatResponse = flattenResponse(rawResponse, operationSpec.responses[error.statusCode] || operationSpec.responses[\"default\"]);\n error.details = flatResponse;\n if (options === null || options === void 0 ? void 0 : options.onResponse) {\n options.onResponse(rawResponse, flatResponse, error);\n }\n }\n throw error;\n }\n }\n}\nfunction createDefaultPipeline(options) {\n const credentialScopes = getCredentialScopes(options);\n const credentialOptions = options.credential && credentialScopes\n ? { credentialScopes, credential: options.credential }\n : undefined;\n return createClientPipeline(Object.assign(Object.assign({}, options), { credentialOptions }));\n}\nfunction getCredentialScopes(options) {\n if (options.credentialScopes) {\n return options.credentialScopes;\n }\n if (options.endpoint) {\n return `${options.endpoint}/.default`;\n }\n if (options.baseUri) {\n return `${options.baseUri}/.default`;\n }\n if (options.credential && !options.credentialScopes) {\n throw new Error(`When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy`);\n }\n return undefined;\n}\n//# sourceMappingURL=serviceClient.js.map","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nexport const SearchError = {\n type: {\n name: \"Composite\",\n className: \"SearchError\",\n modelProperties: {\n code: {\n serializedName: \"code\",\n readOnly: true,\n type: {\n name: \"String\"\n }\n },\n message: {\n serializedName: \"message\",\n required: true,\n readOnly: true,\n type: {\n name: \"String\"\n }\n },\n details: {\n serializedName: \"details\",\n readOnly: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"SearchError\"\n }\n }\n }\n }\n }\n }\n};\nexport const SearchDocumentsResult = {\n type: {\n name: \"Composite\",\n className: \"SearchDocumentsResult\",\n modelProperties: {\n count: {\n serializedName: \"@odata\\\\.count\",\n readOnly: true,\n type: {\n name: \"Number\"\n }\n },\n coverage: {\n serializedName: \"@search\\\\.coverage\",\n readOnly: true,\n type: {\n name: \"Number\"\n }\n },\n facets: {\n serializedName: \"@search\\\\.facets\",\n readOnly: true,\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"Sequence\",\n element: { type: { name: \"Composite\", className: \"FacetResult\" } }\n }\n }\n }\n },\n nextPageParameters: {\n serializedName: \"@search\\\\.nextPageParameters\",\n type: {\n name: \"Composite\",\n className: \"SearchRequest\"\n }\n },\n results: {\n serializedName: \"value\",\n required: true,\n readOnly: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"SearchResult\"\n }\n }\n }\n },\n nextLink: {\n serializedName: \"@odata\\\\.nextLink\",\n readOnly: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nexport const FacetResult = {\n type: {\n name: \"Composite\",\n className: \"FacetResult\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n count: {\n serializedName: \"count\",\n readOnly: true,\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\nexport const SearchRequest = {\n type: {\n name: \"Composite\",\n className: \"SearchRequest\",\n modelProperties: {\n includeTotalResultCount: {\n serializedName: \"count\",\n type: {\n name: \"Boolean\"\n }\n },\n facets: {\n serializedName: \"facets\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n filter: {\n serializedName: \"filter\",\n type: {\n name: \"String\"\n }\n },\n highlightFields: {\n serializedName: \"highlight\",\n type: {\n name: \"String\"\n }\n },\n highlightPostTag: {\n serializedName: \"highlightPostTag\",\n type: {\n name: \"String\"\n }\n },\n highlightPreTag: {\n serializedName: \"highlightPreTag\",\n type: {\n name: \"String\"\n }\n },\n minimumCoverage: {\n serializedName: \"minimumCoverage\",\n type: {\n name: \"Number\"\n }\n },\n orderBy: {\n serializedName: \"orderby\",\n type: {\n name: \"String\"\n }\n },\n queryType: {\n serializedName: \"queryType\",\n type: {\n name: \"Enum\",\n allowedValues: [\"simple\", \"full\"]\n }\n },\n scoringStatistics: {\n serializedName: \"scoringStatistics\",\n type: {\n name: \"Enum\",\n allowedValues: [\"local\", \"global\"]\n }\n },\n sessionId: {\n serializedName: \"sessionId\",\n type: {\n name: \"String\"\n }\n },\n scoringParameters: {\n serializedName: \"scoringParameters\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n scoringProfile: {\n serializedName: \"scoringProfile\",\n type: {\n name: \"String\"\n }\n },\n searchText: {\n serializedName: \"search\",\n type: {\n name: \"String\"\n }\n },\n searchFields: {\n serializedName: \"searchFields\",\n type: {\n name: \"String\"\n }\n },\n searchMode: {\n serializedName: \"searchMode\",\n type: {\n name: \"Enum\",\n allowedValues: [\"any\", \"all\"]\n }\n },\n select: {\n serializedName: \"select\",\n type: {\n name: \"String\"\n }\n },\n skip: {\n serializedName: \"skip\",\n type: {\n name: \"Number\"\n }\n },\n top: {\n serializedName: \"top\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\nexport const SearchResult = {\n type: {\n name: \"Composite\",\n className: \"SearchResult\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n _score: {\n serializedName: \"@search\\\\.score\",\n required: true,\n readOnly: true,\n type: {\n name: \"Number\"\n }\n },\n _highlights: {\n serializedName: \"@search\\\\.highlights\",\n readOnly: true,\n type: {\n name: \"Dictionary\",\n value: {\n type: { name: \"Sequence\", element: { type: { name: \"String\" } } }\n }\n }\n }\n }\n }\n};\nexport const SuggestDocumentsResult = {\n type: {\n name: \"Composite\",\n className: \"SuggestDocumentsResult\",\n modelProperties: {\n results: {\n serializedName: \"value\",\n required: true,\n readOnly: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"SuggestResult\"\n }\n }\n }\n },\n coverage: {\n serializedName: \"@search\\\\.coverage\",\n readOnly: true,\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\nexport const SuggestResult = {\n type: {\n name: \"Composite\",\n className: \"SuggestResult\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n _text: {\n serializedName: \"@search\\\\.text\",\n required: true,\n readOnly: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nexport const SuggestRequest = {\n type: {\n name: \"Composite\",\n className: \"SuggestRequest\",\n modelProperties: {\n filter: {\n serializedName: \"filter\",\n type: {\n name: \"String\"\n }\n },\n useFuzzyMatching: {\n serializedName: \"fuzzy\",\n type: {\n name: \"Boolean\"\n }\n },\n highlightPostTag: {\n serializedName: \"highlightPostTag\",\n type: {\n name: \"String\"\n }\n },\n highlightPreTag: {\n serializedName: \"highlightPreTag\",\n type: {\n name: \"String\"\n }\n },\n minimumCoverage: {\n serializedName: \"minimumCoverage\",\n type: {\n name: \"Number\"\n }\n },\n orderBy: {\n serializedName: \"orderby\",\n type: {\n name: \"String\"\n }\n },\n searchText: {\n serializedName: \"search\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n searchFields: {\n serializedName: \"searchFields\",\n type: {\n name: \"String\"\n }\n },\n select: {\n serializedName: \"select\",\n type: {\n name: \"String\"\n }\n },\n suggesterName: {\n serializedName: \"suggesterName\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n top: {\n serializedName: \"top\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\nexport const IndexBatch = {\n type: {\n name: \"Composite\",\n className: \"IndexBatch\",\n modelProperties: {\n actions: {\n serializedName: \"value\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"IndexAction\"\n }\n }\n }\n }\n }\n }\n};\nexport const IndexAction = {\n type: {\n name: \"Composite\",\n className: \"IndexAction\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n __actionType: {\n serializedName: \"@search\\\\.action\",\n required: true,\n type: {\n name: \"Enum\",\n allowedValues: [\"upload\", \"merge\", \"mergeOrUpload\", \"delete\"]\n }\n }\n }\n }\n};\nexport const IndexDocumentsResult = {\n type: {\n name: \"Composite\",\n className: \"IndexDocumentsResult\",\n modelProperties: {\n results: {\n serializedName: \"value\",\n required: true,\n readOnly: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"IndexingResult\"\n }\n }\n }\n }\n }\n }\n};\nexport const IndexingResult = {\n type: {\n name: \"Composite\",\n className: \"IndexingResult\",\n modelProperties: {\n key: {\n serializedName: \"key\",\n required: true,\n readOnly: true,\n type: {\n name: \"String\"\n }\n },\n errorMessage: {\n serializedName: \"errorMessage\",\n readOnly: true,\n type: {\n name: \"String\"\n }\n },\n succeeded: {\n serializedName: \"status\",\n required: true,\n readOnly: true,\n type: {\n name: \"Boolean\"\n }\n },\n statusCode: {\n serializedName: \"statusCode\",\n required: true,\n readOnly: true,\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\nexport const AutocompleteResult = {\n type: {\n name: \"Composite\",\n className: \"AutocompleteResult\",\n modelProperties: {\n coverage: {\n serializedName: \"@search\\\\.coverage\",\n readOnly: true,\n type: {\n name: \"Number\"\n }\n },\n results: {\n serializedName: \"value\",\n required: true,\n readOnly: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"AutocompleteItem\"\n }\n }\n }\n }\n }\n }\n};\nexport const AutocompleteItem = {\n type: {\n name: \"Composite\",\n className: \"AutocompleteItem\",\n modelProperties: {\n text: {\n serializedName: \"text\",\n required: true,\n readOnly: true,\n type: {\n name: \"String\"\n }\n },\n queryPlusText: {\n serializedName: \"queryPlusText\",\n required: true,\n readOnly: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nexport const AutocompleteRequest = {\n type: {\n name: \"Composite\",\n className: \"AutocompleteRequest\",\n modelProperties: {\n searchText: {\n serializedName: \"search\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n autocompleteMode: {\n serializedName: \"autocompleteMode\",\n type: {\n name: \"Enum\",\n allowedValues: [\"oneTerm\", \"twoTerms\", \"oneTermWithContext\"]\n }\n },\n filter: {\n serializedName: \"filter\",\n type: {\n name: \"String\"\n }\n },\n useFuzzyMatching: {\n serializedName: \"fuzzy\",\n type: {\n name: \"Boolean\"\n }\n },\n highlightPostTag: {\n serializedName: \"highlightPostTag\",\n type: {\n name: \"String\"\n }\n },\n highlightPreTag: {\n serializedName: \"highlightPreTag\",\n type: {\n name: \"String\"\n }\n },\n minimumCoverage: {\n serializedName: \"minimumCoverage\",\n type: {\n name: \"Number\"\n }\n },\n searchFields: {\n serializedName: \"searchFields\",\n type: {\n name: \"String\"\n }\n },\n suggesterName: {\n serializedName: \"suggesterName\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n top: {\n serializedName: \"top\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n//# sourceMappingURL=mappers.js.map","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nimport { SearchRequest as SearchRequestMapper, SuggestRequest as SuggestRequestMapper, IndexBatch as IndexBatchMapper, AutocompleteRequest as AutocompleteRequestMapper } from \"../models/mappers\";\nexport const accept = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const endpoint = {\n parameterPath: \"endpoint\",\n mapper: {\n serializedName: \"endpoint\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\nexport const indexName = {\n parameterPath: \"indexName\",\n mapper: {\n serializedName: \"indexName\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\nexport const apiVersion = {\n parameterPath: \"apiVersion\",\n mapper: {\n serializedName: \"api-version\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\nexport const searchText = {\n parameterPath: [\"options\", \"searchText\"],\n mapper: {\n serializedName: \"search\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const includeTotalResultCount = {\n parameterPath: [\"options\", \"searchOptions\", \"includeTotalResultCount\"],\n mapper: {\n serializedName: \"$count\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nexport const facets = {\n parameterPath: [\"options\", \"searchOptions\", \"facets\"],\n mapper: {\n serializedName: \"facet\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n collectionFormat: \"Multi\"\n};\nexport const filter = {\n parameterPath: [\"options\", \"searchOptions\", \"filter\"],\n mapper: {\n serializedName: \"$filter\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const highlightFields = {\n parameterPath: [\"options\", \"searchOptions\", \"highlightFields\"],\n mapper: {\n serializedName: \"highlight\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n collectionFormat: \"CSV\"\n};\nexport const highlightPostTag = {\n parameterPath: [\"options\", \"searchOptions\", \"highlightPostTag\"],\n mapper: {\n serializedName: \"highlightPostTag\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const highlightPreTag = {\n parameterPath: [\"options\", \"searchOptions\", \"highlightPreTag\"],\n mapper: {\n serializedName: \"highlightPreTag\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const minimumCoverage = {\n parameterPath: [\"options\", \"searchOptions\", \"minimumCoverage\"],\n mapper: {\n serializedName: \"minimumCoverage\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const orderBy = {\n parameterPath: [\"options\", \"searchOptions\", \"orderBy\"],\n mapper: {\n serializedName: \"$orderby\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n collectionFormat: \"CSV\"\n};\nexport const queryType = {\n parameterPath: [\"options\", \"searchOptions\", \"queryType\"],\n mapper: {\n serializedName: \"queryType\",\n type: {\n name: \"Enum\",\n allowedValues: [\"simple\", \"full\"]\n }\n }\n};\nexport const scoringParameters = {\n parameterPath: [\"options\", \"searchOptions\", \"scoringParameters\"],\n mapper: {\n serializedName: \"scoringParameter\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n collectionFormat: \"Multi\"\n};\nexport const scoringProfile = {\n parameterPath: [\"options\", \"searchOptions\", \"scoringProfile\"],\n mapper: {\n serializedName: \"scoringProfile\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const searchFields = {\n parameterPath: [\"options\", \"searchOptions\", \"searchFields\"],\n mapper: {\n serializedName: \"searchFields\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n collectionFormat: \"CSV\"\n};\nexport const searchMode = {\n parameterPath: [\"options\", \"searchOptions\", \"searchMode\"],\n mapper: {\n serializedName: \"searchMode\",\n type: {\n name: \"Enum\",\n allowedValues: [\"any\", \"all\"]\n }\n }\n};\nexport const scoringStatistics = {\n parameterPath: [\"options\", \"searchOptions\", \"scoringStatistics\"],\n mapper: {\n serializedName: \"scoringStatistics\",\n type: {\n name: \"Enum\",\n allowedValues: [\"local\", \"global\"]\n }\n }\n};\nexport const sessionId = {\n parameterPath: [\"options\", \"searchOptions\", \"sessionId\"],\n mapper: {\n serializedName: \"sessionId\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const select = {\n parameterPath: [\"options\", \"searchOptions\", \"select\"],\n mapper: {\n serializedName: \"$select\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n collectionFormat: \"CSV\"\n};\nexport const skip = {\n parameterPath: [\"options\", \"searchOptions\", \"skip\"],\n mapper: {\n serializedName: \"$skip\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const top = {\n parameterPath: [\"options\", \"searchOptions\", \"top\"],\n mapper: {\n serializedName: \"$top\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const contentType = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const searchRequest = {\n parameterPath: \"searchRequest\",\n mapper: SearchRequestMapper\n};\nexport const key = {\n parameterPath: \"key\",\n mapper: {\n serializedName: \"key\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\nexport const selectedFields = {\n parameterPath: [\"options\", \"selectedFields\"],\n mapper: {\n serializedName: \"$select\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n collectionFormat: \"CSV\"\n};\nexport const searchText1 = {\n parameterPath: \"searchText\",\n mapper: {\n serializedName: \"search\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\nexport const suggesterName = {\n parameterPath: \"suggesterName\",\n mapper: {\n serializedName: \"suggesterName\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\nexport const filter1 = {\n parameterPath: [\"options\", \"suggestOptions\", \"filter\"],\n mapper: {\n serializedName: \"$filter\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const useFuzzyMatching = {\n parameterPath: [\"options\", \"suggestOptions\", \"useFuzzyMatching\"],\n mapper: {\n serializedName: \"fuzzy\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nexport const highlightPostTag1 = {\n parameterPath: [\"options\", \"suggestOptions\", \"highlightPostTag\"],\n mapper: {\n serializedName: \"highlightPostTag\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const highlightPreTag1 = {\n parameterPath: [\"options\", \"suggestOptions\", \"highlightPreTag\"],\n mapper: {\n serializedName: \"highlightPreTag\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const minimumCoverage1 = {\n parameterPath: [\"options\", \"suggestOptions\", \"minimumCoverage\"],\n mapper: {\n serializedName: \"minimumCoverage\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const orderBy1 = {\n parameterPath: [\"options\", \"suggestOptions\", \"orderBy\"],\n mapper: {\n serializedName: \"$orderby\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n collectionFormat: \"CSV\"\n};\nexport const searchFields1 = {\n parameterPath: [\"options\", \"suggestOptions\", \"searchFields\"],\n mapper: {\n serializedName: \"searchFields\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n collectionFormat: \"CSV\"\n};\nexport const select1 = {\n parameterPath: [\"options\", \"suggestOptions\", \"select\"],\n mapper: {\n serializedName: \"$select\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n collectionFormat: \"CSV\"\n};\nexport const top1 = {\n parameterPath: [\"options\", \"suggestOptions\", \"top\"],\n mapper: {\n serializedName: \"$top\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const suggestRequest = {\n parameterPath: \"suggestRequest\",\n mapper: SuggestRequestMapper\n};\nexport const batch = {\n parameterPath: \"batch\",\n mapper: IndexBatchMapper\n};\nexport const autocompleteMode = {\n parameterPath: [\"options\", \"autocompleteOptions\", \"autocompleteMode\"],\n mapper: {\n serializedName: \"autocompleteMode\",\n type: {\n name: \"Enum\",\n allowedValues: [\"oneTerm\", \"twoTerms\", \"oneTermWithContext\"]\n }\n }\n};\nexport const filter2 = {\n parameterPath: [\"options\", \"autocompleteOptions\", \"filter\"],\n mapper: {\n serializedName: \"$filter\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const useFuzzyMatching1 = {\n parameterPath: [\"options\", \"autocompleteOptions\", \"useFuzzyMatching\"],\n mapper: {\n serializedName: \"fuzzy\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nexport const highlightPostTag2 = {\n parameterPath: [\"options\", \"autocompleteOptions\", \"highlightPostTag\"],\n mapper: {\n serializedName: \"highlightPostTag\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const highlightPreTag2 = {\n parameterPath: [\"options\", \"autocompleteOptions\", \"highlightPreTag\"],\n mapper: {\n serializedName: \"highlightPreTag\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const minimumCoverage2 = {\n parameterPath: [\"options\", \"autocompleteOptions\", \"minimumCoverage\"],\n mapper: {\n serializedName: \"minimumCoverage\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const searchFields2 = {\n parameterPath: [\"options\", \"autocompleteOptions\", \"searchFields\"],\n mapper: {\n serializedName: \"searchFields\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n collectionFormat: \"CSV\"\n};\nexport const top2 = {\n parameterPath: [\"options\", \"autocompleteOptions\", \"top\"],\n mapper: {\n serializedName: \"$top\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const autocompleteRequest = {\n parameterPath: \"autocompleteRequest\",\n mapper: AutocompleteRequestMapper\n};\n//# sourceMappingURL=parameters.js.map","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\n/** Class representing a Documents. */\nexport class DocumentsImpl {\n /**\n * Initialize a new instance of the class Documents class.\n * @param client Reference to the service client\n */\n constructor(client) {\n this.client = client;\n }\n /**\n * Queries the number of documents in the index.\n * @param options The options parameters.\n */\n count(options) {\n return this.client.sendOperationRequest({ options }, countOperationSpec);\n }\n /**\n * Searches for documents in the index.\n * @param options The options parameters.\n */\n searchGet(options) {\n return this.client.sendOperationRequest({ options }, searchGetOperationSpec);\n }\n /**\n * Searches for documents in the index.\n * @param searchRequest The definition of the Search request.\n * @param options The options parameters.\n */\n searchPost(searchRequest, options) {\n return this.client.sendOperationRequest({ searchRequest, options }, searchPostOperationSpec);\n }\n /**\n * Retrieves a document from the index.\n * @param key The key of the document to retrieve.\n * @param options The options parameters.\n */\n get(key, options) {\n return this.client.sendOperationRequest({ key, options }, getOperationSpec);\n }\n /**\n * Suggests documents in the index that match the given partial query text.\n * @param searchText The search text to use to suggest documents. Must be at least 1 character, and no\n * more than 100 characters.\n * @param suggesterName The name of the suggester as specified in the suggesters collection that's part\n * of the index definition.\n * @param options The options parameters.\n */\n suggestGet(searchText, suggesterName, options) {\n return this.client.sendOperationRequest({ searchText, suggesterName, options }, suggestGetOperationSpec);\n }\n /**\n * Suggests documents in the index that match the given partial query text.\n * @param suggestRequest The Suggest request.\n * @param options The options parameters.\n */\n suggestPost(suggestRequest, options) {\n return this.client.sendOperationRequest({ suggestRequest, options }, suggestPostOperationSpec);\n }\n /**\n * Sends a batch of document write actions to the index.\n * @param batch The batch of index actions.\n * @param options The options parameters.\n */\n index(batch, options) {\n return this.client.sendOperationRequest({ batch, options }, indexOperationSpec);\n }\n /**\n * Autocompletes incomplete query terms based on input text and matching terms in the index.\n * @param searchText The incomplete term which should be auto-completed.\n * @param suggesterName The name of the suggester as specified in the suggesters collection that's part\n * of the index definition.\n * @param options The options parameters.\n */\n autocompleteGet(searchText, suggesterName, options) {\n return this.client.sendOperationRequest({ searchText, suggesterName, options }, autocompleteGetOperationSpec);\n }\n /**\n * Autocompletes incomplete query terms based on input text and matching terms in the index.\n * @param autocompleteRequest The definition of the Autocomplete request.\n * @param options The options parameters.\n */\n autocompletePost(autocompleteRequest, options) {\n return this.client.sendOperationRequest({ autocompleteRequest, options }, autocompletePostOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\nconst countOperationSpec = {\n path: \"/docs/$count\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: { type: { name: \"Number\" } }\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst searchGetOperationSpec = {\n path: \"/docs\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchDocumentsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.searchText,\n Parameters.includeTotalResultCount,\n Parameters.facets,\n Parameters.filter,\n Parameters.highlightFields,\n Parameters.highlightPostTag,\n Parameters.highlightPreTag,\n Parameters.minimumCoverage,\n Parameters.orderBy,\n Parameters.queryType,\n Parameters.scoringParameters,\n Parameters.scoringProfile,\n Parameters.searchFields,\n Parameters.searchMode,\n Parameters.scoringStatistics,\n Parameters.sessionId,\n Parameters.select,\n Parameters.skip,\n Parameters.top\n ],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst searchPostOperationSpec = {\n path: \"/docs/search.post.search\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchDocumentsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.searchRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec = {\n path: \"/docs('{key}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: { type: { name: \"any\" } }\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.selectedFields],\n urlParameters: [Parameters.endpoint, Parameters.indexName, Parameters.key],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst suggestGetOperationSpec = {\n path: \"/docs/search.suggest\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SuggestDocumentsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.searchText1,\n Parameters.suggesterName,\n Parameters.filter1,\n Parameters.useFuzzyMatching,\n Parameters.highlightPostTag1,\n Parameters.highlightPreTag1,\n Parameters.minimumCoverage1,\n Parameters.orderBy1,\n Parameters.searchFields1,\n Parameters.select1,\n Parameters.top1\n ],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst suggestPostOperationSpec = {\n path: \"/docs/search.post.suggest\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.SuggestDocumentsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.suggestRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst indexOperationSpec = {\n path: \"/docs/search.index\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.IndexDocumentsResult\n },\n 207: {\n bodyMapper: Mappers.IndexDocumentsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.batch,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst autocompleteGetOperationSpec = {\n path: \"/docs/search.autocomplete\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutocompleteResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.searchText1,\n Parameters.suggesterName,\n Parameters.autocompleteMode,\n Parameters.filter2,\n Parameters.useFuzzyMatching1,\n Parameters.highlightPostTag2,\n Parameters.highlightPreTag2,\n Parameters.minimumCoverage2,\n Parameters.searchFields2,\n Parameters.top2\n ],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst autocompletePostOperationSpec = {\n path: \"/docs/search.post.autocomplete\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutocompleteResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.autocompleteRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\n//# sourceMappingURL=documents.js.map","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nimport * as coreClient from \"@azure/core-client\";\n/** @internal */\nexport class SearchClientContext extends coreClient.ServiceClient {\n /**\n * Initializes a new instance of the SearchClientContext class.\n * @param endpoint The endpoint URL of the search service.\n * @param indexName The name of the index.\n * @param apiVersion Api Version\n * @param options The parameter options\n */\n constructor(endpoint, indexName, apiVersion, options) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n if (indexName === undefined) {\n throw new Error(\"'indexName' cannot be null\");\n }\n if (apiVersion === undefined) {\n throw new Error(\"'apiVersion' cannot be null\");\n }\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { baseUri: options.endpoint || \"{endpoint}/indexes('{indexName}')\" });\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n this.indexName = indexName;\n this.apiVersion = apiVersion;\n }\n}\n//# sourceMappingURL=searchClientContext.js.map","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nimport { DocumentsImpl } from \"./operations\";\nimport { SearchClientContext } from \"./searchClientContext\";\n/** @internal */\nexport class SearchClient extends SearchClientContext {\n /**\n * Initializes a new instance of the SearchClient class.\n * @param endpoint The endpoint URL of the search service.\n * @param indexName The name of the index.\n * @param apiVersion Api Version\n * @param options The parameter options\n */\n constructor(endpoint, indexName, apiVersion, options) {\n super(endpoint, indexName, apiVersion, options);\n this.documents = new DocumentsImpl(this);\n }\n}\n//# sourceMappingURL=searchClient.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * A static-key-based credential that supports updating\n * the underlying key value.\n */\nexport class AzureKeyCredential {\n /**\n * The value of the key to be used in authentication\n */\n get key() {\n return this._key;\n }\n /**\n * Create an instance of an AzureKeyCredential for use\n * with a service client.\n *\n * @param key - The initial value of the key to use in authentication\n */\n constructor(key) {\n if (!key) {\n throw new Error(\"key must be a non-empty string\");\n }\n this._key = key;\n }\n /**\n * Change the value of the key.\n *\n * Updates will take effect upon the next request after\n * updating the key value.\n *\n * @param newKey - The new key value to be used\n */\n update(newKey) {\n this._key = newKey;\n }\n}\n//# sourceMappingURL=azureKeyCredential.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * @internal\n * @param accessToken - Access token\n * @returns Whether a token is bearer type or not\n */\nexport function isBearerToken(accessToken) {\n return !accessToken.tokenType || accessToken.tokenType === \"Bearer\";\n}\n/**\n * @internal\n * @param accessToken - Access token\n * @returns Whether a token is Pop token or not\n */\nexport function isPopToken(accessToken) {\n return accessToken.tokenType === \"pop\";\n}\n/**\n * Tests an object to determine whether it implements TokenCredential.\n *\n * @param credential - The assumed TokenCredential to be tested.\n */\nexport function isTokenCredential(credential) {\n // Check for an object with a 'getToken' function and possibly with\n // a 'signRequest' function. We do this check to make sure that\n // a ServiceClientCredentials implementor (like TokenClientCredentials\n // in ms-rest-nodeauth) doesn't get mistaken for a TokenCredential if\n // it doesn't actually implement TokenCredential also.\n const castCredential = credential;\n return (castCredential &&\n typeof castCredential.getToken === \"function\" &&\n (castCredential.signRequest === undefined || castCredential.getToken.length > 0));\n}\n//# sourceMappingURL=tokenCredential.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nconst API_KEY_HEADER_NAME = \"api-key\";\nconst searchApiKeyCredentialPolicy = \"SearchApiKeyCredentialPolicy\";\n/**\n * Create an HTTP pipeline policy to authenticate a request\n * using an `AzureKeyCredential` for Azure Cognitive Search\n */\nexport function createSearchApiKeyCredentialPolicy(credential) {\n return {\n name: searchApiKeyCredentialPolicy,\n async sendRequest(request, next) {\n if (!request.headers.has(API_KEY_HEADER_NAME)) {\n request.headers.set(API_KEY_HEADER_NAME, credential.key);\n }\n return next(request);\n },\n };\n}\n//# sourceMappingURL=searchApiKeyCredentialPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { createClientLogger } from \"@azure/logger\";\n/**\n * The `@azure/logger` configuration for this package.\n */\nexport const logger = createClientLogger(\"search\");\n//# sourceMappingURL=logger.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { createTracingClient } from \"@azure/core-tracing\";\n/**\n * Creates a tracing client using the global tracer.\n * @internal\n */\nexport const tracingClient = createTracingClient({\n namespace: \"Microsoft.Search\",\n packageName: \"Azure.Search\",\n});\nexport const createSpan = tracingClient.startSpan;\n//# sourceMappingURL=tracing.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nconst WorldGeodeticSystem1984 = \"EPSG:4326\"; // See https://epsg.io/4326\n/**\n * Represents a geographic point in global coordinates.\n */\nexport default class GeographyPoint {\n /**\n * Constructs a new instance of GeographyPoint given\n * the specified coordinates.\n * @param geographyPoint - object with longitude and latitude values in decimal\n */\n constructor(geographyPoint) {\n this.longitude = geographyPoint.longitude;\n this.latitude = geographyPoint.latitude;\n }\n /**\n * Used to serialize to a GeoJSON Point.\n */\n toJSON() {\n return {\n type: \"Point\",\n coordinates: [this.longitude, this.latitude],\n crs: { type: \"name\", properties: { name: WorldGeodeticSystem1984 } },\n };\n }\n}\n//# sourceMappingURL=geographyPoint.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport GeographyPoint from \"./geographyPoint\";\nconst ISO8601DateRegex = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,3})?Z$/i;\nconst GeoJSONPointTypeName = \"Point\";\nconst WorldGeodeticSystem1984 = \"EPSG:4326\"; // See https://epsg.io/4326\nexport function serialize(obj) {\n return walk(obj, (value) => {\n const result = serializeSpecialNumbers(value);\n return result;\n });\n}\nexport function deserialize(obj) {\n return walk(obj, (value) => {\n let result = deserializeSpecialNumbers(value);\n result = deserializeDates(result);\n result = deserializeGeoPoint(result);\n return result;\n });\n}\nfunction walk(start, mapper) {\n // eslint-disable-next-line @typescript-eslint/ban-types\n const seenMarker = new WeakMap();\n const result = { value: undefined };\n const queue = [\n { value: start, parent: result, key: \"value\" },\n ];\n while (queue.length) {\n const current = queue.shift();\n if (typeof current.value === \"object\" && current.value !== null) {\n if (seenMarker.has(current.value)) {\n continue;\n }\n else {\n seenMarker.set(current.value, true);\n }\n }\n const mapped = mapper(current.value);\n if ((current === null || current === void 0 ? void 0 : current.parent) && current.key) {\n current.parent[current.key] = mapped;\n }\n if (typeof mapped === \"object\" && mapped !== null) {\n for (const key of Object.keys(mapped)) {\n queue.push({\n value: mapped[key],\n parent: mapped,\n key,\n });\n }\n }\n }\n return result.value;\n}\nfunction serializeSpecialNumbers(input) {\n if (typeof input === \"number\") {\n if (isNaN(input)) {\n return \"NaN\";\n }\n else if (input === Infinity) {\n return \"INF\";\n }\n else if (input === -Infinity) {\n return \"-INF\";\n }\n }\n return input;\n}\nfunction deserializeSpecialNumbers(input) {\n if (typeof input === \"string\") {\n if (input === \"NaN\") {\n return NaN;\n }\n else if (input === \"INF\") {\n return Infinity;\n }\n else if (input === \"-INF\") {\n return -Infinity;\n }\n }\n return input;\n}\nfunction deserializeDates(input) {\n if (typeof input === \"string\") {\n if (ISO8601DateRegex.test(input)) {\n return new Date(input);\n }\n }\n return input;\n}\nfunction deserializeGeoPoint(input) {\n if (isGeoJSONPoint(input)) {\n return new GeographyPoint({ longitude: input.coordinates[0], latitude: input.coordinates[1] });\n }\n return input;\n}\nfunction isGeoJSONPoint(obj) {\n const requiredKeys = [\"type\", \"coordinates\"];\n return isValidObject(obj, {\n requiredKeys,\n propertyValidator: (key) => {\n switch (key) {\n case \"type\":\n return obj.type === GeoJSONPointTypeName;\n break;\n case \"coordinates\":\n return isCoordinateArray(obj.coordinates);\n break;\n case \"crs\":\n return isCrs(obj.crs);\n break;\n default:\n return false;\n }\n },\n });\n}\nfunction isCoordinateArray(maybeCoordinates) {\n if (!Array.isArray(maybeCoordinates)) {\n return false;\n }\n if (maybeCoordinates.length !== 2) {\n return false;\n }\n if (typeof maybeCoordinates[0] !== \"number\" || typeof maybeCoordinates[1] !== \"number\") {\n return false;\n }\n return true;\n}\nfunction isCrs(maybeCrs) {\n return isValidObject(maybeCrs, {\n requiredKeys: [\"type\", \"properties\"],\n propertyValidator: (key) => {\n switch (key) {\n case \"type\":\n return maybeCrs.type === \"name\";\n break;\n case \"properties\":\n return isCrsProperties(maybeCrs.properties);\n break;\n default:\n return false;\n }\n },\n });\n}\nfunction isCrsProperties(maybeProperties) {\n return isValidObject(maybeProperties, {\n requiredKeys: [\"name\"],\n propertyValidator: (key) => {\n if (key === \"name\") {\n return maybeProperties.name === WorldGeodeticSystem1984;\n }\n else {\n return false;\n }\n },\n });\n}\nfunction isValidObject(obj, options = {}) {\n if (typeof obj !== \"object\" || obj === null) {\n return false;\n }\n const keys = Object.keys(obj);\n if (options.requiredKeys) {\n for (const requiredKey of options.requiredKeys) {\n if (!keys.includes(requiredKey)) {\n return false;\n }\n }\n }\n if (options.propertyValidator) {\n for (const key of keys) {\n if (!options.propertyValidator(key)) {\n return false;\n }\n }\n }\n return true;\n}\n//# sourceMappingURL=serialization.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nconst AcceptHeaderName = \"Accept\";\nconst odataMetadataPolicy = \"OdataMetadataPolicy\";\n/**\n * A policy factory for setting the Accept header to ignore odata metadata\n * @internal\n */\nexport function createOdataMetadataPolicy(metadataLevel) {\n return {\n name: odataMetadataPolicy,\n async sendRequest(request, next) {\n request.headers.set(AcceptHeaderName, `application/json;odata.metadata=${metadataLevel}`);\n return next(request);\n },\n };\n}\n//# sourceMappingURL=odataMetadataPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Class used to perform batch operations\n * with multiple documents to the index.\n */\nexport class IndexDocumentsBatch {\n constructor(actions = []) {\n this.actions = actions;\n }\n /**\n * Upload an array of documents to the index.\n * @param documents - The documents to upload.\n */\n upload(documents) {\n const batch = documents.map((doc) => {\n return Object.assign(Object.assign({}, doc), { __actionType: \"upload\" });\n });\n this.actions.push(...batch);\n }\n /**\n * Update a set of documents in the index.\n * For more details about how merging works, see https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents\n * @param documents - The updated documents.\n */\n merge(documents) {\n const batch = documents.map((doc) => {\n return Object.assign(Object.assign({}, doc), { __actionType: \"merge\" });\n });\n this.actions.push(...batch);\n }\n /**\n * Update a set of documents in the index or uploads them if they don't exist.\n * For more details about how merging works, see https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents\n * @param documents - The new/updated documents.\n */\n mergeOrUpload(documents) {\n const batch = documents.map((doc) => {\n return Object.assign(Object.assign({}, doc), { __actionType: \"mergeOrUpload\" });\n });\n this.actions.push(...batch);\n }\n delete(keyNameOrDocuments, keyValues) {\n if (keyValues) {\n const keyName = keyNameOrDocuments;\n const batch = keyValues.map((keyValue) => {\n return {\n __actionType: \"delete\",\n [keyName]: keyValue,\n };\n });\n this.actions.push(...batch);\n }\n else {\n const documents = keyNameOrDocuments;\n const batch = documents.map((document) => {\n return Object.assign({ __actionType: \"delete\" }, document);\n });\n this.actions.push(...batch);\n }\n }\n}\n//# sourceMappingURL=indexDocumentsBatch.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Encodes a string in base64 format.\n * @param value - The string to encode.\n */\nexport function encode(value) {\n return btoa(value);\n}\n/**\n * Decodes a base64 string into a regular string.\n * @param value - The base64 string to decode.\n */\nexport function decode(value) {\n return atob(value);\n}\n//# sourceMappingURL=base64.browser.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport function isComplexField(field) {\n return field.type === \"Edm.ComplexType\" || field.type === \"Collection(Edm.ComplexType)\";\n}\n/**\n * Defines values for TokenizerName.\n * @readonly\n */\nexport var KnownTokenizerNames;\n(function (KnownTokenizerNames) {\n /**\n * Grammar-based tokenizer that is suitable for processing most European-language documents. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/standard/ClassicTokenizer.html\n */\n KnownTokenizerNames[\"Classic\"] = \"classic\";\n /**\n * Tokenizes the input from an edge into n-grams of the given size(s). See\n * https://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ngram/EdgeNGramTokenizer.html\n */\n KnownTokenizerNames[\"EdgeNGram\"] = \"edgeNGram\";\n /**\n * Emits the entire input as a single token. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/KeywordTokenizer.html\n */\n KnownTokenizerNames[\"Keyword\"] = \"keyword_v2\";\n /**\n * Divides text at non-letters. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/LetterTokenizer.html\n */\n KnownTokenizerNames[\"Letter\"] = \"letter\";\n /**\n * Divides text at non-letters and converts them to lower case. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/LowerCaseTokenizer.html\n */\n KnownTokenizerNames[\"Lowercase\"] = \"lowercase\";\n /**\n * Divides text using language-specific rules.\n */\n // eslint-disable-next-line @typescript-eslint/no-shadow\n KnownTokenizerNames[\"MicrosoftLanguageTokenizer\"] = \"microsoft_language_tokenizer\";\n /**\n * Divides text using language-specific rules and reduces words to their base forms.\n */\n // eslint-disable-next-line @typescript-eslint/no-shadow\n KnownTokenizerNames[\"MicrosoftLanguageStemmingTokenizer\"] = \"microsoft_language_stemming_tokenizer\";\n /**\n * Tokenizes the input into n-grams of the given size(s). See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ngram/NGramTokenizer.html\n */\n KnownTokenizerNames[\"NGram\"] = \"nGram\";\n /**\n * Tokenizer for path-like hierarchies. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/path/PathHierarchyTokenizer.html\n */\n KnownTokenizerNames[\"PathHierarchy\"] = \"path_hierarchy_v2\";\n /**\n * Tokenizer that uses regex pattern matching to construct distinct tokens. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/pattern/PatternTokenizer.html\n */\n KnownTokenizerNames[\"Pattern\"] = \"pattern\";\n /**\n * Standard Lucene analyzer; Composed of the standard tokenizer, lowercase filter and stop\n * filter. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/standard/StandardTokenizer.html\n */\n KnownTokenizerNames[\"Standard\"] = \"standard_v2\";\n /**\n * Tokenizes urls and emails as one token. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.html\n */\n KnownTokenizerNames[\"UaxUrlEmail\"] = \"uax_url_email\";\n /**\n * Divides text at whitespace. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/WhitespaceTokenizer.html\n */\n KnownTokenizerNames[\"Whitespace\"] = \"whitespace\";\n})(KnownTokenizerNames || (KnownTokenizerNames = {}));\n/**\n * Defines values for TokenFilterName.\n * @readonly\n */\nexport var KnownTokenFilterNames;\n(function (KnownTokenFilterNames) {\n /**\n * A token filter that applies the Arabic normalizer to normalize the orthography. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ar/ArabicNormalizationFilter.html\n */\n KnownTokenFilterNames[\"ArabicNormalization\"] = \"arabic_normalization\";\n /**\n * Strips all characters after an apostrophe (including the apostrophe itself). See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/tr/ApostropheFilter.html\n */\n KnownTokenFilterNames[\"Apostrophe\"] = \"apostrophe\";\n /**\n * Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127\n * ASCII characters (the \"Basic Latin\" Unicode block) into their ASCII equivalents, if such\n * equivalents exist. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/ASCIIFoldingFilter.html\n */\n KnownTokenFilterNames[\"AsciiFolding\"] = \"asciifolding\";\n /**\n * Forms bigrams of CJK terms that are generated from StandardTokenizer. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/cjk/CJKBigramFilter.html\n */\n KnownTokenFilterNames[\"CjkBigram\"] = \"cjk_bigram\";\n /**\n * Normalizes CJK width differences. Folds fullwidth ASCII variants into the equivalent basic\n * Latin, and half-width Katakana variants into the equivalent Kana. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/cjk/CJKWidthFilter.html\n */\n KnownTokenFilterNames[\"CjkWidth\"] = \"cjk_width\";\n /**\n * Removes English possessives, and dots from acronyms. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/standard/ClassicFilter.html\n */\n KnownTokenFilterNames[\"Classic\"] = \"classic\";\n /**\n * Construct bigrams for frequently occurring terms while indexing. Single terms are still\n * indexed too, with bigrams overlaid. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/commongrams/CommonGramsFilter.html\n */\n KnownTokenFilterNames[\"CommonGram\"] = \"common_grams\";\n /**\n * Generates n-grams of the given size(s) starting from the front or the back of an input token.\n * See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ngram/EdgeNGramTokenFilter.html\n */\n KnownTokenFilterNames[\"EdgeNGram\"] = \"edgeNGram_v2\";\n /**\n * Removes elisions. For example, \"l'avion\" (the plane) will be converted to \"avion\" (plane). See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/util/ElisionFilter.html\n */\n KnownTokenFilterNames[\"Elision\"] = \"elision\";\n /**\n * Normalizes German characters according to the heuristics of the German2 snowball algorithm.\n * See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/de/GermanNormalizationFilter.html\n */\n KnownTokenFilterNames[\"GermanNormalization\"] = \"german_normalization\";\n /**\n * Normalizes text in Hindi to remove some differences in spelling variations. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/hi/HindiNormalizationFilter.html\n */\n KnownTokenFilterNames[\"HindiNormalization\"] = \"hindi_normalization\";\n /**\n * Normalizes the Unicode representation of text in Indian languages. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/in/IndicNormalizationFilter.html\n */\n KnownTokenFilterNames[\"IndicNormalization\"] = \"indic_normalization\";\n /**\n * Emits each incoming token twice, once as keyword and once as non-keyword. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/KeywordRepeatFilter.html\n */\n KnownTokenFilterNames[\"KeywordRepeat\"] = \"keyword_repeat\";\n /**\n * A high-performance kstem filter for English. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/en/KStemFilter.html\n */\n KnownTokenFilterNames[\"KStem\"] = \"kstem\";\n /**\n * Removes words that are too long or too short. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/LengthFilter.html\n */\n KnownTokenFilterNames[\"Length\"] = \"length\";\n /**\n * Limits the number of tokens while indexing. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/LimitTokenCountFilter.html\n */\n KnownTokenFilterNames[\"Limit\"] = \"limit\";\n /**\n * Normalizes token text to lower case. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/LowerCaseFilter.htm\n */\n KnownTokenFilterNames[\"Lowercase\"] = \"lowercase\";\n /**\n * Generates n-grams of the given size(s). See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ngram/NGramTokenFilter.html\n */\n KnownTokenFilterNames[\"NGram\"] = \"nGram_v2\";\n /**\n * Applies normalization for Persian. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/fa/PersianNormalizationFilter.html\n */\n KnownTokenFilterNames[\"PersianNormalization\"] = \"persian_normalization\";\n /**\n * Create tokens for phonetic matches. See\n * https://lucene.apache.org/core/4_10_3/analyzers-phonetic/org/apache/lucene/analysis/phonetic/package-tree.html\n */\n KnownTokenFilterNames[\"Phonetic\"] = \"phonetic\";\n /**\n * Uses the Porter stemming algorithm to transform the token stream. See\n * http://tartarus.org/~martin/PorterStemmer\n */\n KnownTokenFilterNames[\"PorterStem\"] = \"porter_stem\";\n /**\n * Reverses the token string. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/reverse/ReverseStringFilter.html\n */\n KnownTokenFilterNames[\"Reverse\"] = \"reverse\";\n /**\n * Normalizes use of the interchangeable Scandinavian characters. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/ScandinavianNormalizationFilter.html\n */\n KnownTokenFilterNames[\"ScandinavianNormalization\"] = \"scandinavian_normalization\";\n /**\n * Folds Scandinavian characters åÅäæÄÆ->a and öÖøØ->o. It also discriminates against use\n * of double vowels aa, ae, ao, oe and oo, leaving just the first one. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/ScandinavianFoldingFilter.html\n */\n KnownTokenFilterNames[\"ScandinavianFoldingNormalization\"] = \"scandinavian_folding\";\n /**\n * Creates combinations of tokens as a single token. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/shingle/ShingleFilter.html\n */\n KnownTokenFilterNames[\"Shingle\"] = \"shingle\";\n /**\n * A filter that stems words using a Snowball-generated stemmer. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/snowball/SnowballFilter.html\n */\n KnownTokenFilterNames[\"Snowball\"] = \"snowball\";\n /**\n * Normalizes the Unicode representation of Sorani text. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ckb/SoraniNormalizationFilter.html\n */\n KnownTokenFilterNames[\"SoraniNormalization\"] = \"sorani_normalization\";\n /**\n * Language specific stemming filter. See\n * https://docs.microsoft.com/rest/api/searchservice/Custom-analyzers-in-Azure-Search#TokenFilters\n */\n KnownTokenFilterNames[\"Stemmer\"] = \"stemmer\";\n /**\n * Removes stop words from a token stream. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/StopFilter.html\n */\n KnownTokenFilterNames[\"Stopwords\"] = \"stopwords\";\n /**\n * Trims leading and trailing whitespace from tokens. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/TrimFilter.html\n */\n KnownTokenFilterNames[\"Trim\"] = \"trim\";\n /**\n * Truncates the terms to a specific length. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/TruncateTokenFilter.html\n */\n KnownTokenFilterNames[\"Truncate\"] = \"truncate\";\n /**\n * Filters out tokens with same text as the previous token. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/RemoveDuplicatesTokenFilter.html\n */\n KnownTokenFilterNames[\"Unique\"] = \"unique\";\n /**\n * Normalizes token text to upper case. See\n * http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/UpperCaseFilter.html\n */\n KnownTokenFilterNames[\"Uppercase\"] = \"uppercase\";\n /**\n * Splits words into subwords and performs optional transformations on subword groups.\n */\n KnownTokenFilterNames[\"WordDelimiter\"] = \"word_delimiter\";\n})(KnownTokenFilterNames || (KnownTokenFilterNames = {}));\n/**\n * Defines values for CharFilterName.\n * @readonly\n */\nexport var KnownCharFilterNames;\n(function (KnownCharFilterNames) {\n /**\n * A character filter that attempts to strip out HTML constructs. See\n * https://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.html\n */\n KnownCharFilterNames[\"HtmlStrip\"] = \"html_strip\";\n})(KnownCharFilterNames || (KnownCharFilterNames = {}));\n/**\n * Defines values for AnalyzerName.\n * See https://docs.microsoft.com/rest/api/searchservice/Language-support\n * @readonly\n */\nexport var KnownAnalyzerNames;\n(function (KnownAnalyzerNames) {\n /**\n * Arabic\n */\n KnownAnalyzerNames[\"ArMicrosoft\"] = \"ar.microsoft\";\n /**\n * Arabic\n */\n KnownAnalyzerNames[\"ArLucene\"] = \"ar.lucene\";\n /**\n * Armenian\n */\n KnownAnalyzerNames[\"HyLucene\"] = \"hy.lucene\";\n /**\n * Bangla\n */\n KnownAnalyzerNames[\"BnMicrosoft\"] = \"bn.microsoft\";\n /**\n * Basque\n */\n KnownAnalyzerNames[\"EuLucene\"] = \"eu.lucene\";\n /**\n * Bulgarian\n */\n KnownAnalyzerNames[\"BgMicrosoft\"] = \"bg.microsoft\";\n /**\n * Bulgarian\n */\n KnownAnalyzerNames[\"BgLucene\"] = \"bg.lucene\";\n /**\n * Catalan\n */\n KnownAnalyzerNames[\"CaMicrosoft\"] = \"ca.microsoft\";\n /**\n * Catalan\n */\n KnownAnalyzerNames[\"CaLucene\"] = \"ca.lucene\";\n /**\n * Chinese Simplified\n */\n KnownAnalyzerNames[\"ZhHansMicrosoft\"] = \"zh-Hans.microsoft\";\n /**\n * Chinese Simplified\n */\n KnownAnalyzerNames[\"ZhHansLucene\"] = \"zh-Hans.lucene\";\n /**\n * Chinese Traditional\n */\n KnownAnalyzerNames[\"ZhHantMicrosoft\"] = \"zh-Hant.microsoft\";\n /**\n * Chinese Traditional\n */\n KnownAnalyzerNames[\"ZhHantLucene\"] = \"zh-Hant.lucene\";\n /**\n * Croatian\n */\n KnownAnalyzerNames[\"HrMicrosoft\"] = \"hr.microsoft\";\n /**\n * Czech\n */\n KnownAnalyzerNames[\"CsMicrosoft\"] = \"cs.microsoft\";\n /**\n * Czech\n */\n KnownAnalyzerNames[\"CsLucene\"] = \"cs.lucene\";\n /**\n * Danish\n */\n KnownAnalyzerNames[\"DaMicrosoft\"] = \"da.microsoft\";\n /**\n * Danish\n */\n KnownAnalyzerNames[\"DaLucene\"] = \"da.lucene\";\n /**\n * Dutch\n */\n KnownAnalyzerNames[\"NlMicrosoft\"] = \"nl.microsoft\";\n /**\n * Dutch\n */\n KnownAnalyzerNames[\"NlLucene\"] = \"nl.lucene\";\n /**\n * English\n */\n KnownAnalyzerNames[\"EnMicrosoft\"] = \"en.microsoft\";\n /**\n * English\n */\n KnownAnalyzerNames[\"EnLucene\"] = \"en.lucene\";\n /**\n * Estonian\n */\n KnownAnalyzerNames[\"EtMicrosoft\"] = \"et.microsoft\";\n /**\n * Finnish\n */\n KnownAnalyzerNames[\"FiMicrosoft\"] = \"fi.microsoft\";\n /**\n * Finnish\n */\n KnownAnalyzerNames[\"FiLucene\"] = \"fi.lucene\";\n /**\n * French\n */\n KnownAnalyzerNames[\"FrMicrosoft\"] = \"fr.microsoft\";\n /**\n * French\n */\n KnownAnalyzerNames[\"FrLucene\"] = \"fr.lucene\";\n /**\n * Galician\n */\n KnownAnalyzerNames[\"GlLucene\"] = \"gl.lucene\";\n /**\n * German\n */\n KnownAnalyzerNames[\"DeMicrosoft\"] = \"de.microsoft\";\n /**\n * German\n */\n KnownAnalyzerNames[\"DeLucene\"] = \"de.lucene\";\n /**\n * Greek\n */\n KnownAnalyzerNames[\"ElMicrosoft\"] = \"el.microsoft\";\n /**\n * Greek\n */\n KnownAnalyzerNames[\"ElLucene\"] = \"el.lucene\";\n /**\n * Gujarati\n */\n KnownAnalyzerNames[\"GuMicrosoft\"] = \"gu.microsoft\";\n /**\n * Hebrew\n */\n KnownAnalyzerNames[\"HeMicrosoft\"] = \"he.microsoft\";\n /**\n * Hindi\n */\n KnownAnalyzerNames[\"HiMicrosoft\"] = \"hi.microsoft\";\n /**\n * Hindi\n */\n KnownAnalyzerNames[\"HiLucene\"] = \"hi.lucene\";\n /**\n * Hungarian\n */\n KnownAnalyzerNames[\"HuMicrosoft\"] = \"hu.microsoft\";\n /**\n * Hungarian\n */\n KnownAnalyzerNames[\"HuLucene\"] = \"hu.lucene\";\n /**\n * Icelandic\n */\n KnownAnalyzerNames[\"IsMicrosoft\"] = \"is.microsoft\";\n /**\n * Indonesian (Bahasa)\n */\n KnownAnalyzerNames[\"IdMicrosoft\"] = \"id.microsoft\";\n /**\n * Indonesian (Bahasa)\n */\n KnownAnalyzerNames[\"IdLucene\"] = \"id.lucene\";\n /**\n * Irish\n */\n KnownAnalyzerNames[\"GaLucene\"] = \"ga.lucene\";\n /**\n * Italian\n */\n KnownAnalyzerNames[\"ItMicrosoft\"] = \"it.microsoft\";\n /**\n * Italian\n */\n KnownAnalyzerNames[\"ItLucene\"] = \"it.lucene\";\n /**\n * Japanese\n */\n KnownAnalyzerNames[\"JaMicrosoft\"] = \"ja.microsoft\";\n /**\n * Japanese\n */\n KnownAnalyzerNames[\"JaLucene\"] = \"ja.lucene\";\n /**\n * Kannada\n */\n KnownAnalyzerNames[\"KnMicrosoft\"] = \"kn.microsoft\";\n /**\n * Korean\n */\n KnownAnalyzerNames[\"KoMicrosoft\"] = \"ko.microsoft\";\n /**\n * Korean\n */\n KnownAnalyzerNames[\"KoLucene\"] = \"ko.lucene\";\n /**\n * Latvian\n */\n KnownAnalyzerNames[\"LvMicrosoft\"] = \"lv.microsoft\";\n /**\n * Latvian\n */\n KnownAnalyzerNames[\"LvLucene\"] = \"lv.lucene\";\n /**\n * Lithuanian\n */\n KnownAnalyzerNames[\"LtMicrosoft\"] = \"lt.microsoft\";\n /**\n * Malayalam\n */\n KnownAnalyzerNames[\"MlMicrosoft\"] = \"ml.microsoft\";\n /**\n * Malay (Latin)\n */\n KnownAnalyzerNames[\"MsMicrosoft\"] = \"ms.microsoft\";\n /**\n * Marathi\n */\n KnownAnalyzerNames[\"MrMicrosoft\"] = \"mr.microsoft\";\n /**\n * Norwegian\n */\n KnownAnalyzerNames[\"NbMicrosoft\"] = \"nb.microsoft\";\n /**\n * Norwegian\n */\n KnownAnalyzerNames[\"NoLucene\"] = \"no.lucene\";\n /**\n * Persian\n */\n KnownAnalyzerNames[\"FaLucene\"] = \"fa.lucene\";\n /**\n * Polish\n */\n KnownAnalyzerNames[\"PlMicrosoft\"] = \"pl.microsoft\";\n /**\n * Polish\n */\n KnownAnalyzerNames[\"PlLucene\"] = \"pl.lucene\";\n /**\n * Portuguese (Brazil)\n */\n KnownAnalyzerNames[\"PtBRMicrosoft\"] = \"pt-BR.microsoft\";\n /**\n * Portuguese (Brazil)\n */\n KnownAnalyzerNames[\"PtBRLucene\"] = \"pt-BR.lucene\";\n /**\n * Portuguese (Portugal)\n */\n KnownAnalyzerNames[\"PtPTMicrosoft\"] = \"pt-PT.microsoft\";\n /**\n * Portuguese (Portugal)\n */\n KnownAnalyzerNames[\"PtPTLucene\"] = \"pt-PT.lucene\";\n /**\n * Punjabi\n */ KnownAnalyzerNames[\"PaMicrosoft\"] = \"pa.microsoft\";\n /**\n * Romanian\n */\n KnownAnalyzerNames[\"RoMicrosoft\"] = \"ro.microsoft\";\n /**\n * Romanian\n */\n KnownAnalyzerNames[\"RoLucene\"] = \"ro.lucene\";\n /**\n * Russian\n */\n KnownAnalyzerNames[\"RuMicrosoft\"] = \"ru.microsoft\";\n /**\n * Russian\n */\n KnownAnalyzerNames[\"RuLucene\"] = \"ru.lucene\";\n /**\n * Serbian (Cyrillic)\n */\n KnownAnalyzerNames[\"SrCyrillicMicrosoft\"] = \"sr-cyrillic.microsoft\";\n /**\n * Serbian (Latin)\n */\n KnownAnalyzerNames[\"SrLatinMicrosoft\"] = \"sr-latin.microsoft\";\n /**\n * Slovak\n */\n KnownAnalyzerNames[\"SkMicrosoft\"] = \"sk.microsoft\";\n /**\n * Slovenian\n */\n KnownAnalyzerNames[\"SlMicrosoft\"] = \"sl.microsoft\";\n /**\n * Spanish\n */\n KnownAnalyzerNames[\"EsMicrosoft\"] = \"es.microsoft\";\n /**\n * Spanish\n */\n KnownAnalyzerNames[\"EsLucene\"] = \"es.lucene\";\n /**\n * Swedish\n */\n KnownAnalyzerNames[\"SvMicrosoft\"] = \"sv.microsoft\";\n /**\n * Swedish\n */\n KnownAnalyzerNames[\"SvLucene\"] = \"sv.lucene\";\n /**\n * Tamil\n */\n KnownAnalyzerNames[\"TaMicrosoft\"] = \"ta.microsoft\";\n /**\n * Telugu\n */\n KnownAnalyzerNames[\"TeMicrosoft\"] = \"te.microsoft\";\n /**\n * Thai\n */\n KnownAnalyzerNames[\"ThMicrosoft\"] = \"th.microsoft\";\n /**\n * Thai\n */\n KnownAnalyzerNames[\"ThLucene\"] = \"th.lucene\";\n /**\n * Turkish\n */\n KnownAnalyzerNames[\"TrMicrosoft\"] = \"tr.microsoft\";\n /**\n * Turkish\n */\n KnownAnalyzerNames[\"TrLucene\"] = \"tr.lucene\";\n /**\n * Ukrainian\n */\n KnownAnalyzerNames[\"UkMicrosoft\"] = \"uk.microsoft\";\n /**\n * Urdu\n */\n KnownAnalyzerNames[\"UrMicrosoft\"] = \"ur.microsoft\";\n /**\n * Vietnamese\n */\n KnownAnalyzerNames[\"ViMicrosoft\"] = \"vi.microsoft\";\n /**\n * See: https://lucene.apache.org/core/6_6_1/core/org/apache/lucene/analysis/standard/StandardAnalyzer.html\n */\n KnownAnalyzerNames[\"StandardLucene\"] = \"standard.lucene\";\n /**\n * See https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/miscellaneous/ASCIIFoldingFilter.html\n */\n KnownAnalyzerNames[\"StandardAsciiFoldingLucene\"] = \"standardasciifolding.lucene\";\n /**\n * Treats the entire content of a field as a single token. This is useful for data like zip codes, ids, and some product names.\n */\n KnownAnalyzerNames[\"Keyword\"] = \"keyword\";\n /**\n * Flexibly separates text into terms via a regular expression pattern.\n */\n KnownAnalyzerNames[\"Pattern\"] = \"pattern\";\n /**\n * Divides text at non-letters and converts them to lower case.\n */\n KnownAnalyzerNames[\"Simple\"] = \"simple\";\n /**\n * Divides text at non-letters; Applies the lowercase and stopword token filters.\n */\n KnownAnalyzerNames[\"Stop\"] = \"stop\";\n /**\n * An analyzer that uses the whitespace tokenizer.\n */\n KnownAnalyzerNames[\"Whitespace\"] = \"whitespace\";\n})(KnownAnalyzerNames || (KnownAnalyzerNames = {}));\n// END manually modified generated interfaces\n//# sourceMappingURL=serviceModels.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { __rest } from \"tslib\";\nimport { isComplexField, } from \"./serviceModels\";\nexport function convertSkillsToPublic(skills) {\n if (!skills) {\n return skills;\n }\n const result = [];\n for (const skill of skills) {\n switch (skill.odatatype) {\n case \"#Microsoft.Skills.Util.ConditionalSkill\":\n result.push(skill);\n break;\n case \"#Microsoft.Skills.Text.KeyPhraseExtractionSkill\":\n result.push(skill);\n break;\n case \"#Microsoft.Skills.Vision.OcrSkill\":\n result.push(skill);\n break;\n case \"#Microsoft.Skills.Vision.ImageAnalysisSkill\":\n result.push(skill);\n break;\n case \"#Microsoft.Skills.Text.LanguageDetectionSkill\":\n result.push(skill);\n break;\n case \"#Microsoft.Skills.Util.ShaperSkill\":\n result.push(skill);\n break;\n case \"#Microsoft.Skills.Text.MergeSkill\":\n result.push(skill);\n break;\n case \"#Microsoft.Skills.Text.EntityRecognitionSkill\":\n result.push(skill);\n break;\n case \"#Microsoft.Skills.Text.SentimentSkill\":\n result.push(skill);\n break;\n case \"#Microsoft.Skills.Text.SplitSkill\":\n result.push(skill);\n break;\n case \"#Microsoft.Skills.Text.TranslationSkill\":\n result.push(skill);\n break;\n case \"#Microsoft.Skills.Custom.WebApiSkill\":\n result.push(skill);\n break;\n case \"#Microsoft.Skills.Text.CustomEntityLookupSkill\":\n result.push(skill);\n break;\n case \"#Microsoft.Skills.Util.DocumentExtractionSkill\":\n result.push(skill);\n break;\n }\n }\n return result;\n}\nexport function convertCognitiveServicesAccountToGenerated(cognitiveServicesAccount) {\n if (!cognitiveServicesAccount) {\n return cognitiveServicesAccount;\n }\n return cognitiveServicesAccount;\n}\nexport function convertCognitiveServicesAccountToPublic(cognitiveServicesAccount) {\n if (!cognitiveServicesAccount) {\n return cognitiveServicesAccount;\n }\n if (cognitiveServicesAccount.odatatype === \"#Microsoft.Azure.Search.DefaultCognitiveServices\") {\n return cognitiveServicesAccount;\n }\n else {\n return cognitiveServicesAccount;\n }\n}\nexport function convertTokenFiltersToGenerated(tokenFilters) {\n if (!tokenFilters) {\n return tokenFilters;\n }\n const result = [];\n for (const filter of tokenFilters) {\n result.push(filter);\n }\n return result;\n}\nexport function convertAnalyzersToGenerated(analyzers) {\n if (!analyzers) {\n return analyzers;\n }\n const result = [];\n for (const analyzer of analyzers) {\n switch (analyzer.odatatype) {\n case \"#Microsoft.Azure.Search.StandardAnalyzer\":\n case \"#Microsoft.Azure.Search.StopAnalyzer\":\n result.push(analyzer);\n break;\n case \"#Microsoft.Azure.Search.PatternAnalyzer\":\n result.push(Object.assign(Object.assign({}, analyzer), { flags: analyzer.flags ? analyzer.flags.join(\"|\") : undefined }));\n break;\n case \"#Microsoft.Azure.Search.CustomAnalyzer\":\n result.push(Object.assign(Object.assign({}, analyzer), { tokenizerName: analyzer.tokenizerName }));\n break;\n }\n }\n return result;\n}\nexport function convertAnalyzersToPublic(analyzers) {\n if (!analyzers) {\n return analyzers;\n }\n const result = [];\n for (const analyzer of analyzers) {\n switch (analyzer.odatatype) {\n case \"#Microsoft.Azure.Search.StandardAnalyzer\":\n result.push(analyzer);\n break;\n case \"#Microsoft.Azure.Search.StopAnalyzer\":\n result.push(analyzer);\n break;\n case \"#Microsoft.Azure.Search.PatternAnalyzer\":\n result.push(Object.assign(Object.assign({}, analyzer), { flags: analyzer.flags\n ? analyzer.flags.split(\"|\")\n : undefined }));\n break;\n case \"#Microsoft.Azure.Search.CustomAnalyzer\":\n result.push(Object.assign(Object.assign({}, analyzer), { tokenizerName: analyzer.tokenizerName }));\n break;\n }\n }\n return result;\n}\nexport function convertFieldsToPublic(fields) {\n if (!fields) {\n return fields;\n }\n return fields.map((field) => {\n if (field.type === \"Collection(Edm.ComplexType)\" || field.type === \"Edm.ComplexType\") {\n const result = {\n name: field.name,\n type: field.type,\n fields: convertFieldsToPublic(field.fields),\n };\n return result;\n }\n else {\n const { synonymMaps, retrievable } = field, restField = __rest(field, [\"synonymMaps\", \"retrievable\"]);\n const type = field.type;\n const hidden = typeof retrievable === \"boolean\" ? !retrievable : retrievable;\n const analyzerName = field.analyzer;\n const searchAnalyzerName = field.searchAnalyzer;\n const indexAnalyzerName = field.indexAnalyzer;\n const result = Object.assign(Object.assign({}, restField), { type,\n hidden,\n analyzerName,\n searchAnalyzerName,\n indexAnalyzerName, synonymMapNames: synonymMaps });\n return result;\n }\n });\n}\nexport function convertFieldsToGenerated(fields) {\n return fields.map((field) => {\n var _a, _b, _c, _d;\n if (isComplexField(field)) {\n return {\n name: field.name,\n type: field.type,\n fields: convertFieldsToGenerated(field.fields),\n };\n }\n else {\n const { hidden } = field, restField = __rest(field, [\"hidden\"]);\n const retrievable = typeof hidden === \"boolean\" ? !hidden : hidden;\n return Object.assign(Object.assign({}, restField), { retrievable, \n // modify API defaults to use less storage for simple types\n searchable: (_a = field.searchable) !== null && _a !== void 0 ? _a : false, filterable: (_b = field.filterable) !== null && _b !== void 0 ? _b : false, facetable: (_c = field.facetable) !== null && _c !== void 0 ? _c : false, sortable: (_d = field.sortable) !== null && _d !== void 0 ? _d : false, analyzer: field.analyzerName, searchAnalyzer: field.searchAnalyzerName, indexAnalyzer: field.indexAnalyzerName, synonymMaps: field.synonymMapNames });\n }\n });\n}\nexport function convertTokenizersToGenerated(tokenizers) {\n if (!tokenizers) {\n return tokenizers;\n }\n const result = [];\n for (const tokenizer of tokenizers) {\n if (tokenizer.odatatype === \"#Microsoft.Azure.Search.PatternTokenizer\") {\n result.push(Object.assign(Object.assign({}, tokenizer), { flags: tokenizer.flags ? tokenizer.flags.join(\"|\") : undefined }));\n }\n else {\n result.push(tokenizer);\n }\n }\n return result;\n}\nexport function convertTokenizersToPublic(tokenizers) {\n if (!tokenizers) {\n return tokenizers;\n }\n const result = [];\n for (const tokenizer of tokenizers) {\n if (tokenizer.odatatype === \"#Microsoft.Azure.Search.PatternTokenizer\") {\n result.push(Object.assign(Object.assign({}, tokenizer), { flags: tokenizer.flags\n ? tokenizer.flags.split(\"|\")\n : undefined }));\n }\n else {\n result.push(tokenizer);\n }\n }\n return result;\n}\nexport function convertSimilarityToGenerated(similarity) {\n if (!similarity) {\n return similarity;\n }\n return similarity;\n}\nexport function convertSimilarityToPublic(similarity) {\n if (!similarity) {\n return similarity;\n }\n if (similarity.odatatype === \"#Microsoft.Azure.Search.ClassicSimilarity\") {\n return similarity;\n }\n else {\n return similarity;\n }\n}\nexport function convertEncryptionKeyToPublic(encryptionKey) {\n if (!encryptionKey) {\n return encryptionKey;\n }\n const result = {\n keyName: encryptionKey.keyName,\n keyVersion: encryptionKey.keyVersion,\n vaultUrl: encryptionKey.vaultUri,\n };\n if (encryptionKey.accessCredentials) {\n result.applicationId = encryptionKey.accessCredentials.applicationId;\n result.applicationSecret = encryptionKey.accessCredentials.applicationSecret;\n }\n return result;\n}\nexport function convertEncryptionKeyToGenerated(encryptionKey) {\n if (!encryptionKey) {\n return encryptionKey;\n }\n const result = {\n keyName: encryptionKey.keyName,\n keyVersion: encryptionKey.keyVersion,\n vaultUri: encryptionKey.vaultUrl,\n };\n if (encryptionKey.applicationId) {\n result.accessCredentials = {\n applicationId: encryptionKey.applicationId,\n applicationSecret: encryptionKey.applicationSecret,\n };\n }\n return result;\n}\nexport function generatedIndexToPublicIndex(generatedIndex) {\n return {\n name: generatedIndex.name,\n defaultScoringProfile: generatedIndex.defaultScoringProfile,\n corsOptions: generatedIndex.corsOptions,\n suggesters: generatedIndex.suggesters,\n encryptionKey: convertEncryptionKeyToPublic(generatedIndex.encryptionKey),\n etag: generatedIndex.etag,\n analyzers: convertAnalyzersToPublic(generatedIndex.analyzers),\n tokenizers: convertTokenizersToPublic(generatedIndex.tokenizers),\n tokenFilters: generatedIndex.tokenFilters,\n charFilters: generatedIndex.charFilters,\n scoringProfiles: generatedIndex.scoringProfiles,\n fields: convertFieldsToPublic(generatedIndex.fields),\n similarity: convertSimilarityToPublic(generatedIndex.similarity),\n };\n}\nexport function generatedSearchResultToPublicSearchResult(results) {\n const returnValues = results.map((result) => {\n const { _score, _highlights, rerankerScore, captions } = result, restProps = __rest(result, [\"_score\", \"_highlights\", \"rerankerScore\", \"captions\"]);\n const doc = Object.assign({}, restProps);\n const obj = {\n score: _score,\n highlights: _highlights,\n rerankerScore,\n captions,\n document: doc,\n };\n return obj;\n });\n return returnValues;\n}\nexport function generatedSuggestDocumentsResultToPublicSuggestDocumentsResult(searchDocumentsResult) {\n const results = searchDocumentsResult.results.map((element) => {\n const { _text } = element, restProps = __rest(element, [\"_text\"]);\n const doc = Object.assign({}, restProps);\n const obj = {\n text: _text,\n document: doc,\n };\n return obj;\n });\n const result = {\n results: results,\n coverage: searchDocumentsResult.coverage,\n };\n return result;\n}\nexport function publicIndexToGeneratedIndex(index) {\n const { encryptionKey, tokenFilters, analyzers, tokenizers, fields, similarity } = index, props = __rest(index, [\"encryptionKey\", \"tokenFilters\", \"analyzers\", \"tokenizers\", \"fields\", \"similarity\"]);\n return Object.assign(Object.assign({}, props), { encryptionKey: convertEncryptionKeyToGenerated(encryptionKey), tokenFilters: convertTokenFiltersToGenerated(tokenFilters), analyzers: convertAnalyzersToGenerated(analyzers), tokenizers: convertTokenizersToGenerated(tokenizers), fields: convertFieldsToGenerated(fields), similarity: convertSimilarityToGenerated(similarity) });\n}\nexport function generatedSkillsetToPublicSkillset(generatedSkillset) {\n const { skills, cognitiveServicesAccount, encryptionKey } = generatedSkillset, props = __rest(generatedSkillset, [\"skills\", \"cognitiveServicesAccount\", \"encryptionKey\"]);\n return Object.assign(Object.assign({}, props), { skills: convertSkillsToPublic(skills), cognitiveServicesAccount: convertCognitiveServicesAccountToPublic(cognitiveServicesAccount), encryptionKey: convertEncryptionKeyToPublic(encryptionKey) });\n}\nexport function publicSkillsetToGeneratedSkillset(skillset) {\n return {\n name: skillset.name,\n description: skillset.description,\n etag: skillset.etag,\n skills: skillset.skills,\n cognitiveServicesAccount: convertCognitiveServicesAccountToGenerated(skillset.cognitiveServicesAccount),\n knowledgeStore: skillset.knowledgeStore,\n encryptionKey: convertEncryptionKeyToGenerated(skillset.encryptionKey),\n };\n}\nexport function generatedSynonymMapToPublicSynonymMap(synonymMap) {\n const result = {\n name: synonymMap.name,\n encryptionKey: convertEncryptionKeyToPublic(synonymMap.encryptionKey),\n etag: synonymMap.etag,\n synonyms: [],\n };\n if (synonymMap.synonyms) {\n result.synonyms = synonymMap.synonyms.split(\"\\n\");\n }\n return result;\n}\nexport function publicSynonymMapToGeneratedSynonymMap(synonymMap) {\n const result = {\n name: synonymMap.name,\n format: \"solr\",\n encryptionKey: convertEncryptionKeyToGenerated(synonymMap.encryptionKey),\n etag: synonymMap.etag,\n synonyms: synonymMap.synonyms.join(\"\\n\"),\n };\n result.encryptionKey = convertEncryptionKeyToGenerated(synonymMap.encryptionKey);\n return result;\n}\nexport function publicSearchIndexerToGeneratedSearchIndexer(indexer) {\n return Object.assign(Object.assign({}, indexer), { encryptionKey: convertEncryptionKeyToGenerated(indexer.encryptionKey) });\n}\nexport function generatedSearchIndexerToPublicSearchIndexer(indexer) {\n const { encryptionKey } = indexer, props = __rest(indexer, [\"encryptionKey\"]);\n return Object.assign(Object.assign({}, props), { encryptionKey: convertEncryptionKeyToPublic(indexer.encryptionKey) });\n}\nexport function publicDataSourceToGeneratedDataSource(dataSource) {\n return {\n name: dataSource.name,\n description: dataSource.description,\n type: dataSource.type,\n credentials: {\n connectionString: dataSource.connectionString,\n },\n container: dataSource.container,\n etag: dataSource.etag,\n dataChangeDetectionPolicy: dataSource.dataChangeDetectionPolicy,\n dataDeletionDetectionPolicy: dataSource.dataDeletionDetectionPolicy,\n encryptionKey: convertEncryptionKeyToGenerated(dataSource.encryptionKey),\n };\n}\nexport function generatedDataSourceToPublicDataSource(dataSource) {\n return {\n name: dataSource.name,\n description: dataSource.name,\n type: dataSource.type,\n connectionString: dataSource.credentials.connectionString,\n container: dataSource.container,\n etag: dataSource.etag,\n dataChangeDetectionPolicy: convertDataChangeDetectionPolicyToPublic(dataSource.dataChangeDetectionPolicy),\n dataDeletionDetectionPolicy: convertDataDeletionDetectionPolicyToPublic(dataSource.dataDeletionDetectionPolicy),\n encryptionKey: convertEncryptionKeyToPublic(dataSource.encryptionKey),\n };\n}\nexport function convertDataChangeDetectionPolicyToPublic(dataChangeDetectionPolicy) {\n if (!dataChangeDetectionPolicy) {\n return dataChangeDetectionPolicy;\n }\n if (dataChangeDetectionPolicy.odatatype ===\n \"#Microsoft.Azure.Search.HighWaterMarkChangeDetectionPolicy\") {\n return dataChangeDetectionPolicy;\n }\n else {\n return dataChangeDetectionPolicy;\n }\n}\nexport function convertDataDeletionDetectionPolicyToPublic(dataDeletionDetectionPolicy) {\n if (!dataDeletionDetectionPolicy) {\n return dataDeletionDetectionPolicy;\n }\n return dataDeletionDetectionPolicy;\n}\nexport function getRandomIntegerInclusive(min, max) {\n // Make sure inputs are integers.\n min = Math.ceil(min);\n max = Math.floor(max);\n // Pick a random offset from zero to the size of the range.\n // Since Math.random() can never return 1, we have to make the range one larger\n // in order to be inclusive of the maximum value after we take the floor.\n const offset = Math.floor(Math.random() * (max - min + 1));\n return offset + min;\n}\n/**\n * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds.\n * @param timeInMs - The number of milliseconds to be delayed.\n * @returns Promise that is resolved after timeInMs\n */\nexport function delay(timeInMs) {\n return new Promise((resolve) => setTimeout(() => resolve(), timeInMs));\n}\nexport const serviceVersions = [\"2020-06-30\"];\nexport const defaultServiceVersion = \"2020-06-30\";\n//# sourceMappingURL=serviceUtils.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Known values for Search Audience\n */\nexport var KnownSearchAudience;\n(function (KnownSearchAudience) {\n /**\n * Audience for Azure China\n */\n KnownSearchAudience[\"AzureChina\"] = \"https://search.azure.cn\";\n /**\n * Audience for Azure Government\n */\n KnownSearchAudience[\"AzureGovernment\"] = \"https://search.azure.us\";\n /**\n * Audience for Azure Public\n */\n KnownSearchAudience[\"AzurePublicCloud\"] = \"https://search.azure.com\";\n})(KnownSearchAudience || (KnownSearchAudience = {}));\n//# sourceMappingURL=searchAudience.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport const SDK_VERSION = \"11.3.3\";\n//# sourceMappingURL=constants.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { __asyncDelegator, __asyncGenerator, __asyncValues, __await, __rest } from \"tslib\";\nimport { bearerTokenAuthenticationPolicy, } from \"@azure/core-rest-pipeline\";\nimport { SearchClient as GeneratedClient } from \"./generated/data/searchClient\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { createSearchApiKeyCredentialPolicy } from \"./searchApiKeyCredentialPolicy\";\nimport { logger } from \"./logger\";\nimport { createSpan } from \"./tracing\";\nimport { deserialize, serialize } from \"./serialization\";\nimport { createOdataMetadataPolicy } from \"./odataMetadataPolicy\";\nimport { IndexDocumentsBatch } from \"./indexDocumentsBatch\";\nimport { decode, encode } from \"./base64\";\nimport * as utils from \"./serviceUtils\";\nimport { KnownSearchAudience } from \"./searchAudience\";\nimport { SDK_VERSION } from \"./constants\";\n/**\n * Class used to perform operations against a search index,\n * including querying documents in the index as well as\n * adding, updating, and removing them.\n */\nexport class SearchClient {\n /**\n * Creates an instance of SearchClient.\n *\n * Example usage:\n * ```ts\n * const { SearchClient, AzureKeyCredential } = require(\"@azure/search-documents\");\n *\n * const client = new SearchClient(\n * \"\",\n * \"\",\n * new AzureKeyCredential(\"\")\n * );\n * ```\n * @param endpoint - The endpoint of the search service\n * @param indexName - The name of the index\n * @param credential - Used to authenticate requests to the service.\n * @param options - Used to configure the Search client.\n *\n * @typeParam TModel - An optional type that represents the documents stored in\n * the search index. For the best typing experience, all non-key fields should\n * be marked optional and nullable, and the key property should have the\n * non-nullable type `string`.\n */\n constructor(endpoint, indexName, credential, options = {}) {\n var _a, _b;\n /**\n * The API version to use when communicating with the service.\n */\n this.apiVersion = utils.defaultServiceVersion;\n this.endpoint = endpoint;\n this.indexName = indexName;\n const libInfo = `azsdk-js-search-documents/${SDK_VERSION}`;\n const userAgentOptions = Object.assign(Object.assign({}, options.userAgentOptions), { userAgentPrefix: ((_a = options.userAgentOptions) === null || _a === void 0 ? void 0 : _a.userAgentPrefix)\n ? `${options.userAgentOptions.userAgentPrefix} ${libInfo}`\n : libInfo });\n const loggingOptions = {\n logger: logger.info,\n additionalAllowedHeaderNames: [\n \"elapsed-time\",\n \"Location\",\n \"OData-MaxVersion\",\n \"OData-Version\",\n \"Prefer\",\n \"throttle-reason\",\n ],\n };\n const internalClientPipelineOptions = Object.assign(Object.assign({}, options), { userAgentOptions,\n loggingOptions });\n this.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : utils.defaultServiceVersion;\n this.client = new GeneratedClient(this.endpoint, this.indexName, this.apiVersion, internalClientPipelineOptions);\n if (isTokenCredential(credential)) {\n const scope = options.audience\n ? `${options.audience}/.default`\n : `${KnownSearchAudience.AzurePublicCloud}/.default`;\n this.client.pipeline.addPolicy(bearerTokenAuthenticationPolicy({ credential, scopes: scope }));\n }\n else {\n this.client.pipeline.addPolicy(createSearchApiKeyCredentialPolicy(credential));\n }\n this.client.pipeline.addPolicy(createOdataMetadataPolicy(\"none\"));\n }\n /**\n * Retrieves the number of documents in the index.\n * @param options - Options to the count operation.\n */\n async getDocumentsCount(options = {}) {\n const { span, updatedOptions } = createSpan(\"SearchClient-getDocumentsCount\", options);\n try {\n let documentsCount = 0;\n await this.client.documents.count(Object.assign(Object.assign({}, updatedOptions), { onResponse: (rawResponse, flatResponse) => {\n documentsCount = Number(rawResponse.bodyAsText);\n if (updatedOptions.onResponse) {\n updatedOptions.onResponse(rawResponse, flatResponse);\n }\n } }));\n return documentsCount;\n }\n catch (e) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Based on a partial searchText from the user, return a list\n * of potential completion strings based on a specified suggester.\n * @param searchText - The search text on which to base autocomplete results.\n * @param suggesterName - The name of the suggester as specified in the suggesters collection that's part of the index definition.\n * @param options - Options to the autocomplete operation.\n */\n async autocomplete(searchText, suggesterName, options = {}) {\n const { searchFields } = options, nonFieldOptions = __rest(options, [\"searchFields\"]);\n const fullOptions = Object.assign({ searchText: searchText, suggesterName: suggesterName, searchFields: this.convertSearchFields(searchFields) }, nonFieldOptions);\n if (!fullOptions.searchText) {\n throw new RangeError(\"searchText must be provided.\");\n }\n if (!fullOptions.suggesterName) {\n throw new RangeError(\"suggesterName must be provided.\");\n }\n const { span, updatedOptions } = createSpan(\"SearchClient-autocomplete\", options);\n try {\n const result = await this.client.documents.autocompletePost(fullOptions, updatedOptions);\n return result;\n }\n catch (e) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n async searchDocuments(searchText, options = {}, nextPageParameters = {}) {\n const { searchFields, select, orderBy, includeTotalCount } = options, restOptions = __rest(options, [\"searchFields\", \"select\", \"orderBy\", \"includeTotalCount\"]);\n const fullOptions = Object.assign(Object.assign(Object.assign({}, restOptions), nextPageParameters), { searchFields: this.convertSearchFields(searchFields), select: this.convertSelect(select) || \"*\", orderBy: this.convertOrderBy(orderBy), includeTotalResultCount: includeTotalCount });\n const { span, updatedOptions } = createSpan(\"SearchClient-searchDocuments\", options);\n try {\n const result = await this.client.documents.searchPost(Object.assign(Object.assign({}, fullOptions), { searchText: searchText }), updatedOptions);\n const { results, nextLink, nextPageParameters: resultNextPageParameters } = result, restResult = __rest(result, [\"results\", \"nextLink\", \"nextPageParameters\"]);\n const modifiedResults = utils.generatedSearchResultToPublicSearchResult(results);\n const converted = Object.assign(Object.assign({}, restResult), { results: modifiedResults, continuationToken: this.encodeContinuationToken(nextLink, resultNextPageParameters) });\n return deserialize(converted);\n }\n catch (e) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n listSearchResultsPage(searchText, options = {}, settings = {}) {\n return __asyncGenerator(this, arguments, function* listSearchResultsPage_1() {\n let decodedContinuation = this.decodeContinuationToken(settings.continuationToken);\n let result = yield __await(this.searchDocuments(searchText, options, decodedContinuation === null || decodedContinuation === void 0 ? void 0 : decodedContinuation.nextPageParameters));\n yield yield __await(result);\n // Technically, we should also leverage nextLink, but the generated code\n // doesn't support this yet.\n while (result.continuationToken) {\n decodedContinuation = this.decodeContinuationToken(result.continuationToken);\n result = yield __await(this.searchDocuments(searchText, options, decodedContinuation === null || decodedContinuation === void 0 ? void 0 : decodedContinuation.nextPageParameters));\n yield yield __await(result);\n }\n });\n }\n listSearchResultsAll(firstPage, searchText, options = {}) {\n return __asyncGenerator(this, arguments, function* listSearchResultsAll_1() {\n var _a, e_1, _b, _c;\n yield __await(yield* __asyncDelegator(__asyncValues(firstPage.results)));\n if (firstPage.continuationToken) {\n try {\n for (var _d = true, _e = __asyncValues(this.listSearchResultsPage(searchText, options, {\n continuationToken: firstPage.continuationToken,\n })), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {\n _c = _f.value;\n _d = false;\n try {\n const page = _c;\n yield __await(yield* __asyncDelegator(__asyncValues(page.results)));\n }\n finally {\n _d = true;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n });\n }\n listSearchResults(firstPage, searchText, options = {}) {\n const iter = this.listSearchResultsAll(firstPage, searchText, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings = {}) => {\n return this.listSearchResultsPage(searchText, options, settings);\n },\n };\n }\n /**\n * Performs a search on the current index given\n * the specified arguments.\n * @param searchText - Text to search\n * @param options - Options for the search operation.\n */\n async search(searchText, options = {}) {\n const { span, updatedOptions } = createSpan(\"SearchClient-search\", options);\n try {\n const pageResult = await this.searchDocuments(searchText, updatedOptions);\n return Object.assign(Object.assign({}, pageResult), { results: this.listSearchResults(pageResult, searchText, updatedOptions) });\n }\n catch (e) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns a short list of suggestions based on the searchText\n * and specified suggester.\n * @param searchText - The search text to use to suggest documents. Must be at least 1 character, and no more than 100 characters.\n * @param suggesterName - The name of the suggester as specified in the suggesters collection that's part of the index definition.\n * @param options - Options for the suggest operation\n */\n async suggest(searchText, suggesterName, options = {}) {\n const { select, searchFields, orderBy } = options, nonFieldOptions = __rest(options, [\"select\", \"searchFields\", \"orderBy\"]);\n const fullOptions = Object.assign({ searchText: searchText, suggesterName: suggesterName, select: this.convertSelect(select), searchFields: this.convertSearchFields(searchFields), orderBy: this.convertOrderBy(orderBy) }, nonFieldOptions);\n if (!fullOptions.searchText) {\n throw new RangeError(\"searchText must be provided.\");\n }\n if (!fullOptions.suggesterName) {\n throw new RangeError(\"suggesterName must be provided.\");\n }\n const { span, updatedOptions } = createSpan(\"SearchClient-suggest\", options);\n try {\n const result = await this.client.documents.suggestPost(fullOptions, updatedOptions);\n const modifiedResult = utils.generatedSuggestDocumentsResultToPublicSuggestDocumentsResult(result);\n return deserialize(modifiedResult);\n }\n catch (e) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Retrieve a particular document from the index by key.\n * @param key - The primary key value of the document\n * @param options - Additional options\n */\n async getDocument(key, options = {}) {\n const { span, updatedOptions } = createSpan(\"SearchClient-getDocument\", options);\n try {\n const result = await this.client.documents.get(key, updatedOptions);\n return deserialize(result);\n }\n catch (e) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Perform a set of index modifications (upload, merge, mergeOrUpload, delete)\n * for the given set of documents.\n * This operation may partially succeed and not all document operations will\n * be reflected in the index. If you would like to treat this as an exception,\n * set the `throwOnAnyFailure` option to true.\n * For more details about how merging works, see: https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents\n * @param batch - An array of actions to perform on the index.\n * @param options - Additional options.\n */\n async indexDocuments(\n // eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters\n batch, options = {}) {\n const { span, updatedOptions } = createSpan(\"SearchClient-indexDocuments\", options);\n try {\n let status = 0;\n const result = await this.client.documents.index({ actions: serialize(batch.actions) }, Object.assign(Object.assign({}, updatedOptions), { onResponse: (rawResponse, flatResponse) => {\n status = rawResponse.status;\n if (updatedOptions.onResponse) {\n updatedOptions.onResponse(rawResponse, flatResponse);\n }\n } }));\n if (options.throwOnAnyFailure && status === 207) {\n throw result;\n }\n return result;\n }\n catch (e) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Upload an array of documents to the index.\n * @param documents - The documents to upload.\n * @param options - Additional options.\n */\n async uploadDocuments(documents, options = {}) {\n const { span, updatedOptions } = createSpan(\"SearchClient-uploadDocuments\", options);\n const batch = new IndexDocumentsBatch();\n batch.upload(documents);\n try {\n return await this.indexDocuments(batch, updatedOptions);\n }\n catch (e) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Update a set of documents in the index.\n * For more details about how merging works, see https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents\n * @param documents - The updated documents.\n * @param options - Additional options.\n */\n async mergeDocuments(documents, options = {}) {\n const { span, updatedOptions } = createSpan(\"SearchClient-mergeDocuments\", options);\n const batch = new IndexDocumentsBatch();\n batch.merge(documents);\n try {\n return await this.indexDocuments(batch, updatedOptions);\n }\n catch (e) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Update a set of documents in the index or upload them if they don't exist.\n * For more details about how merging works, see https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents\n * @param documents - The updated documents.\n * @param options - Additional options.\n */\n async mergeOrUploadDocuments(documents, options = {}) {\n const { span, updatedOptions } = createSpan(\"SearchClient-mergeDocuments\", options);\n const batch = new IndexDocumentsBatch();\n batch.mergeOrUpload(documents);\n try {\n return await this.indexDocuments(batch, updatedOptions);\n }\n catch (e) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n async deleteDocuments(keyNameOrDocuments, keyValuesOrOptions, options = {}) {\n const { span, updatedOptions } = createSpan(\"SearchClient-deleteDocuments\", options);\n const batch = new IndexDocumentsBatch();\n if (typeof keyNameOrDocuments === \"string\") {\n batch.delete(keyNameOrDocuments, keyValuesOrOptions);\n }\n else {\n batch.delete(keyNameOrDocuments);\n }\n try {\n return await this.indexDocuments(batch, updatedOptions);\n }\n catch (e) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n encodeContinuationToken(nextLink, nextPageParameters) {\n if (!nextLink || !nextPageParameters) {\n return undefined;\n }\n const payload = JSON.stringify({\n apiVersion: this.apiVersion,\n nextLink,\n nextPageParameters,\n });\n return encode(payload);\n }\n decodeContinuationToken(token) {\n if (!token) {\n return undefined;\n }\n const decodedToken = decode(token);\n try {\n const result = JSON.parse(decodedToken);\n if (result.apiVersion !== this.apiVersion) {\n throw new RangeError(`Continuation token uses unsupported apiVersion \"${this.apiVersion}\"`);\n }\n return {\n nextLink: result.nextLink,\n nextPageParameters: result.nextPageParameters,\n };\n }\n catch (e) {\n throw new Error(`Corrupted or invalid continuation token: ${decodedToken}`);\n }\n }\n convertSelect(select) {\n if (select) {\n return select.join(\",\");\n }\n return select;\n }\n convertSearchFields(searchFields) {\n if (searchFields) {\n return searchFields.join(\",\");\n }\n return searchFields;\n }\n convertOrderBy(orderBy) {\n if (orderBy) {\n return orderBy.join(\",\");\n }\n return orderBy;\n }\n}\n//# sourceMappingURL=searchClient.js.map","import { SearchClient, AzureKeyCredential } from \"@azure/search-documents\";\nimport { Product } from \"../models/Product\";\n\nconst azureProductSearch = new SearchClient(\n process.env.SEARCHURL ?? '',\n process.env.SEARCH_PRODUCT_INDEX ?? '',\n new AzureKeyCredential(process.env.SEARCHKEY ?? '')\n);\n\nexport default azureProductSearch;","export interface Filter {\n id: number\n name: string\n description: string\n featuredImage: string\n type: number\n parentId: number|null\n friendlyUrl: string\n}\n\nexport enum eFilterType {\n Unknown = 0,\n Category,\n Subcategory\n}\n\nexport interface FilterState {\n filters: Filter[]\n}\n"],"sourceRoot":""}