backlog-js
Version:
Backlog API v2 client for browser and node
1 lines • 94.6 kB
JavaScript
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Backlog=f()}})(function(){var define,module,exports;return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r}()({1:[function(require,module,exports){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p]};return extendStatics(d,b)};return function(d,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});var request_1=require("./request");var Backlog=function(_super){__extends(Backlog,_super);function Backlog(configure){return _super.call(this,configure)||this}Backlog.prototype.getSpace=function(){return this.get("space")};Backlog.prototype.getSpaceActivities=function(params){return this.get("space/activities",params)};Backlog.prototype.getSpaceIcon=function(){return this.download("space/image")};Backlog.prototype.getSpaceNotification=function(){return this.get("space/notification")};Backlog.prototype.putSpaceNotification=function(params){return this.put("space/notification",params)};Backlog.prototype.getSpaceDiskUsage=function(){return this.get("space/diskUsage")};Backlog.prototype.postSpaceAttachment=function(form){return this.upload("space/attachment",form)};Backlog.prototype.getUsers=function(){return this.get("users")};Backlog.prototype.getUser=function(userId){return this.get("users/".concat(userId))};Backlog.prototype.postUser=function(params){return this.post("users",params)};Backlog.prototype.patchUser=function(userId,params){return this.patch("users/".concat(userId),params)};Backlog.prototype.deleteUser=function(userId){return this.delete("users/".concat(userId))};Backlog.prototype.getMyself=function(){return this.get("users/myself")};Backlog.prototype.getUserIcon=function(userId){return this.download("users/".concat(userId,"/icon"))};Backlog.prototype.getUserActivities=function(userId,params){return this.get("users/".concat(userId,"/activities"),params)};Backlog.prototype.getUserStars=function(userId,params){return this.get("users/".concat(userId,"/stars"),params)};Backlog.prototype.getUserStarsCount=function(userId,params){return this.get("users/".concat(userId,"/stars/count"),params)};Backlog.prototype.getRecentlyViewedIssues=function(params){return this.get("users/myself/recentlyViewedIssues",params)};Backlog.prototype.getRecentlyViewedProjects=function(params){return this.get("users/myself/recentlyViewedProjects",params)};Backlog.prototype.getRecentlyViewedWikis=function(params){return this.get("users/myself/recentlyViewedWikis",params)};Backlog.prototype.getProjectStatuses=function(projectIdOrKey){return this.get("projects/".concat(projectIdOrKey,"/statuses"))};Backlog.prototype.getResolutions=function(){return this.get("resolutions")};Backlog.prototype.getPriorities=function(){return this.get("priorities")};Backlog.prototype.getProjects=function(params){return this.get("projects",params)};Backlog.prototype.postProject=function(params){return this.post("projects",params)};Backlog.prototype.getProject=function(projectIdOrKey){return this.get("projects/".concat(projectIdOrKey))};Backlog.prototype.patchProject=function(projectIdOrKey,params){return this.patch("projects/".concat(projectIdOrKey),params)};Backlog.prototype.deleteProject=function(projectIdOrKey){return this.delete("projects/".concat(projectIdOrKey))};Backlog.prototype.getProjectIcon=function(projectIdOrKey){return this.download("projects/".concat(projectIdOrKey,"/image"))};Backlog.prototype.getProjectActivities=function(projectIdOrKey,params){return this.get("projects/".concat(projectIdOrKey,"/activities"),params)};Backlog.prototype.postProjectUser=function(projectIdOrKey,userId){return this.post("projects/".concat(projectIdOrKey,"/users"),{userId:userId})};Backlog.prototype.getProjectUsers=function(projectIdOrKey){return this.get("projects/".concat(projectIdOrKey,"/users"))};Backlog.prototype.deleteProjectUsers=function(projectIdOrKey,params){return this.delete("projects/".concat(projectIdOrKey,"/users"),params)};Backlog.prototype.postProjectAdministrators=function(projectIdOrKey,params){return this.post("projects/".concat(projectIdOrKey,"/administrators"),params)};Backlog.prototype.getProjectAdministrators=function(projectIdOrKey){return this.get("projects/".concat(projectIdOrKey,"/administrators"))};Backlog.prototype.deleteProjectAdministrators=function(projectIdOrKey,params){return this.delete("projects/".concat(projectIdOrKey,"/administrators"),params)};Backlog.prototype.postProjectStatus=function(projectIdOrKey,params){return this.post("projects/".concat(projectIdOrKey,"/statuses"),params)};Backlog.prototype.patchProjectStatus=function(projectIdOrKey,id,params){return this.patch("projects/".concat(projectIdOrKey,"/statuses/").concat(id),params)};Backlog.prototype.deleteProjectStatus=function(projectIdOrKey,id,substituteStatusId){return this.delete("projects/".concat(projectIdOrKey,"/statuses/").concat(id),{substituteStatusId:substituteStatusId})};Backlog.prototype.patchProjectStatusOrder=function(projectIdOrKey,statusId){return this.patch("projects/".concat(projectIdOrKey,"/statuses/updateDisplayOrder"),{statusId:statusId})};Backlog.prototype.getIssueTypes=function(projectIdOrKey){return this.get("projects/".concat(projectIdOrKey,"/issueTypes"))};Backlog.prototype.postIssueType=function(projectIdOrKey,params){return this.post("projects/".concat(projectIdOrKey,"/issueTypes"),params)};Backlog.prototype.patchIssueType=function(projectIdOrKey,id,params){return this.patch("projects/".concat(projectIdOrKey,"/issueTypes/").concat(id),params)};Backlog.prototype.deleteIssueType=function(projectIdOrKey,id,params){return this.delete("projects/".concat(projectIdOrKey,"/issueTypes/").concat(id),params)};Backlog.prototype.getCategories=function(projectIdOrKey){return this.get("projects/".concat(projectIdOrKey,"/categories"))};Backlog.prototype.postCategories=function(projectIdOrKey,params){return this.post("projects/".concat(projectIdOrKey,"/categories"),params)};Backlog.prototype.patchCategories=function(projectIdOrKey,id,params){return this.patch("projects/".concat(projectIdOrKey,"/categories/").concat(id),params)};Backlog.prototype.deleteCategories=function(projectIdOrKey,id){return this.delete("projects/".concat(projectIdOrKey,"/categories/").concat(id))};Backlog.prototype.getVersions=function(projectIdOrKey){return this.get("projects/".concat(projectIdOrKey,"/versions"))};Backlog.prototype.postVersions=function(projectIdOrKey,params){return this.post("projects/".concat(projectIdOrKey,"/versions"),params)};Backlog.prototype.patchVersions=function(projectIdOrKey,id,params){return this.patch("projects/".concat(projectIdOrKey,"/versions/").concat(id),params)};Backlog.prototype.deleteVersions=function(projectIdOrKey,id){return this.delete("projects/".concat(projectIdOrKey,"/versions/").concat(id))};Backlog.prototype.getCustomFields=function(projectIdOrKey){return this.get("projects/".concat(projectIdOrKey,"/customFields"))};Backlog.prototype.postCustomField=function(projectIdOrKey,params){return this.post("projects/".concat(projectIdOrKey,"/customFields"),params)};Backlog.prototype.patchCustomField=function(projectIdOrKey,id,params){return this.patch("projects/".concat(projectIdOrKey,"/customFields/").concat(id),params)};Backlog.prototype.deleteCustomField=function(projectIdOrKey,id){return this.delete("projects/".concat(projectIdOrKey,"/customFields/").concat(id))};Backlog.prototype.postCustomFieldItem=function(projectIdOrKey,id,params){return this.post("projects/".concat(projectIdOrKey,"/customFields/").concat(id,"/items"),params)};Backlog.prototype.patchCustomFieldItem=function(projectIdOrKey,id,itemId,params){return this.patch("projects/".concat(projectIdOrKey,"/customFields/").concat(id,"/items/").concat(itemId),params)};Backlog.prototype.deleteCustomFieldItem=function(projectIdOrKey,id,itemId){return this.delete("projects/".concat(projectIdOrKey,"/customFields/").concat(id,"/items/").concat(itemId))};Backlog.prototype.getSharedFiles=function(projectIdOrKey,path,params){return this.get("projects/".concat(projectIdOrKey,"/files/metadata/").concat(path),params)};Backlog.prototype.getSharedFile=function(projectIdOrKey,sharedFileId){return this.download("projects/".concat(projectIdOrKey,"/files/").concat(sharedFileId))};Backlog.prototype.getProjectsDiskUsage=function(projectIdOrKey){return this.get("projects/".concat(projectIdOrKey,"/diskUsage"))};Backlog.prototype.getWebhooks=function(projectIdOrKey){return this.get("projects/".concat(projectIdOrKey,"/webhooks"))};Backlog.prototype.postWebhook=function(projectIdOrKey,params){return this.post("projects/".concat(projectIdOrKey,"/webhooks"),params)};Backlog.prototype.getWebhook=function(projectIdOrKey,webhookId){return this.get("projects/".concat(projectIdOrKey,"/webhooks/").concat(webhookId))};Backlog.prototype.patchWebhook=function(projectIdOrKey,webhookId,params){return this.patch("projects/".concat(projectIdOrKey,"/webhooks/").concat(webhookId),params)};Backlog.prototype.deleteWebhook=function(projectIdOrKey,webhookId){return this.delete("projects/".concat(projectIdOrKey,"/webhooks/").concat(webhookId))};Backlog.prototype.getIssues=function(params){return this.get("issues",params)};Backlog.prototype.getIssuesCount=function(params){return this.get("issues/count",params)};Backlog.prototype.postIssue=function(params){return this.post("issues",params)};Backlog.prototype.patchIssue=function(issueIdOrKey,params){return this.patch("issues/".concat(issueIdOrKey),params)};Backlog.prototype.getIssue=function(issueIdOrKey){return this.get("issues/".concat(issueIdOrKey))};Backlog.prototype.deleteIssue=function(issueIdOrKey){return this.delete("issues/".concat(issueIdOrKey))};Backlog.prototype.getIssueComments=function(issueIdOrKey,params){return this.get("issues/".concat(issueIdOrKey,"/comments"),params)};Backlog.prototype.postIssueComments=function(issueIdOrKey,params){return this.post("issues/".concat(issueIdOrKey,"/comments"),params)};Backlog.prototype.getIssueCommentsCount=function(issueIdOrKey){return this.get("issues/".concat(issueIdOrKey,"/comments/count"))};Backlog.prototype.getIssueComment=function(issueIdOrKey,commentId){return this.get("issues/".concat(issueIdOrKey,"/comments/").concat(commentId))};Backlog.prototype.deleteIssueComment=function(issueIdOrKey,commentId){return this.delete("issues/".concat(issueIdOrKey,"/comments/").concat(commentId))};Backlog.prototype.patchIssueComment=function(issueIdOrKey,commentId,params){return this.patch("issues/".concat(issueIdOrKey,"/comments/").concat(commentId),params)};Backlog.prototype.getIssueCommentNotifications=function(issueIdOrKey,commentId){return this.get("issues/".concat(issueIdOrKey,"/comments/").concat(commentId,"/notifications"))};Backlog.prototype.postIssueCommentNotifications=function(issueIdOrKey,commentId,prams){return this.post("issues/".concat(issueIdOrKey,"/comments/").concat(commentId,"/notifications"),prams)};Backlog.prototype.getIssueAttachments=function(issueIdOrKey){return this.get("issues/".concat(issueIdOrKey,"/attachments"))};Backlog.prototype.getIssueAttachment=function(issueIdOrKey,attachmentId){return this.download("issues/".concat(issueIdOrKey,"/attachments/").concat(attachmentId))};Backlog.prototype.deleteIssueAttachment=function(issueIdOrKey,attachmentId){return this.delete("issues/".concat(issueIdOrKey,"/attachments/").concat(attachmentId))};Backlog.prototype.getIssueParticipants=function(issueIdOrKey){return this.get("issues/".concat(issueIdOrKey,"/participants"))};Backlog.prototype.getIssueSharedFiles=function(issueIdOrKey){return this.get("issues/".concat(issueIdOrKey,"/sharedFiles"))};Backlog.prototype.linkIssueSharedFiles=function(issueIdOrKey,params){return this.post("issues/".concat(issueIdOrKey,"/sharedFiles"),params)};Backlog.prototype.unlinkIssueSharedFile=function(issueIdOrKey,id){return this.delete("issues/".concat(issueIdOrKey,"/sharedFiles/").concat(id))};Backlog.prototype.getWikis=function(params){return this.get("wikis",params)};Backlog.prototype.getWikisCount=function(projectIdOrKey){return this.get("wikis/count",{projectIdOrKey:projectIdOrKey})};Backlog.prototype.getWikisTags=function(projectIdOrKey){return this.get("wikis/tags",{projectIdOrKey:projectIdOrKey})};Backlog.prototype.postWiki=function(params){return this.post("wikis",params)};Backlog.prototype.getWiki=function(wikiId){return this.get("wikis/".concat(wikiId))};Backlog.prototype.patchWiki=function(wikiId,params){return this.patch("wikis/".concat(wikiId),params)};Backlog.prototype.deleteWiki=function(wikiId,mailNotify){return this.delete("wikis/".concat(wikiId),{mailNotify:mailNotify})};Backlog.prototype.getWikisAttachments=function(wikiId){return this.get("wikis/".concat(wikiId,"/attachments"))};Backlog.prototype.postWikisAttachments=function(wikiId,attachmentId){return this.post("wikis/".concat(wikiId,"/attachments"),{attachmentId:attachmentId})};Backlog.prototype.getWikiAttachment=function(wikiId,attachmentId){return this.download("wikis/".concat(wikiId,"/attachments/").concat(attachmentId))};Backlog.prototype.deleteWikisAttachments=function(wikiId,attachmentId){return this.delete("wikis/".concat(wikiId,"/attachments/").concat(attachmentId))};Backlog.prototype.getWikisSharedFiles=function(wikiId){return this.get("wikis/".concat(wikiId,"/sharedFiles"))};Backlog.prototype.linkWikisSharedFiles=function(wikiId,fileId){return this.post("wikis/".concat(wikiId,"/sharedFiles"),{fileId:fileId})};Backlog.prototype.unlinkWikisSharedFiles=function(wikiId,id){return this.delete("wikis/".concat(wikiId,"/sharedFiles/").concat(id))};Backlog.prototype.getDocuments=function(params){return this.get("documents",params)};Backlog.prototype.getDocumentTree=function(projectIdOrKey){return this.get("documents/tree",{projectIdOrKey:projectIdOrKey})};Backlog.prototype.getDocument=function(documentId){return this.get("documents/".concat(documentId))};Backlog.prototype.downloadDocumentAttachment=function(documentId,attachmentId){return this.download("documents/".concat(documentId,"/attachments/").concat(attachmentId))};Backlog.prototype.getWikisHistory=function(wikiId,params){return this.get("wikis/".concat(wikiId,"/history"),params)};Backlog.prototype.getWikisStars=function(wikiId){return this.get("wikis/".concat(wikiId,"/stars"))};Backlog.prototype.postStar=function(params){return this.post("stars",params)};Backlog.prototype.removeStar=function(starId){var endpoint="stars/".concat(starId);return this.delete(endpoint)};Backlog.prototype.getNotifications=function(params){return this.get("notifications",params)};Backlog.prototype.getNotificationsCount=function(params){return this.get("notifications/count",params)};Backlog.prototype.resetNotificationsMarkAsRead=function(){return this.post("notifications/markAsRead")};Backlog.prototype.markAsReadNotification=function(id){return this.post("notifications/".concat(id,"/markAsRead"))};Backlog.prototype.getGitRepositories=function(projectIdOrKey){return this.get("projects/".concat(projectIdOrKey,"/git/repositories"))};Backlog.prototype.getGitRepository=function(projectIdOrKey,repoIdOrName){return this.get("projects/".concat(projectIdOrKey,"/git/repositories/").concat(repoIdOrName))};Backlog.prototype.getPullRequests=function(projectIdOrKey,repoIdOrName,params){return this.get("projects/".concat(projectIdOrKey,"/git/repositories/").concat(repoIdOrName,"/pullRequests"),params)};Backlog.prototype.getPullRequestsCount=function(projectIdOrKey,repoIdOrName,params){return this.get("projects/".concat(projectIdOrKey,"/git/repositories/").concat(repoIdOrName,"/pullRequests/count"),params)};Backlog.prototype.postPullRequest=function(projectIdOrKey,repoIdOrName,params){return this.post("projects/".concat(projectIdOrKey,"/git/repositories/").concat(repoIdOrName,"/pullRequests"),params)};Backlog.prototype.getPullRequest=function(projectIdOrKey,repoIdOrName,number){return this.get("projects/".concat(projectIdOrKey,"/git/repositories/").concat(repoIdOrName,"/pullRequests/").concat(number))};Backlog.prototype.patchPullRequest=function(projectIdOrKey,repoIdOrName,number,params){return this.patch("projects/".concat(projectIdOrKey,"/git/repositories/").concat(repoIdOrName,"/pullRequests/").concat(number),params)};Backlog.prototype.getPullRequestComments=function(projectIdOrKey,repoIdOrName,number,params){return this.get("projects/".concat(projectIdOrKey,"/git/repositories/").concat(repoIdOrName,"/pullRequests/").concat(number,"/comments"),params)};Backlog.prototype.postPullRequestComments=function(projectIdOrKey,repoIdOrName,number,params){return this.post("projects/".concat(projectIdOrKey,"/git/repositories/").concat(repoIdOrName,"/pullRequests/").concat(number,"/comments"),params)};Backlog.prototype.getPullRequestCommentsCount=function(projectIdOrKey,repoIdOrName,number){return this.get("projects/".concat(projectIdOrKey,"/git/repositories/").concat(repoIdOrName,"/pullRequests/").concat(number,"/comments/count"))};Backlog.prototype.patchPullRequestComments=function(projectIdOrKey,repoIdOrName,number,commentId,params){return this.patch("projects/".concat(projectIdOrKey,"/git/repositories/").concat(repoIdOrName,"/pullRequests/").concat(number,"/comments/").concat(commentId),params)};Backlog.prototype.getPullRequestAttachments=function(projectIdOrKey,repoIdOrName,number){return this.get("projects/".concat(projectIdOrKey,"/git/repositories/").concat(repoIdOrName,"/pullRequests/").concat(number,"/attachments"))};Backlog.prototype.getPullRequestAttachment=function(projectIdOrKey,repoIdOrName,number,attachmentId){return this.download("projects/".concat(projectIdOrKey,"/git/repositories/").concat(repoIdOrName,"/pullRequests/").concat(number,"/attachments/").concat(attachmentId))};Backlog.prototype.deletePullRequestAttachment=function(projectIdOrKey,repoIdOrName,number,attachmentId){return this.get("projects/".concat(projectIdOrKey,"/git/repositories/").concat(repoIdOrName,"/pullRequests/").concat(number,"/attachments/").concat(attachmentId))};Backlog.prototype.getWatchingListItems=function(userId,params){return this.get("users/".concat(userId,"/watchings"),params)};Backlog.prototype.getWatchingListCount=function(userId,params){return this.get("users/".concat(userId,"/watchings/count"),params)};Backlog.prototype.getWatchingListItem=function(watchId){return this.get("watchings/".concat(watchId))};Backlog.prototype.postWatchingListItem=function(params){return this.post("watchings",params)};Backlog.prototype.patchWatchingListItem=function(watchId,note){return this.patch("watchings/".concat(watchId),{note:note})};Backlog.prototype.deletehWatchingListItem=function(watchId){return this.delete("watchings/".concat(watchId))};Backlog.prototype.resetWatchingListItemAsRead=function(watchId){return this.post("watchings/".concat(watchId,"/markAsRead"))};Backlog.prototype.getLicence=function(){return this.get("space/licence")};Backlog.prototype.getTeams=function(params){return this.get("teams",params)};Backlog.prototype.postTeam=function(members){return this.post("teams",{members:members})};Backlog.prototype.getTeam=function(teamId){return this.get("teams/".concat(teamId))};Backlog.prototype.patchTeam=function(teamId,params){return this.patch("teams/".concat(teamId),params)};Backlog.prototype.deleteTeam=function(teamId){return this.delete("teams/".concat(teamId))};Backlog.prototype.getTeamIcon=function(teamId){return this.download("teams/".concat(teamId,"/icon"))};Backlog.prototype.getProjectTeams=function(projectIdOrKey){return this.get("projects/".concat(projectIdOrKey,"/teams"))};Backlog.prototype.postProjectTeam=function(projectIdOrKey,teamId){return this.post("projects/".concat(projectIdOrKey,"/teams"),{teamId:teamId})};Backlog.prototype.deleteProjectTeam=function(projectIdOrKey,teamId){return this.delete("projects/".concat(projectIdOrKey,"/teams"),{teamId:teamId})};Backlog.prototype.getRateLimit=function(){return this.get("rateLimit")};Backlog.prototype.download=function(path){return this.request({method:"GET",path:path}).then(this.parseFileData)};Backlog.prototype.upload=function(path,params){return this.request({method:"POST",path:path,params:params}).then(this.parseJSON)};Backlog.prototype.parseFileData=function(response){return new Promise(function(resolve,reject){if(typeof window!=="undefined"){resolve({body:response.body,url:response.url,blob:function(){return response.blob()}})}else{var disposition=response.headers.get("Content-Disposition");var filename=disposition?disposition.substring(disposition.indexOf("''")+2):"";resolve({body:response.body,url:response.url,filename:filename})}})};return Backlog}(request_1.default);exports.default=Backlog},{"./request":7}],2:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true})},{}],3:[function(require,module,exports){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p]};return extendStatics(d,b)};return function(d,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:true});exports.UnexpectedError=exports.BacklogAuthError=exports.BacklogApiError=exports.BacklogError=void 0;var BacklogError=function(_super){__extends(BacklogError,_super);function BacklogError(name,response,body){var _this=_super.call(this,response.statusText)||this;_this._name=name;_this._url=response.url;_this._status=response.status;_this._body=body;_this._response=response;return _this}Object.defineProperty(BacklogError.prototype,"name",{get:function(){return this._name},enumerable:false,configurable:true});Object.defineProperty(BacklogError.prototype,"url",{get:function(){return this._url},enumerable:false,configurable:true});Object.defineProperty(BacklogError.prototype,"status",{get:function(){return this._status},enumerable:false,configurable:true});Object.defineProperty(BacklogError.prototype,"body",{get:function(){return this._body},enumerable:false,configurable:true});Object.defineProperty(BacklogError.prototype,"response",{get:function(){return this._response},enumerable:false,configurable:true});return BacklogError}(Error);exports.BacklogError=BacklogError;var BacklogApiError=function(_super){__extends(BacklogApiError,_super);function BacklogApiError(response,body){return _super.call(this,"BacklogApiError",response,body)||this}return BacklogApiError}(BacklogError);exports.BacklogApiError=BacklogApiError;var BacklogAuthError=function(_super){__extends(BacklogAuthError,_super);function BacklogAuthError(response,body){return _super.call(this,"BacklogAuthError",response,body)||this}return BacklogAuthError}(BacklogError);exports.BacklogAuthError=BacklogAuthError;var UnexpectedError=function(_super){__extends(UnexpectedError,_super);function UnexpectedError(response){return _super.call(this,"UnexpectedError",response)||this}return UnexpectedError}(BacklogError);exports.UnexpectedError=UnexpectedError},{}],4:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.Error=exports.Types=exports.Entity=exports.Option=exports.OAuth2=exports.Backlog=void 0;var backlog_1=require("./backlog");exports.Backlog=backlog_1.default;var oauth2_1=require("./oauth2");exports.OAuth2=oauth2_1.default;var Option=require("./option");exports.Option=Option;var Entity=require("./entity");exports.Entity=Entity;var Types=require("./types");exports.Types=Types;var Error=require("./error");exports.Error=Error},{"./backlog":1,"./entity":2,"./error":3,"./oauth2":5,"./option":6,"./types":8}],5:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var request_1=require("./request");var OAuth2=function(){function OAuth2(credentials,timeout){this.credentials=credentials;this.timeout=timeout}OAuth2.prototype.getAuthorizationURL=function(options){var params={client_id:this.credentials.clientId,response_type:"code",redirect_uri:options.redirectUri,state:options.state};return"https://".concat(options.host,"/OAuth2AccessRequest.action?")+Object.keys(params).map(function(key){return params[key]?"".concat(key,"=").concat(params[key]):""}).filter(function(x){return x.length>0}).join("&")};OAuth2.prototype.getAccessToken=function(options){return new request_1.default({host:options.host,timeout:this.timeout}).post("oauth2/token",{grant_type:"authorization_code",code:options.code,client_id:this.credentials.clientId,client_secret:this.credentials.clientSecret,redirect_uri:options.redirectUri})};OAuth2.prototype.refreshAccessToken=function(options){return new request_1.default({host:options.host,timeout:this.timeout}).post("oauth2/token",{grant_type:"refresh_token",client_id:this.credentials.clientId,client_secret:this.credentials.clientSecret,refresh_token:options.refreshToken})};return OAuth2}();exports.default=OAuth2},{"./request":7}],6:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.Issue=void 0;var Issue;(function(Issue){var ParentChildType;(function(ParentChildType){ParentChildType[ParentChildType["All"]=0]="All";ParentChildType[ParentChildType["NotChild"]=1]="NotChild";ParentChildType[ParentChildType["Child"]=2]="Child";ParentChildType[ParentChildType["NotChildNotParent"]=3]="NotChildNotParent";ParentChildType[ParentChildType["Parent"]=4]="Parent"})(ParentChildType=Issue.ParentChildType||(Issue.ParentChildType={}))})(Issue||(exports.Issue=Issue={}))},{}],7:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var Error=require("./error");var qs=require("qs");var Request=function(){function Request(configure){this.configure=configure}Request.prototype.get=function(path,params){return this.request({method:"GET",path:path,params:params}).then(this.parseJSON)};Request.prototype.post=function(path,params){return this.request({method:"POST",path:path,params:params}).then(this.parseJSON)};Request.prototype.put=function(path,params){return this.request({method:"PUT",path:path,params:params}).then(this.parseJSON)};Request.prototype.patch=function(path,params){return this.request({method:"PATCH",path:path,params:params}).then(this.parseJSON)};Request.prototype.delete=function(path,params){return this.request({method:"DELETE",path:path,params:params}).then(this.parseJSON)};Request.prototype.request=function(options){var method=options.method,path=options.path,_a=options.params,params=_a===void 0?{}:_a;var _b=this.configure,apiKey=_b.apiKey,accessToken=_b.accessToken,timeout=_b.timeout;var query=apiKey?{apiKey:apiKey}:{};var init={method:method,headers:{}};if(timeout){init["timeout"]=timeout}if(!apiKey&&accessToken){init.headers["Authorization"]="Bearer "+accessToken}if(typeof window!=="undefined"){init.mode="cors"}if(method!=="GET"){if(params instanceof FormData){init.body=params}else{init.headers["Content-type"]="application/x-www-form-urlencoded";init.body=this.toQueryString(params)}}else{Object.keys(params).forEach(function(key){return query[key]=params[key]})}var queryStr=this.toQueryString(query);var url="".concat(this.restBaseURL,"/").concat(path)+(queryStr.length>0?"?".concat(queryStr):"");return fetch(url,init).then(this.checkStatus)};Request.prototype.checkStatus=function(response){return new Promise(function(resolve,reject){if(200<=response.status&&response.status<300){resolve(response)}else{response.json().then(function(data){if(response.status===401){reject(new Error.BacklogAuthError(response,data))}else{reject(new Error.BacklogApiError(response,data))}}).catch(function(err){return reject(new Error.UnexpectedError(response))})}})};Request.prototype.parseJSON=function(response){if(response.status===204||response.headers.get("Content-Length")==="0"){return Promise.resolve(undefined)}return response.json()};Request.prototype.toQueryString=function(params){return qs.stringify(params,{arrayFormat:"brackets"})};Object.defineProperty(Request.prototype,"webAppBaseURL",{get:function(){return"https://".concat(this.configure.host)},enumerable:false,configurable:true});Object.defineProperty(Request.prototype,"restBaseURL",{get:function(){return"".concat(this.webAppBaseURL,"/api/v2")},enumerable:false,configurable:true});return Request}();exports.default=Request},{"./error":3,qs:51}],8:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.CustomFieldType=exports.ActivityType=exports.NormalRoleType=exports.ClassicRoleType=void 0;var ClassicRoleType;(function(ClassicRoleType){ClassicRoleType[ClassicRoleType["Admin"]=1]="Admin";ClassicRoleType[ClassicRoleType["User"]=2]="User";ClassicRoleType[ClassicRoleType["Reporter"]=3]="Reporter";ClassicRoleType[ClassicRoleType["Viewer"]=4]="Viewer";ClassicRoleType[ClassicRoleType["GuestReporter"]=5]="GuestReporter";ClassicRoleType[ClassicRoleType["GuestViewer"]=6]="GuestViewer"})(ClassicRoleType||(exports.ClassicRoleType=ClassicRoleType={}));var NormalRoleType;(function(NormalRoleType){NormalRoleType[NormalRoleType["Admin"]=1]="Admin";NormalRoleType[NormalRoleType["MemberOrGuest"]=2]="MemberOrGuest";NormalRoleType[NormalRoleType["MemberOrGuestForAddIssues"]=3]="MemberOrGuestForAddIssues";NormalRoleType[NormalRoleType["MemberOrGuestForViewIssues"]=4]="MemberOrGuestForViewIssues"})(NormalRoleType||(exports.NormalRoleType=NormalRoleType={}));var ActivityType;(function(ActivityType){ActivityType[ActivityType["Undefined"]=-1]="Undefined";ActivityType[ActivityType["IssueCreated"]=1]="IssueCreated";ActivityType[ActivityType["IssueUpdated"]=2]="IssueUpdated";ActivityType[ActivityType["IssueCommented"]=3]="IssueCommented";ActivityType[ActivityType["IssueDeleted"]=4]="IssueDeleted";ActivityType[ActivityType["WikiCreated"]=5]="WikiCreated";ActivityType[ActivityType["WikiUpdated"]=6]="WikiUpdated";ActivityType[ActivityType["WikiDeleted"]=7]="WikiDeleted";ActivityType[ActivityType["FileAdded"]=8]="FileAdded";ActivityType[ActivityType["FileUpdated"]=9]="FileUpdated";ActivityType[ActivityType["FileDeleted"]=10]="FileDeleted";ActivityType[ActivityType["SvnCommitted"]=11]="SvnCommitted";ActivityType[ActivityType["GitPushed"]=12]="GitPushed";ActivityType[ActivityType["GitRepositoryCreated"]=13]="GitRepositoryCreated";ActivityType[ActivityType["IssueMultiUpdated"]=14]="IssueMultiUpdated";ActivityType[ActivityType["ProjectUserAdded"]=15]="ProjectUserAdded";ActivityType[ActivityType["ProjectUserRemoved"]=16]="ProjectUserRemoved";ActivityType[ActivityType["NotifyAdded"]=17]="NotifyAdded";ActivityType[ActivityType["PullRequestAdded"]=18]="PullRequestAdded";ActivityType[ActivityType["PullRequestUpdated"]=19]="PullRequestUpdated";ActivityType[ActivityType["PullRequestCommented"]=20]="PullRequestCommented";ActivityType[ActivityType["PullRequestMerged"]=21]="PullRequestMerged";ActivityType[ActivityType["MilestoneCreated"]=22]="MilestoneCreated";ActivityType[ActivityType["MilestoneUpdated"]=23]="MilestoneUpdated";ActivityType[ActivityType["MilestoneDeleted"]=24]="MilestoneDeleted";ActivityType[ActivityType["ProjectGroupAdded"]=25]="ProjectGroupAdded";ActivityType[ActivityType["ProjectGroupDeleted"]=26]="ProjectGroupDeleted"})(ActivityType||(exports.ActivityType=ActivityType={}));var CustomFieldType;(function(CustomFieldType){CustomFieldType[CustomFieldType["Text"]=1]="Text";CustomFieldType[CustomFieldType["TextArea"]=2]="TextArea";CustomFieldType[CustomFieldType["Numeric"]=3]="Numeric";CustomFieldType[CustomFieldType["Date"]=4]="Date";CustomFieldType[CustomFieldType["SingleList"]=5]="SingleList";CustomFieldType[CustomFieldType["MultipleList"]=6]="MultipleList";CustomFieldType[CustomFieldType["CheckBox"]=7]="CheckBox";CustomFieldType[CustomFieldType["Radio"]=8]="Radio"})(CustomFieldType||(exports.CustomFieldType=CustomFieldType={}))},{}],9:[function(require,module,exports){},{}],10:[function(require,module,exports){"use strict";var bind=require("function-bind");var $apply=require("./functionApply");var $call=require("./functionCall");var $reflectApply=require("./reflectApply");module.exports=$reflectApply||bind.call($call,$apply)},{"./functionApply":12,"./functionCall":13,"./reflectApply":15,"function-bind":30}],11:[function(require,module,exports){"use strict";var bind=require("function-bind");var $apply=require("./functionApply");var actualApply=require("./actualApply");module.exports=function applyBind(){return actualApply(bind,$apply,arguments)}},{"./actualApply":10,"./functionApply":12,"function-bind":30}],12:[function(require,module,exports){"use strict";module.exports=Function.prototype.apply},{}],13:[function(require,module,exports){"use strict";module.exports=Function.prototype.call},{}],14:[function(require,module,exports){"use strict";var bind=require("function-bind");var $TypeError=require("es-errors/type");var $call=require("./functionCall");var $actualApply=require("./actualApply");module.exports=function callBindBasic(args){if(args.length<1||typeof args[0]!=="function"){throw new $TypeError("a function is required")}return $actualApply(bind,$call,args)}},{"./actualApply":10,"./functionCall":13,"es-errors/type":26,"function-bind":30}],15:[function(require,module,exports){"use strict";module.exports=typeof Reflect!=="undefined"&&Reflect&&Reflect.apply},{}],16:[function(require,module,exports){"use strict";var GetIntrinsic=require("get-intrinsic");var callBind=require("./");var $indexOf=callBind(GetIntrinsic("String.prototype.indexOf"));module.exports=function callBoundIntrinsic(name,allowMissing){var intrinsic=GetIntrinsic(name,!!allowMissing);if(typeof intrinsic==="function"&&$indexOf(name,".prototype.")>-1){return callBind(intrinsic)}return intrinsic}},{"./":17,"get-intrinsic":31}],17:[function(require,module,exports){"use strict";var setFunctionLength=require("set-function-length");var $defineProperty=require("es-define-property");var callBindBasic=require("call-bind-apply-helpers");var applyBind=require("call-bind-apply-helpers/applyBind");module.exports=function callBind(originalFunction){var func=callBindBasic(arguments);var adjustedLength=originalFunction.length-(arguments.length-1);return setFunctionLength(func,1+(adjustedLength>0?adjustedLength:0),true)};if($defineProperty){$defineProperty(module.exports,"apply",{value:applyBind})}else{module.exports.apply=applyBind}},{"call-bind-apply-helpers":14,"call-bind-apply-helpers/applyBind":11,"es-define-property":20,"set-function-length":55}],18:[function(require,module,exports){"use strict";var $defineProperty=require("es-define-property");var $SyntaxError=require("es-errors/syntax");var $TypeError=require("es-errors/type");var gopd=require("gopd");module.exports=function defineDataProperty(obj,property,value){if(!obj||typeof obj!=="object"&&typeof obj!=="function"){throw new $TypeError("`obj` must be an object or a function`")}if(typeof property!=="string"&&typeof property!=="symbol"){throw new $TypeError("`property` must be a string or a symbol`")}if(arguments.length>3&&typeof arguments[3]!=="boolean"&&arguments[3]!==null){throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null")}if(arguments.length>4&&typeof arguments[4]!=="boolean"&&arguments[4]!==null){throw new $TypeError("`nonWritable`, if provided, must be a boolean or null")}if(arguments.length>5&&typeof arguments[5]!=="boolean"&&arguments[5]!==null){throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null")}if(arguments.length>6&&typeof arguments[6]!=="boolean"){throw new $TypeError("`loose`, if provided, must be a boolean")}var nonEnumerable=arguments.length>3?arguments[3]:null;var nonWritable=arguments.length>4?arguments[4]:null;var nonConfigurable=arguments.length>5?arguments[5]:null;var loose=arguments.length>6?arguments[6]:false;var desc=!!gopd&&gopd(obj,property);if($defineProperty){$defineProperty(obj,property,{configurable:nonConfigurable===null&&desc?desc.configurable:!nonConfigurable,enumerable:nonEnumerable===null&&desc?desc.enumerable:!nonEnumerable,value:value,writable:nonWritable===null&&desc?desc.writable:!nonWritable})}else if(loose||!nonEnumerable&&!nonWritable&&!nonConfigurable){obj[property]=value}else{throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}},{"es-define-property":20,"es-errors/syntax":25,"es-errors/type":26,gopd:36}],19:[function(require,module,exports){"use strict";var callBind=require("call-bind-apply-helpers");var gOPD=require("gopd");var hasProtoAccessor;try{hasProtoAccessor=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS"){throw e}}var desc=!!hasProtoAccessor&&gOPD&&gOPD(Object.prototype,"__proto__");var $Object=Object;var $getPrototypeOf=$Object.getPrototypeOf;module.exports=desc&&typeof desc.get==="function"?callBind([desc.get]):typeof $getPrototypeOf==="function"?function getDunder(value){return $getPrototypeOf(value==null?value:$Object(value))}:false},{"call-bind-apply-helpers":14,gopd:36}],20:[function(require,module,exports){"use strict";var $defineProperty=Object.defineProperty||false;if($defineProperty){try{$defineProperty({},"a",{value:1})}catch(e){$defineProperty=false}}module.exports=$defineProperty},{}],21:[function(require,module,exports){"use strict";module.exports=EvalError},{}],22:[function(require,module,exports){"use strict";module.exports=Error},{}],23:[function(require,module,exports){"use strict";module.exports=RangeError},{}],24:[function(require,module,exports){"use strict";module.exports=ReferenceError},{}],25:[function(require,module,exports){"use strict";module.exports=SyntaxError},{}],26:[function(require,module,exports){"use strict";module.exports=TypeError},{}],27:[function(require,module,exports){"use strict";module.exports=URIError},{}],28:[function(require,module,exports){"use strict";module.exports=Object},{}],29:[function(require,module,exports){"use strict";var ERROR_MESSAGE="Function.prototype.bind called on incompatible ";var toStr=Object.prototype.toString;var max=Math.max;var funcType="[object Function]";var concatty=function concatty(a,b){var arr=[];for(var i=0;i<a.length;i+=1){arr[i]=a[i]}for(var j=0;j<b.length;j+=1){arr[j+a.length]=b[j]}return arr};var slicy=function slicy(arrLike,offset){var arr=[];for(var i=offset||0,j=0;i<arrLike.length;i+=1,j+=1){arr[j]=arrLike[i]}return arr};var joiny=function(arr,joiner){var str="";for(var i=0;i<arr.length;i+=1){str+=arr[i];if(i+1<arr.length){str+=joiner}}return str};module.exports=function bind(that){var target=this;if(typeof target!=="function"||toStr.apply(target)!==funcType){throw new TypeError(ERROR_MESSAGE+target)}var args=slicy(arguments,1);var bound;var binder=function(){if(this instanceof bound){var result=target.apply(this,concatty(args,arguments));if(Object(result)===result){return result}return this}return target.apply(that,concatty(args,arguments))};var boundLength=max(0,target.length-args.length);var boundArgs=[];for(var i=0;i<boundLength;i++){boundArgs[i]="$"+i}bound=Function("binder","return function ("+joiny(boundArgs,",")+"){ return binder.apply(this,arguments); }")(binder);if(target.prototype){var Empty=function Empty(){};Empty.prototype=target.prototype;bound.prototype=new Empty;Empty.prototype=null}return bound}},{}],30:[function(require,module,exports){"use strict";var implementation=require("./implementation");module.exports=Function.prototype.bind||implementation},{"./implementation":29}],31:[function(require,module,exports){"use strict";var undefined;var $Object=require("es-object-atoms");var $Error=require("es-errors");var $EvalError=require("es-errors/eval");var $RangeError=require("es-errors/range");var $ReferenceError=require("es-errors/ref");var $SyntaxError=require("es-errors/syntax");var $TypeError=require("es-errors/type");var $URIError=require("es-errors/uri");var abs=require("math-intrinsics/abs");var floor=require("math-intrinsics/floor");var max=require("math-intrinsics/max");var min=require("math-intrinsics/min");var pow=require("math-intrinsics/pow");var round=require("math-intrinsics/round");var sign=require("math-intrinsics/sign");var $Function=Function;var getEvalledConstructor=function(expressionSyntax){try{return $Function('"use strict"; return ('+expressionSyntax+").constructor;")()}catch(e){}};var $gOPD=require("gopd");var $defineProperty=require("es-define-property");var throwTypeError=function(){throw new $TypeError};var ThrowTypeError=$gOPD?function(){try{arguments.callee;return throwTypeError}catch(calleeThrows){try{return $gOPD(arguments,"callee").get}catch(gOPDthrows){return throwTypeError}}}():throwTypeError;var hasSymbols=require("has-symbols")();var getProto=require("get-proto");var $ObjectGPO=require("get-proto/Object.getPrototypeOf");var $ReflectGPO=require("get-proto/Reflect.getPrototypeOf");var $apply=require("call-bind-apply-helpers/functionApply");var $call=require("call-bind-apply-helpers/functionCall");var needsEval={};var TypedArray=typeof Uint8Array==="undefined"||!getProto?undefined:getProto(Uint8Array);var INTRINSICS={__proto__:null,"%AggregateError%":typeof AggregateError==="undefined"?undefined:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?undefined:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto?getProto([][Symbol.iterator]()):undefined,"%AsyncFromSyncIteratorPrototype%":undefined,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":typeof Atomics==="undefined"?undefined:Atomics,"%BigInt%":typeof BigInt==="undefined"?undefined:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?undefined:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?undefined:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?undefined:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$Error,"%eval%":eval,"%EvalError%":$EvalError,"%Float16Array%":typeof Float16Array==="undefined"?undefined:Float16Array,"%Float32Array%":typeof Float32Array==="undefined"?undefined:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?undefined:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?undefined:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":typeof Int8Array==="undefined"?undefined:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?undefined:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?undefined:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols&&getProto?getProto(getProto([][Symbol.iterator]())):undefined,"%JSON%":typeof JSON==="object"?JSON:undefined,"%Map%":typeof Map==="undefined"?undefined:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!hasSymbols||!getProto?undefined:getProto((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":$Object,"%Object.getOwnPropertyDescriptor%":$gOPD,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?undefined:Promise,"%Proxy%":typeof Proxy==="undefined"?undefined:Proxy,"%RangeError%":$RangeError,"%ReferenceError%":$ReferenceError,"%Reflect%":typeof Reflect==="undefined"?undefined:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?undefined:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!hasSymbols||!getProto?undefined:getProto((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?undefined:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto?getProto(""[Symbol.iterator]()):undefined,"%Symbol%":hasSymbols?Symbol:undefined,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError,"%Uint8Array%":typeof Uint8Array==="undefined"?undefined:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?undefined:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?undefined:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?undefined:Uint32Array,"%URIError%":$URIError,"%WeakMap%":typeof WeakMap==="undefined"?undefined:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?undefined:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?undefined:WeakSet,"%Function.prototype.call%":$call,"%Function.prototype.apply%":$apply,"%Object.defineProperty%":$defineProperty,"%Object.getPrototypeOf%":$ObjectGPO,"%Math.abs%":abs,"%Math.floor%":floor,"%Math.max%":max,"%Math.min%":min,"%Math.pow%":pow,"%Math.round%":round,"%Math.sign%":sign,"%Reflect.getPrototypeOf%":$ReflectGPO};if(getProto){try{null.error}catch(e){var errorProto=getProto(getProto(e));INTRINSICS["%Error.prototype%"]=errorProto}}var doEval=function doEval(name){var value;if(name==="%AsyncFunction%"){value=getEvalledConstructor("async function () {}")}else if(name==="%GeneratorFunction%"){value=getEvalledConstructor("function* () {}")}else if(name==="%AsyncGeneratorFunction%"){value=getEvalledConstructor("async function* () {}")}else if(name==="%AsyncGenerator%"){var fn=doEval("%AsyncGeneratorFunction%");if(fn){value=fn.prototype}}else if(name==="%AsyncIteratorPrototype%"){var gen=doEval("%AsyncGenerator%");if(gen&&getProto){value=getProto(gen.prototype)}}INTRINSICS[name]=value;return value};var LEGACY_ALIASES={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]};var bind=require("function-bind");var hasOwn=require("hasown");var $concat=bind.call($call,Array.prototype.concat);var $spliceApply=bind.call($apply,Array.prototype.splice);var $replace=bind.call($call,String.prototype.replace);var $strSlice=bind.call($call,String.prototype.slice);var $exec=bind.call($call,RegExp.prototype.exec);var rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;var reEscapeChar=/\\(\\)?/g;var stringToPath=function stringToPath(string){var first=$strSlice(string,0,1);var last=$strSlice(string,-1);if(first==="%"&&last!=="%"){throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`")}else