@pageproof/sdk-pr 596.0.1753760086998 → 597.0.1754345488058
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -5
- package/lib/api/Files.d.ts +2 -2
- package/lib/api/Files.js +1 -1
- package/lib/api/Proofs.d.ts +2 -1
- package/lib/api/Proofs.js +1 -1
- package/lib/enum/ResponseStatus.d.ts +0 -3
- package/lib/enum/ResponseStatus.js +1 -1
- package/lib/models/Proof.d.ts +6 -0
- package/lib/models/Proof.js +1 -1
- package/lib/network/Response.js +1 -1
- package/lib/pageproof.js +1 -1
- package/package.json +1 -1
- package/lib/util/errorMessages.d.ts +0 -76
- package/lib/util/errorMessages.js +0 -1
- package/lib/util/fileValidation.d.ts +0 -1
- package/lib/util/fileValidation.js +0 -1
package/lib/pageproof.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.PageProof=t():e.PageProof=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=49)}([function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=function e(t){r(this,e),this.client=t};t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){var r=[],o={};return Array.isArray(t)?(r=t,t.forEach(function(e){o[e]=e})):(0,m.default)(t)&&(r=Object.keys(t),o=t),r.forEach(function(t){var r=o[t],i=void 0;if("string"==typeof r)i=-1!==r.indexOf(".")?function(){for(var e=r.split("."),t=n,o=0;o<e.length;o++){var i=e[o];if(!(0,v.default)(t,i)){t=void 0;break}t=t[i]}return t}:function(){return n[r]};else{if("function"!=typeof r){if(null===r)return;throw new Error("Unknown transformer.")}i=r}var a=i.call(e,n);void 0!==a&&(e[t]=a)}),e}function i(e){return function(t){return Number(t[e])}}function a(e,t){return function(n){return t[n[e]]}}function s(e){return function(t){var n=t[e];if(n&&"0001-01-01T00:00:00"!==n)return"number"==typeof n?new Date(1e3*n):n.endsWith("Z")?new Date(n):new Date(n+"Z")}}function u(e){return function(t){var n=String(t[e]);return"1"===n||"true"===n}}function c(e){return function(t){return v.default.call(t,e)}}function l(e,t){return function(n){return n[e]?n[e].map(t):[]}}function f(e,t){return function(n){return n[e]?JSON.parse(n[e]):Array.isArray(t)?[].concat(t):d({},t)}}function p(e){return function(t){return t[e]?t[e]:void 0}}t.__esModule=!0;var d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.number=i,t.enumeration=a,t.date=s,t.truthy=u,t.exists=c,t.each=l,t.json=f,t.optional=p;var h=n(14),m=r(h),y=n(7),v=r(y);t.default=o},function(e,t,n){"use strict";function r(){if("function"==typeof r.driver){return new(0,r.driver)}if("string"==typeof r.driver){var e=void 0;switch(r.driver){case"Blob":e=n(83).default;break;case"Buffer":e=n(84).default;break;case"String":e=n(85).default;break;case"Uint8Array":e=n(87).default;break;default:throw new Error('Unknown Bluffer driver "'+r.driver+'".')}if(e)return new e;throw new Error('Bluffer driver "'+r.driver+'" not found.')}throw new Error('Bluffer.driver must be either "Blob", "Bluffer", "Uint8Array" (experimental), or "String" or a custom constructor.')}t.__esModule=!0;var o=n(16)("bluffer");r.driver="String","undefined"!=typeof Blob?r.driver="Blob":(o("The current JavaScript environment does not support native Bluffer, falling back to using StringBluffer."),r.driver="String"),t.default=r},function(e,t,n){"use strict";t.__esModule=!0;t.TOKEN_HEADER="x-authorization-token",t.HMAC_HEADER="x-authorization-hmac",t.TIMESTAMP_HEADER="x-timestamp",t.DEVICE_ID_HEADER="x-device-id",t.SUBSCRIPTION_KEY_HEADER="ocp-apim-subscription-key",t.LOCAL_ENCODED_METADATA_HEADER="x-p-lem",t.SDK_VERSION_HEADER="x-pageproof-javascript-sdk",t.RETRY_AFTER_HEADER="retry-after",t.BYTES_PER_BLOCK=2097152,t.MENTION_REGEX=/@{(U[a-zA-Z0-9]{15}|~everyone)}{(.*?)}/,t.COMMENT_LABEL_REGEX=/^(approved|highlight):/i,t.ISO_REGEX=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/,t.DEFAULT_ISO_DATE="0001-01-01T00:00:00",t.DAY_IN_MS=864e5,t.COMMENT_CACHE_PREFIX="comment",t.THUMBNAIL_CACHE_PREFIX="thumbnail",t.PREVIEW_CACHE_PREFIX="preview",t.BRIAN_USER_ID="__brian__",t.BRIAN_TOKEN_HEADER="x-authorization-apitoken",t.BRIAN_HMAC_HEADER="x-authorization-api_hmac",t.VIDEO_CREDENTIALS_CACHE_PREFIX="video-credentials-json-"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={id:"UserId",name:"Name",email:"Email",hasActivated:"Activated",hasRegistered:"IsRegistered",hasAvatar:"HasAvatar",accountType:"AccountType",teamType:"TeamType",teamLogo:"Branding.LogoURL",registeredDate:(0,o.date)("Registered"),lastLoginDate:(0,o.date)("LastLogin"),lastUploadDate:(0,o.date)("LastUpload"),isAdmin:"IsDomainAdmin",features:"Features",teamId:"DomainId",hasTOTP:"TotpEnabled"},s=function(){function e(){r(this,e)}return e.prototype.fromJSON=function(e){return(0,i.default)(this,Object.keys(a),e),this},e.prototype.fromUser=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(){return this.dueDate&&this.dueDate.getTime()<Date.now()}t.__esModule=!0;var a=n(1),s=r(a),u=n(25),c=r(u),l=n(9),f=r(l),p=n(26),d=r(p),h=n(10),m=r(h),y=n(27),v=n(66),_=r(v),b=n(4),w=r(b),g=n(67),E=r(g),O=n(68),P=r(O),T=n(69),k=r(T),I={id:"ProofId",name:"Title",status:"Status",workflowId:"WorkflowId",proofTemplateId:"ProofTemplateId",version:"Version",dueDate:(0,a.date)("DueDate"),createdDate:(0,a.date)("CreateDate"),approvedDate:(0,a.date)("ApprovedDate"),isLocked:"Locked",isArchived:"Closed",isOverdue:i,uploaderUserId:"UserId",ownerUserIds:"OwnerIds",editorUserId:"EditorId",editorUserIds:"EditorIds",lockerUserId:"ProofLockerId",messageToReviewers:"Description",messageToOwners:"OwnerMessage",messageToEditor:"EditorMessage",fileId:"FileId",fileExtension:"Extension",fileStatus:"FileStatus",fileMessage:"FileStatusMessage",fileSize:"FileSize",pageCount:(0,a.number)("Pages"),commentCount:(0,a.number)("ParentComments"),canDownload:(0,a.truthy)("DownloadOriginal"),type:"Type",processStatus:"ProcessStatus",recipient:"Recipient",recipientEmail:"RecipientEmail",todoCommentCount:(0,a.number)("CountTodoComments"),doneCommentCount:(0,a.number)("CountDoneComments"),fileCategory:"FileCategory",isAdminOnProof:"IsAdminOnProof",groupId:"GroupId",canReupload:"CanReupload",hasEditors:"HasEditors",groupName:"GroupName",role:"Role",canOthersEditComments:"FeatureEditComments",canAddCommentReplies:"FeatureCanAddCommentReplies",canHaveGeneralComments:"FeatureGeneralComments",canHavePrivateComments:"FeaturePrivateComments",canAddChecklist:"FeatureCanAddChecklist",hasDecisionsEnabled:"FeatureDecisions",hasColorSeparations:"HasColorSeparations",reference:"Reference",integrationReferences:(0,a.each)("IntegrationReferences",function(e){return(new P.default).fromProofIntegrationReference(e)}),checklist:function(e){return e.Checklist&&(new k.default).fromProofChecklist(e.Checklist)},isReferenceEnabled:"FeatureProofReference",source:"Source",owners:(0,a.each)("Owners",function(e){return(new w.default).fromUser(e)}),decisionSummary:(0,a.each)("Decisions",function(e){return(new E.default).fromDecisionSummary(e)}),tags:(0,a.each)("Tags",function(e){return e.Value}),teamId:"TeamId",isPublic:"IsPublic",canBePublic:"FeaturePublicProofs",availableWorkflowRoles:"FeatureAvailableWorkflowRoles",usePreviousVersionDueDate:"FeatureUsePreviousVersionDueDate",canSendShareLink:"FeatureSendShareLink",publicProofKeyPair:function(e){return e.PublicProofKeyPair&&{publicKeyPEM:e.PublicProofKeyPair.PublicKey,privateKeyPEM:e.PublicProofKeyPair.PrivateKey}},canSendMessageToOwners:"FeatureMessageToOwners",workflowMetrics:"WorkflowMetrics",commentVisibility:"CommentVisibility",canHaveCommentVisibility:"FeatureCommentVisibility",importUrl:"ImportURL"},S=function(){function e(){o(this,e)}return e.prototype.isUserAdminOfProofTeam=function(e){return e.isAdmin&&this.teamId===e.teamId},e.prototype.getState=function(){var e=c.default.ACTIVE;if(this.fileStatus===m.default.UPLOADING)e=c.default.UPLOADING;else if(this.hasFileError())e=c.default.FILE_ERROR;else if(this.isProcessing())e=c.default.PROCESSING;else if(this.type===d.default.BRIEF)switch(this.status){case f.default.NEW:e=c.default.SETUP_NEEDED;break;case f.default.PROOFING:e=c.default.BRIEFING;break;case f.default.AWAITING_NEW_VERSION:e=c.default.AWAITING_PROOF;break;case f.default.HAS_NEW_VERSION:e=c.default.HAS_NEW_VERSION;break;case f.default.ARCHIVED:e=c.default.ARCHIVED}else this.status===f.default.ARCHIVED?e=c.default.ARCHIVED:this.status===f.default.TODOS_REQUESTED?e=c.default.TODOS_REQUESTED:this.status===f.default.AWAITING_NEW_VERSION?e=c.default.AWAITING_NEW_VERSION:this.status===f.default.HAS_NEW_VERSION?e=c.default.HAS_NEW_VERSION:this.status===f.default.APPROVED?e=c.default.APPROVED:this.hasWorkflow()?this.hasWorkflowStarted()?this.isOverdue&&(e=c.default.OVERDUE):e=c.default.NOT_STARTED:e=c.default.PROOFERS_NEEDED;return e},e.prototype.getVideoProcessingProgress=function(){var e=0,t=String(this.fileMessage);if(t){var n=/^Thumb-\w+\-([-+]?[0-9]*\.?[0-9]*)/g.exec(t),r=/^Video-\w+\-([-+]?[0-9]*\.?[0-9]*)/g.exec(t);t.startsWith("Video-Scheduled-")?e=0:r?e=(0,_.default)(parseFloat(r[1])/100,0,.2):n&&(e=(0,_.default)(parseFloat(n[1])/100,.8,0))}return e},e.prototype.hasWorkflowStarted=function(){return this.hasWorkflow()&&this.status!==f.default.NEW},e.prototype.isProcessing=function(){return this.fileStatus===m.default.UPLOADING||this.fileStatus===m.default.QUEUED||this.fileStatus===m.default.RIPPING},e.prototype.isAwaitingFile=function(){return this.source&&this.fileStatus===m.default.CREATED},e.prototype.getProcessingProgress=function(){switch(this.fileStatus){case m.default.UPLOADING:return.1;case m.default.QUEUED:return.2;case m.default.RIPPING:return"video"===this.fileCategory?(0,_.default)(this.getVideoProcessingProgress(),.2,.1).toFixed(2):.6;default:return-1}},e.prototype.hasWorkflow=function(){return(0,y.isWorkflowId)(this.workflowId)},e.prototype.hasFile=function(){return(0,y.isFileId)(this.fileId)},e.prototype.hasFileError=function(){return this.fileStatus===m.default.ERROR||!this.fileStatus||!this.hasFile()},e.prototype.hasEditor=function(){return(0,y.isUserId)(this.editorUserId)},e.prototype.hasThumbnail=function(){return this.fileStatus===m.default.OK},e.prototype.canUserUploadNewVersion=function(e){return this.getState()===c.default.AWAITING_NEW_VERSION&&(this.isEditor(e)||this.isOwner(e))||this.getState()===c.default.AWAITING_PROOF&&(this.isEditor(e)||this.isRecipient(e))},e.prototype.isOwner=function(e){return-1!==this.ownerUserIds.indexOf(e)},e.prototype.isEditor=function(e){return-1!==this.editorUserIds.indexOf(e)},e.prototype.isRecipient=function(e){return this.recipient===e},e.prototype.calculateState=function(){this.state=this.getState()},e.prototype.fromProof=function(e){return(0,s.default)(this,I,e),this.calculateState(),this},e}();t.default=S},function(e,t,n){"use strict";t.__esModule=!0;var r={ERROR_CRITICAL:3,OK:200,ERROR_INVALID:201,ERROR_NO_ACCESS:100,ERROR_NO_ACCESS_WRITE:101,ERROR_RESTRICTED:102,ERROR_SQL_ERROR:105,ERROR_OUT_SYNC:106,ERROR_STORAGE_ERROR:110,ERROR_QUEUE_ERROR:111,ERROR_SQL_DEADLOCK_ERROR:121,ERROR_BAD_REQUEST:400,ERROR_UNAUTHORISED:401,ERROR_MEDIA_PERMISSION_NO_ACCESS:402,ERROR_NOT_FOUND:1e3,ERROR_CREATE:1001,ERROR_UPDATE:1002,ERROR_DELETE:1003,ERROR_EXISTS:1004,ERROR_USER_INVALID_LOGIN:1010,ERROR_USER_INVALID_PASSWORD:1011,ERROR_USER_IS_REGISTERED:1012,ERROR_USER_INVALID_EMAIL:1013,ERROR_USER_INVALID_LOGIN_COUNT:1014,ERROR_USER_DISABLED:1015,ERROR_BAD_REQUEST_DATE:201,ERROR_THROTTLED:429,ERROR_REUSED_CREATION_TOKEN:2011,ERROR_UPGRADE_REQUIRED:3e3,ERROR_VISIBLE_WORKFLOW_USERS_EXIST:3001,ERROR_GROUP_EXISTS:3002,ERROR_GROUP_PROOFS_EXIST:3003,ERROR_FILE_UPLOAD_INVALID_FILE:4001,ERROR_FILE_UPLOAD_INVALID_FILENAME:4005,ERROR_FILE_UPLOAD_MISSING_EXTENSION:4007};t.default=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(1),a=r(i),s=n(4),u=r(s),c=n(3),l={userId:"UserId",token:"Token",sharedKey:"SharedKey",privateKeyPEM$:"PrivateKey",privateKeyPEM:null,publicKeyPEM:"PublicKey",serverPublicKeyPEM:"PublicServerKey",redirectUrl:"RedirectURL"},f=function(){function e(){o(this,e)}return e.prototype.fromJSON=function(e){return(0,a.default)(this,Object.keys(l),e),this.user=(new u.default).fromJSON(e.user),this},e.prototype.fromSession=function(e){return(0,a.default)(this,l,e),this.user=(new u.default).fromUser(e),this},e.prototype.fromBrian=function(e){return this.userId=c.BRIAN_USER_ID,this.token=e.token,this.sharedKey=e.sharedKey,this.origin=e.origin,this},e}();t.default=f},function(e,t,n){"use strict";t.__esModule=!0;var r={NEW:0,PROOFING:10,FINAL_APPROVING:30,TODOS_REQUESTED:50,AWAITING_NEW_VERSION:60,HAS_NEW_VERSION:66,APPROVED:70,ARCHIVED:100};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={CREATED:"Created",OK:"OK",UPLOADING:"Uploading",QUEUED:"Queued",RIPPING:"Ripping",ERROR:"Error"};t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(1),a=r(i),s=n(5),u=r(s),c={canAddProofs:"CanAddProofs",id:"GroupId",name:"Name",description:"Description",isEmpty:"IsEmpty",isArchived:"Archived",teamId:"TeamId",createdBy:"CreatedBy",isOwnedByTeam:"OwnedByTeam",folder:function(e){return null!==e.FolderName?{name:e.FolderName}:null},proofs:(0,i.each)("ProofInfo",function(e){return(new u.default).fromProof(e)})},l=function(){function e(){o(this,e)}return e.prototype.isUserAdminOfGroupTeam=function(e){return e.isAdmin&&this.teamId===e.teamId},e.prototype.fromProofGroup=function(e){return(0,a.default)(this,c,e),this},e}();t.default=l},function(e,t,n){"use strict";t.__esModule=!0;var r="undefined"!=typeof window?window.URL:global.URL||global.require("url").URL;t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(1),a=r(i),s=n(20),u=r(s),c=n(35),l=r(c),f={id:"StepId",name:"Title",position:(0,i.number)("Position"),dueDate:(0,i.date)("DueDate"),visibleDate:(0,i.date)("VisibleDate"),completeDate:(0,i.date)("CompleteDate"),mandatoryDecisionThreshold:"MandatoryDecisionThreshold",state:function(e){return e.Complete?l.default.COMPLETE:e.Visible?l.default.VISIBLE:l.default.NOT_VISIBLE},users:(0,i.each)("Users",function(e,t){var n=(new u.default).fromWorkflowUser(e);return n._calculateState(e,t),n})},p=function(){function e(){o(this,e)}return e.prototype.fromWorkflowStep=function(e){return(0,a.default)(this,f,e),this},e}();t.default=p},function(e,t,n){"use strict";t.__esModule=!0;var r=n(59),o=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(e){return"[object Object]"===(0,o.default)(e)}},function(e,t,n){"use strict";t.__esModule=!0;var r=void 0;r="596.0.1753760086998",t.default=r},function(e,t,n){"use strict";e.exports=function e(){return e}},function(e,t,n){"use strict";function r(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return t}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={id:"FileId",name:"Name",blocks:"Chunks",size:"Size",downloadable:"Downloadable",assignedTo:"AssignedTo",assignedType:"AssignedType",status:"Status",message:"Message",adobeExportData:function(e){var t=e.AdobeExportData;if(t&&t.length)try{return JSON.parse(t)}catch(e){}return null},sourceMetadata:function(e){var t=e.SourceMetadata;if(t&&t.length)try{return JSON.parse(t)}catch(e){}return null},importUrl:"ImportURL"},s={id:"FileId",name:"Name",blocks:"Chunks",assignedTo:"CommentId",assignedType:function(){return"attachment"},status:"Status",message:function(){return""}},u=function(){function e(){r(this,e)}return e.prototype.fromFile=function(e){return(0,i.default)(this,a,e),this},e.prototype.fromCommentAttachment=function(e){return(0,i.default)(this,s,e),this},e}();t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(1),a=r(i),s=n(13),u=r(s),c={id:"WorkflowId",name:"Title",isOwnedByTeam:"OwnedByTeam",teamId:"TeamId",ownerId:"UserId",startFrom:"StartFrom",isFavorite:"IsFavorite",availableRoles:"AvailableRoles",steps:(0,i.each)("WorkflowSteps",function(e){return(new u.default).fromWorkflowStep(e)})},l=function(){function e(){o(this,e)}return e.prototype.getStepByPosition=function(e){for(var t=this.steps.length,n=0;n<t;n+=1){var r=this.steps[n];if(r.position===e)return r}return null},e.prototype.getOrderedSteps=function(){return this.steps.sort(function(e,t){return e.position<t.position?-1:e.position>t.position?1:0})},e.prototype.getApproverStep=function(){return this.getStepByPosition(1e3)},e.prototype.fromWorkflow=function(e){return(0,a.default)(this,c,e),this},e}();t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(1),u=r(s),c=n(4),l=r(c),f=n(34),p=r(f),d={id:"UserId",name:"Name",email:"Email",hasAvatar:"HasAvatar",hasRegistered:"IsRegistered",role:"Role",permissions:function(e){return{inviter:e.IsInviter}},firstViewedDate:(0,s.date)("FirstViewedDate"),nudgedDate:(0,s.date)("NudgedInStep"),decisionDate:(0,s.date)("DecisionDate"),decisionId:"Decision"},h=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype._calculateState=function(e,t){e.SkippedInStep?this.state=p.default.SKIPPED:e.CompleteInStep?this.state=p.default.FINISHED:e.ViewedInStep?this.state=p.default.SEEN:t.Visible?this.state=p.default.VISIBLE:this.state=p.default.NOT_VISIBLE},t.prototype.fromWorkflowUser=function(e){return this._calculateState({},{}),(0,u.default)(this,d,e),this},t}(l.default);t.default=h},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function o(e){if(0===e.indexOf(d)){var t=e.substring(d.length,e.indexOf(h));return parseInt(t,10)}if(e.match(f))try{return JSON.parse(e)[p]}catch(e){}return 1}function i(e){var t=o(e),n=l[t];if(n)return n(e);throw new Error("Unsupported comment schema version. Please update to a newer version of the SDK.")}t.__esModule=!0,t.getVersionNumber=void 0;var a=n(128),s=r(a),u=n(22),c=r(u),l={2:c.parse,1:s.parse},f=/^\s*{/,p="_",d='{"_":',h=",";t.default=i,t.getVersionNumber=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(Array.isArray(e))return e.map(function(e){return o(e,t)});if((0,f.default)(e)){var n={};for(var r in e)(0,c.default)(e,r)&&t[r]&&(n[t[r]]=o(e[r],t));return n}return e}function i(e){return o(JSON.parse(e),p)}function a(e){var t=o(s({version:2},e),d);return JSON.stringify(t)}t.__esModule=!0,t.serialize=t.parse=void 0;var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(7),c=r(u),l=n(14),f=r(l),p={_:"version",bs:"blocks",t:"type",v:"value",i:"index",l:"length",st:"styles",en:"entities",md:"metadata",i_:"id",lb:"label",ur:"url"},d={};for(var h in p)(0,c.default)(p,h)&&(d[p[h]]=h);t.parse=i,t.serialize=a},function(e,t,n){"use strict";t.__esModule=!0;var r={TODO:"todo",DONE:"done",UNMARKED:"unmarked"};t.default=r},function(e,t,n){"use strict";function r(e,t){return o[e]||t||"Unknown error occurred (Code: "+e+"). Please contact support."}t.__esModule=!0,t.getErrorMessage=r;var o={400:"Bad request: The request contains invalid data.",401:"Unauthorized: Please log in to access this resource.",404:"Not found: The requested resource does not exist.",406:"Authentication failed.",407:"Authentication failed.",1010:"Authentication failed.",1011:"Authentication failed.",1012:"Operation failed. Please contact support.",1013:"Invalid format.",1014:"Too many requests. Please try again later.",1015:"Access unavailable. Please contact support.",1016:"System error. Please contact support.",1017:"Authentication failed.",1018:"Invalid or expired code.",1019:"Invalid or expired code.",1020:"System error. Please contact support.",1021:"Access denied. Please contact support.",1022:"Invalid or expired code.",1023:"Invalid or expired code.",1024:"System error. Please contact support.",4001:"File upload failed: Unable to queue file for processing.",4002:"File upload failed: Queueing process failed.",4005:"File upload failed: Invalid filename. Please use only letters, numbers, and standard characters.",4006:"File upload failed: This file is already attached to another proof.",4007:"File upload failed: File is missing a file extension. Please ensure your file has a proper extension (e.g., .pdf, .jpg).",4008:"File upload failed: Unsupported file type. Please check the supported file formats.",100:"Access denied. Please contact support if you believe this is an error.",101:"Access denied. Please contact support if you believe this is an error.",102:"Resource temporarily unavailable. Please try again later.",124:"Access denied. Please contact support if you believe this is an error.",125:"Access denied. Please contact support if you believe this is an error.",126:"Access denied. Please contact support if you believe this is an error.",402:"Access denied. Please contact support if you believe this is an error.",403:"Operation not supported.",1e3:"Resource not found.",1001:"Failed to create resource.",1002:"Failed to update resource.",1003:"Failed to delete resource.",1004:"Resource already exists.",1005:"System configuration error. Please contact support.",2010:"Invalid format.",2011:"Invalid request.",3e3:"Account upgrade required. Please contact support.",6005:"Feature not available. Please contact support.",3001:"Group workflow has already been started.",3002:"A group with this name already exists.",3003:"Cannot delete group: active proofs exist.",3004:"No proofs found for this group.",5e3:"Resource already exists.",6e3:"Invalid format. Please check your input.",6001:"Verification failed. Please contact support.",6002:"Invalid format. Please check your input.",6003:"Required information missing. Please contact support.",6004:"Resource unavailable. Please try a different option.",6500:"Prerequisites not met. Please contact support.",106:"System error. Please try again later.",110:"System error. Please try again later.",120:"System error. Please try again later.",121:"System error. Please try again later.",122:"Operation failed. Please try again.",123:"Operation failed. Please try again.",7e3:"Internal server error. Please try again later."};t.default=o},function(e,t,n){"use strict";t.__esModule=!0;var r={UPLOADING:"uploading",FILE_ERROR:"file-error",PROCESSING:"processing",ARCHIVED:"archived",PROOFERS_NEEDED:"proofers-needed",TODOS_REQUESTED:"todos-requested",AWAITING_NEW_VERSION:"awaiting-new-version",HAS_NEW_VERSION:"has-new-version",APPROVED:"approved",NOT_STARTED:"not-started",OVERDUE:"overdue",ACTIVE:"active",SETUP_NEEDED:"setup-needed",BRIEFING:"briefing",AWAITING_PROOF:"awaiting-proof"};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={PROOF:1,BRIEF:2};t.default=r},function(e,t,n){"use strict";var r={Proof:"P",Workflow:"W",File:"F",User:"U",Brief:"B"},o={};Object.keys(r).forEach(function(e){o["is"+e+"Id"]=function(t){return t&&16===t.length&&t[0]===r[e]}}),e.exports=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={id:"ProofId",version:"Version",canDelete:"CanDelete"},s=function(){function e(){r(this,e)}return e.prototype.fromProofVersion=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){return o(function(t){return t[e]},t)}function o(e,t){var n=t?1:-1,r=t?-1:1;return function(t,o){var i=e(t),a=e(o);return i<a?n:i>a?r:0}}function i(e,t){var n={};t.forEach(function(e,t){n[e]=t});var r="function"==typeof e?e:function(t){return t[e]};return function(e,t){var o=n[r(e)],i=n[r(t)];return o<i?-1:o>i?1:0}}function a(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.length;return function(e,n){for(var o=0;o<r;o++){var i=t[o](e,n);if(i)return i}return 0}}t.__esModule=!0,t.sortObjectsByKey=r,t.sortObjectsBy=o,t.sortObjectsByValues=i,t.combineSort=a},function(e,t,n){"use strict";function r(e){return String.fromCharCode.apply(null,new Uint8Array(e))}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={NONE:"none",GOOGLE_DRIVE:"drive",DROPBOX:"dropbox",ONEDRIVE:"onedrive",BOX:"box",CANVA:"canva",WEBSITE:"website"};t.default=r},function(e,t,n){"use strict";function r(e,t){var n=void 0;return function(){n||(n=setTimeout(function(){e(),n=null},t))}}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t,n){return new Promise(function(r,o){setTimeout(function(){void 0!==n?o(n):r(t)},e)})}},function(e,t,n){"use strict";t.__esModule=!0;var r={NONE:null,NOT_VISIBLE:"not-visible",VISIBLE:"visible",SEEN:"seen",SKIPPED:"skipped",FINISHED:"finished"};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={NONE:null,NOT_VISIBLE:"not-visible",VISIBLE:"visible",COMPLETE:"complete"};t.default=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(0),u=function(e){return e&&e.__esModule?e:{default:e}}(s),c=function(e){function t(n,i){r(this,t);var a=o(this,e.call(this,n));return a.level=i,a}return i(t,e),t.prototype.configurations=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.client.request("integrations.get-configurations",{level:this.level,integration_keys:e.join(",")}).then(function(e){return e.data?e.data.integrations:null})},t.prototype.getSetupUrl=function(e,t){return this.client.request("integrations.get-setup-url",{params:a({},t,{integration_key:e,level:this.level})}).then(function(e){return{url:e.data.url,windowFeatures:e.data.windowFeatures}})},t.prototype.disable=function(e){return this.client.request("integrations.disable",{level:this.level,integration_key:e})},t.prototype.updateConfiguration=function(e,t,n){return this.client.request("integrations.update-configuration",{level:this.level,integrationKey:e,key:t,value:n})},t}(u.default);t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(1),s=r(a),u=n(4),c=r(u),l=n(18),f=r(l),p=n(21),d=r(p),h=n(38),m=r(h),y=n(39),v={id:"CommentId",proofId:"ProofId",pins:function(e){return(0,y.parsePins)(e.XY).map(function(t,n){return 0===n&&e.BoxFillType?i({},t,{fill:e.BoxFillType&&{type:e.BoxFillType,image:e.BoxFillImage}}):t})},pin:function(){return this.pins[0]},user:function(e){return(new c.default).fromUser(e)},comment$:"EncryptedComment",envelope:"Envelope",attachments:function(e){return e.Attachments?e.Attachments.map(function(t){return(new f.default).fromCommentAttachment(i({CommentId:e.CommentId},t))}):[]},agreeCount:function(e){return e.Agrees.length},pageNumber:(0,a.number)("Page"),mediaTime:function(){return this.pin&&this.pin.time},mediaDuration:function(){return this.pin&&this.pin.duration},createdDate:(0,a.date)("Timestamp"),updatedDate:(0,a.date)("Updated"),parentCommentId:(0,a.optional)("Parent"),metadata:(0,a.json)("Metadata",{}),sourceMetadata:"SourceMetadata",state:function(e){return(0,m.default)(e)},isPrivate:"Private"},_=function(){function e(){o(this,e)}return e.prototype.fromComment=function(e){return(0,s.default)(this,v,e),this},e.prototype.fromRawComment=function(e){var t=(0,d.default)(e);return this.raw=e,this.tokens=t,this},e}();t.default=_},function(e,t,n){"use strict";function r(e){return+e.Done?i.default.DONE:+e.Change?i.default.TODO:i.default.UNMARKED}t.__esModule=!0;var o=n(23),i=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r},function(e,t,n){"use strict";function r(e){if("{"===e[0]){var t=JSON.parse(e);return t.pins?[3,t.pins]:[2,t]}return-1!==e.indexOf(",")?[1,e]:[null]}function o(e){var t=e.split(",").map(function(e){return parseFloat(e)}),n=t[0],r=t[1];return[c({x:n,y:r})]}function i(e){return[c(e)]}function a(e){return e.map(c)}function s(e){if(null==e)return[];var t=[],n=r(e),s=n[0],u=n[1];switch(s){case 3:t=a(u);break;case 2:t=i(u);break;case 1:t=o(u)}return t}t.__esModule=!0,t.parsePins=s;var u=n(40),c=function(e){return{x:(0,u.withinPinBounds)((0,u.numberOrNull)(e.x)),y:(0,u.withinPinBounds)((0,u.numberOrNull)(e.y)),x2:(0,u.withinPinBounds)((0,u.numberOrNull)(e.x2)),y2:(0,u.withinPinBounds)((0,u.numberOrNull)(e.y2)),time:(0,u.numberOrNull)(e.time),duration:(0,u.numberOrNull)(e.duration)}}},function(e,t,n){"use strict";function r(e){return o(e)?e:null}function o(e){return"number"==typeof e&&!isNaN(e)}function i(e){return o(e)?Math.max(-.5,Math.min(.5,e)):e}t.__esModule=!0,t.numberOrNull=r,t.isFiniteNumber=o,t.withinPinBounds=i},function(e,t,n){"use strict";function r(e){var t=[];return e.blocks.forEach(function(e){e.entities.forEach(function(e){if("mention"===e.type){var n=e.metadata.id;-1===t.indexOf(n)&&t.push(n)}})}),t}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";function r(e,t){for(var n=new Array(t),r=t;r>0;--r)n[r]=e[Math.round(Math.random()*(e.length-1))];return n.join("")}t.__esModule=!0;t.lower="abcdefghijklmnopqrstuvwxyz",t.upper="ABCDEFGHIJKLMNOPQRSTUVWXYZ",t.numbers="0123456789",t.symbols="~`!@#$%^&*()_+-={}[]:\";'<>?,./|\\";t.default=r},function(e,t,n){"use strict";function r(e,t){if(!(0,i.isFiniteNumber)(t.x)||!(0,i.isFiniteNumber)(t.y))throw new Error("Malformed pin. Pins must contain, at minimum, an x and y coordinate.");return e.x=(0,i.withinPinBounds)(t.x),e.y=(0,i.withinPinBounds)(t.y),(0,i.isFiniteNumber)(t.x2)&&(e.x2=(0,i.withinPinBounds)(t.x2)),(0,i.isFiniteNumber)(t.y2)&&(e.y2=(0,i.withinPinBounds)(t.y2)),(0,i.isFiniteNumber)(t.time)&&(e.time=t.time),(0,i.isFiniteNumber)(t.duration)&&(e.duration=t.duration),e}function o(e){if(0===e.length)return"";var t={};return r(t,e[0]),e.length>1&&(t.pins=e.map(function(e){return r({},e)})),JSON.stringify(t)}t.__esModule=!0,t.serializePins=o;var i=n(40)},function(e,t,n){"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.map(function(e,t){return e+(void 0!==n[t]?n[t]:"")}).join("")}t.__esModule=!0,t.gql=r},function(e,t,n){"use strict";function r(e){return"string"==typeof e?e.replace(/</g,"<").replace(/>/g,">"):e}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments[2],r=arguments[3],o=0,a=[].concat(i(e),i(t)).sort(function(e,t){return e.offset-t.offset}),s=[];return a.length<1?(s.push(new d.default({block:r,start:0,end:n.length})),s):(a.forEach(function(e){e.offset>o&&s.push(new d.default({block:r,start:o,end:e.offset})),s.push(new d.default({block:r,entity:e.key,decorator:e.component,decoratorProps:e.decoratorProps,decoratedText:e.component?h(n,e.offset,e.offset+e.length):void 0,start:e.offset,end:e.offset+e.length,contentState:e.contentState})),o=e.offset+e.length}),o<n.length&&s.push(new d.default({block:r,start:o,end:n.length})),s)}function s(e,t){return t.forEach(function(t){e.push(t.offset),e.push(t.offset+t.length)}),e}function u(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=[];return o=s(o,t),o=s(o,n),o=s(o,r),o.push(0),o.push(e.length),o.filter(function(e,t,n){return n.indexOf(e)===t}).sort(function(e,t){return e-t})}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(47),f=r(l),p=n(164),d=r(p),h=function(e,t,n){return f.default.ucs2.encode(e.slice(t,n))},m=function(){function e(t){var n=t.flat,r=void 0!==n&&n;o(this,e),this.flat=r}return c(e,[{key:"relevantStyles",value:function(e){return this.ranges.filter(function(t){return e>=t.offset&&e<t.offset+t.length}).map(function(e){return e.style})}},{key:"nodeIterator",value:function(e,t,n){var r=this,o=this.relevantIndexes.slice(this.relevantIndexes.indexOf(t),this.relevantIndexes.indexOf(n));return o.forEach(function(t,i){var a=r.relevantStyles(t),s=o[i+1]?o[i+1]-t:1,u=h(r.textArray,t,t+s);e.pushContent(u,a,r.flat),!o[i+1]&&t<n&&e.pushContent(h(r.textArray,t+1,n),r.relevantStyles(n-1),r.flat)}),e}},{key:"parse",value:function(e){var t=this,n=e.text,r=e.inlineStyleRanges,o=e.entityRanges,i=e.decoratorRanges,s=void 0===i?[]:i;this.textArray=f.default.ucs2.decode(n),this.ranges=r,this.iterator=0,this.relevantIndexes=u(n,r,o,s);var c=a(o,s,this.textArray,e),l=c.map(function(e){return t.nodeIterator(e,e.start,e.end)});return new d.default({block:e,content:l})}}]),e}();t.default=m},function(e,t,n){"use strict";function r(e){throw new RangeError(f[e])}function o(e,t){for(var n=[],r=e.length;r--;)n[r]=t(e[r]);return n}function i(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(l,"."),r+o(e.split("."),t).join(".")}function a(e){for(var t=[],n=0,r=e.length;n<r;){var o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){var i=e.charCodeAt(n++);56320==(64512&i)?t.push(((1023&o)<<10)+(1023&i)+65536):(t.push(o),n--)}else t.push(o)}return t}t.__esModule=!0;var s=2147483647,u=/^xn--/,c=/[^\0-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,d=String.fromCharCode,h=function(e){return String.fromCodePoint.apply(String,e)},m=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:36},y=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},v=function(e,t,n){var r=0;for(e=n?p(e/700):e>>1,e+=p(e/t);e>455;r+=36)e=p(e/35);return p(r+36*e/(e+38))},_=function(e){var t=[],n=e.length,o=0,i=128,a=72,u=e.lastIndexOf("-");u<0&&(u=0);for(var c=0;c<u;++c)e.charCodeAt(c)>=128&&r("not-basic"),t.push(e.charCodeAt(c));for(var l=u>0?u+1:0;l<n;){for(var f=o,d=1,h=36;;h+=36){l>=n&&r("invalid-input");var y=m(e.charCodeAt(l++));(y>=36||y>p((s-o)/d))&&r("overflow"),o+=y*d;var _=h<=a?1:h>=a+26?26:h-a;if(y<_)break;var b=36-_;d>p(s/b)&&r("overflow"),d*=b}var w=t.length+1;a=v(o-f,w,0==f),p(o/w)>s-i&&r("overflow"),i+=p(o/w),o%=w,t.splice(o++,0,i)}return String.fromCodePoint.apply(String,t)},b=function(e){var t=[];e=a(e);for(var n=e.length,o=128,i=0,u=72,c=e,l=Array.isArray(c),f=0,c=l?c:c[Symbol.iterator]();;){var h;if(l){if(f>=c.length)break;h=c[f++]}else{if(f=c.next(),f.done)break;h=f.value}var m=h;m<128&&t.push(d(m))}var _=t.length,b=_;for(_&&t.push("-");b<n;){for(var w=s,g=e,E=Array.isArray(g),O=0,g=E?g:g[Symbol.iterator]();;){var P;if(E){if(O>=g.length)break;P=g[O++]}else{if(O=g.next(),O.done)break;P=O.value}var T=P;T>=o&&T<w&&(w=T)}var k=b+1;w-o>p((s-i)/k)&&r("overflow"),i+=(w-o)*k,o=w;for(var I=e,S=Array.isArray(I),C=0,I=S?I:I[Symbol.iterator]();;){var R;if(S){if(C>=I.length)break;R=I[C++]}else{if(C=I.next(),C.done)break;R=C.value}var A=R;if(A<o&&++i>s&&r("overflow"),A==o){for(var D=i,M=36;;M+=36){var x=M<=u?1:M>=u+26?26:M-u;if(D<x)break;var j=D-x,F=36-x;t.push(d(y(x+j%F,0))),D=p(j/F)}t.push(d(y(D,0))),u=v(i,k,b==_),i=0,++b}}++i,++o}return t.join("")},w=function(e){return i(e,function(e){return u.test(e)?_(e.slice(4).toLowerCase()):e})},g=function(e){return i(e,function(e){return c.test(e)?"xn--"+b(e):e})},E={version:"2.1.0",ucs2:{decode:a,encode:h},decode:_,encode:b,toASCII:g,toUnicode:w};t.ucs2decode=a,t.ucs2encode=h,t.decode=_,t.encode=b,t.toASCII=g,t.toUnicode=w,t.default=E},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,n){for(var r=t;r<n;r++)if(null!=e[r])return!1;return!0}function i(e,t,n,r){for(var o=t;o<n;o++)e[o]=r}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(){function e(t){r(this,e),this.decorators=t.slice()}return a(e,[{key:"getDecorations",value:function(e,t){var n=Array(e.getText().length).fill(null);return this.decorators.forEach(function(r,a){var s=0;(0,r.strategy)(e,function(e,t){o(n,e,t)&&(i(n,e,t,a+"."+s),s++)},t)}),n}},{key:"getComponentForKey",value:function(e){var t=parseInt(e.split(".")[0],10);return this.decorators[t].component}},{key:"getPropsForKey",value:function(e){var t=parseInt(e.split(".")[0],10);return this.decorators[t].props}}]),e}();t.default=s},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.version=t.util=t.Model=t.Enum=t.Bluffer=t.Client=void 0;var i=n(50),a=o(i),s=n(2),u=o(s),c=n(150),l=r(c),f=n(159),p=r(f),d=n(15),h=o(d),m=n(160),y=r(m);t.default=a.default,t.Client=a.default,t.Bluffer=u.default,t.Enum=l,t.Model=p,t.util=y,t.version=h.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(51),a=r(i),s=n(56),u=r(s),c=n(57),l=r(c),f=n(60),p=r(f),d=n(62),h=r(d),m=n(65),y=r(m),v=n(71),_=r(v),b=n(72),w=r(b),g=n(96),E=r(g),O=n(97),P=r(O),T=n(101),k=r(T),I=n(123),S=r(I),C=n(125),R=r(C),A=n(127),D=r(A),M=n(131),x=r(M),j=n(132),F=r(j),q=n(133),N=r(q),B=n(134),U=r(B),L=n(135),G=r(L),z=n(8),K=r(z),V=n(136),W=r(V),H=n(6),$=r(H),Z=n(33),X=r(Z),Q=n(3),Y=n(137),J=r(Y),ee=n(138),te=n(139),ne=n(140),re=r(ne),oe=n(141),ie=r(oe),ae=n(144),se=r(ae),ue=n(145),ce=r(ue),le=n(146),fe=r(le),pe=n(147),de=r(pe),he=n(15),me=r(he),ye=n(149),ve=r(ye),_e=n(16)("PageProof"),be=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.options,r=void 0===n?{}:n,i=t.adapters,s=void 0===i?[]:i;o(this,e),this.options=r,this.clientId=r.clientId||(0,ve.default)(),this.events=new W.default,this.adapters=new a.default(s),this.cache=new u.default(this),this.keyPairs=new fe.default(this),this.accounts=new h.default(this),this.comments=new D.default(this),this.dashboard=new y.default(this),this.files=new P.default(this),this.profile=new x.default(this),this.proofs=new w.default(this),this.briefs=new E.default(this),this.users=new _.default(this),this.workflows=new S.default(this),this.preferences=new R.default(this),this.sessions=new F.default(this),this.encryption=new N.default(this),this.live=new U.default(this),this.reports=new re.default(this),this.teams=new ie.default(this),this.printing=new se.default(this),this.freeTrial=new ce.default(this),this.checklistTemplates=new de.default(this),this.__admin=new k.default(this),this._hijackAdmin(),this._init(),this._registerCoreHooks(),this._enhance()}return e.prototype._init=function(){var e=this.adapters.getRequestAdapter();if(this.options.endpoint||(this.options.endpoint=e.options.endpoint),this.options.applicationId||(this.options.applicationId=e.options.applicationId),this.options.subscriptionKey||(this.options.subscriptionKey=e.options.key||this.options.key),this.options.subscriptionKey&&!this.options.applicationId)throw new Error("You must provide an applicationId.")},e.prototype._hijackAdmin=function(){var e=this;Object.getOwnPropertyNames(this.__admin).forEach(function(t){return e.admin[t]=e.__admin[t]})},e.prototype._registerCoreHooks=function(){this.on("error.throttled",function(e){var t=e.data.response.data.timeout;return _e("Sleeping "+t+"ms until rate limit resets"),(0,X.default)(t)})},e.prototype._enhance=function(){var e=this;this.adapters.getEnhancementAdapters().forEach(function(t){return t.onClientReady(e)})},e.prototype.setSession=function(e){return!e||e instanceof K.default?this.session=e||null:this.session=(new K.default).fromJSON(e),this.session},e.prototype.rawRequest=function(e,t){var n=e.method,r=e.url,o=e.host,i=e.path,a=e.query,s=e.body,u=e.headers,c=this.adapters.getRequestAdapter();return r&&(o=r.origin,i=r.pathname,a=r.search),c.send({host:o,method:n,path:i,query:a,body:s,headers:u,credentials:!1},t)},e.prototype.getRequestLocalEncodedMetadata=function(){return[(0,J.default)()].map(function(e){return null!==e&&void 0!==e?encodeURIComponent(e):"#"}).join(":")},e.prototype.request=function(e,t,n){var r=this,o=new l.default(this.options.endpoint,e,t),i=this.adapters.getRequestAdapter(),a=Promise.resolve();if(!o.endpoint.anonymous){if(!this.session)return Promise.reject(new Error("Cannot make call to endpoint ("+e+") when unauthorized."));a=this.adapters.getCryptoAdapter().generateAuthorizationHeaders(o.getMethod(),o.getPath(),this.session).then(function(e){return o.addHeaders(e)})}this.options.applicationId&&o.addHeader(Q.DEVICE_ID_HEADER,this.options.applicationId),this.options.subscriptionKey&&o.addHeader(Q.SUBSCRIPTION_KEY_HEADER,this.options.subscriptionKey),"graphql"===e&&(o.addHeader("apollographql-client-name",this.options.applicationId?this.options.applicationId+" (via @pageproof/sdk)":"@pageproof/sdk"),o.addHeader("apollographql-client-version",me.default),this.clientId&&o.addHeader("spider-client-id",this.clientId));var s=this.getRequestLocalEncodedMetadata();s&&o.addHeader(Q.LOCAL_ENCODED_METADATA_HEADER,s);var u={request:o};return a.then(function(){var e=o.build();return r.events.emit("experimental.request.before",u,!0).then(function(){return e})}).then(function(e){return i.send(e,n)}).then(p.default.parse).then(function(o){if(u.response=o,r.events.emit("experimental.request.after",u),o.code===$.default.ERROR_THROTTLED){var i=r.events.emit("error.throttled",u);if(i.some(Boolean))return Promise.all(i).then(function(){return r.events.emit("experimental.request.retry",u),r.request(e,t,n)})}if(o.code===$.default.ERROR_UNAUTHORISED){var a=r.session?r.session.token:null;return r.events.emit("error.unauthorized",u,!0).then(function(){return r.session&&r.session.token!==a?r.request(e,t,n):o})}if(o.deprecated){var s="The "+e+" API has been deprecated. "+(o.deprecated||"");r.events.emit("error.deprecated",{name:e,message:s})}return o}).then(function(t){try{if(t.error){r.events.emit("error.response",u);var n=new Error(t.message+" ["+e+"]");return n.response=t,n.request=o,Promise.reject(n)}return r.events.emit("experimental.request.resolve",u),Promise.resolve(t)}finally{r.events.emit("experimental.request.finally",u)}})},e.prototype.graphql=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{throwOnError:!0,minifyDocument:!0},r=!n||!1!==n.throwOnError,o=!0===n.minifyDocument,i=o?e.replace(/\s+/g," ").replace(/ { /g,"{").replace(/ } /g,"}").trim():e;return this.request("graphql",{query:i,variables:t}).then(function(e){var t=e.data;if(t.errors&&t.errors.length&&r){throw new ee.AggregateError("One or more GraphQL errors occurred.",t.errors.map(function(e){return new te.GraphQLError(e.message,e.locations,e.path)}))}return t})},e.prototype.admin=function(){return this.session?this.session.user.isAdmin?(this._admin||(this._admin=Promise.resolve(this.__admin)),this._admin):Promise.reject(new Error("The current user must be an administrator of a team or enterprise account.")):Promise.reject(new Error("You must be logged in to use the Admin API."))},e.prototype.brian=function(){return this.session&&this.session.userId===Q.BRIAN_USER_ID?(this._brian||(this._brian=Promise.resolve(new G.default(this))),this._brian):Promise.reject(new Error("You do not have permission to use this API."))},e.prototype.crypto=function(){return this.adapters.getCryptoAdapter()},e.prototype.protobuf=function(){return this.adapters.getProtobufAdapter()},e.prototype.on=function(e,t){return this.events.on(e,t)},e}();t.default=be},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(52),a=r(i),s=n(53),u=r(s),c=n(54),l=r(c),f=n(55),p=r(f),d=function(){function e(t){o(this,e),this.adapters=[].concat(t)}return e.prototype.getAdapterInstanceOf=function(e){return this.getAnyAdaptersInstanceOf(e)[0]||null},e.prototype.getAnyAdaptersInstanceOf=function(e){for(var t=[],n=e.__adapter__,r=0;r<this.adapters.length;r+=1)for(var o=this.adapters[r],i=o;null!==i;){if(i.constructor&&i.constructor.__adapter__===n){t.push(o);break}i=Object.getPrototypeOf(i)}return t},e.prototype.getCryptoAdapter=function(){var e=this.getAdapterInstanceOf(a.default);if(!e)throw new Error("ICryptoAdapter not found. This adapter is required for the SDK to function correctly.");return e},e.prototype.getRequestAdapter=function(){var e=this.getAdapterInstanceOf(u.default);if(!e)throw new Error("IRequestAdapter not found. This adapter is required for the SDK to function correctly.");return e},e.prototype.getCacheAdapter=function(){return this.getAdapterInstanceOf(l.default)},e.prototype.getEnhancementAdapters=function(){return this.getAnyAdaptersInstanceOf(p.default)},e.prototype.getProtobufAdapter=function(){return this.getAdapterInstanceOf({__adapter__:"ProtobufAdapter"})},e}();t.default=d},function(e,t,n){"use strict";function r(){}t.__esModule=!0,r.__adapter__="ICryptoAdapter",t.default=r},function(e,t,n){"use strict";function r(){}t.__esModule=!0,r.__adapter__="IRequestAdapter",t.default=r},function(e,t,n){"use strict";function r(){}t.__esModule=!0,r.__adapter__="ICacheAdapter",t.default=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,n){var r=e[t];e[t]=function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];var i=r.bind.apply(r,[this].concat(t));return n(i,this,t).apply(this,t)}}function i(e){function t(o){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=Object.getOwnPropertyNames(o).filter(function(t){return o[t].client===e}),s=Object.getPrototypeOf(o),u=Object.keys(s).filter(function(e){return"function"==typeof s[e]&&0!==e.indexOf("_")});if(i.length||n){var c=i.join(".");0===c.indexOf("__")&&(c=c.substring(2)),u.forEach(function(e){r.push({namespace:c,name:e,api:o})})}a.forEach(function(e){t(o[e],i.concat(e))})}var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[];return t(e),r}t.__esModule=!0;var a,s,u=(s=a=function(){function e(){r(this,e)}return e.prototype.onClientReady=function(e){var t=this;i(e).forEach(function(e){var n={api:e.api,namespace:e.namespace,name:e.name,displayName:e.namespace+"."+e.name};t.onMethodEnhance(n),o(e.api,e.name,function(e){return t.onMethodBefore(n),function(){var r=void 0;try{r=e()}catch(e){throw n.error=e,t.onMethodThrown(n),e}finally{n.value=r,t.onMethodAfter(n),r&&"function"==typeof r.then&&r.then(function(e){n.resolved=e,t.onMethodResolve(n)},function(e){n.rejected=e,t.onMethodReject(n)}).then(function(){t.onMethodFinally(n)})}return r}})}),e.on("experimental.request.before",function(e){return t.onRequestBefore(e.data)}),e.on("experimental.request.after",function(e){return t.onRequestAfter(e.data)}),e.on("error.response",function(e){return t.onRequestReject(e.data)}),e.on("error.throttled",function(e){return t.onRequestThrottled(e.data)}),e.on("experimental.request.retry",function(e){return t.onRequestRetry(e.data)}),e.on("error.unauthorized",function(e){return t.onRequestUnauthorized(e.data)}),e.on("error.deprecated",function(e){return t.onRequestDeprecated(e.data)}),e.on("experimental.request.resolve",function(e){return t.onRequestResolve(e.data)}),e.on("experimental.request.finally",function(e){return t.onRequestFinally(e.data)})},e.prototype.onMethodEnhance=function(e){},e.prototype.onMethodBefore=function(e){},e.prototype.onMethodAfter=function(e){},e.prototype.onMethodReject=function(e){},e.prototype.onMethodResolve=function(e){},e.prototype.onMethodFinally=function(e){},e.prototype.onMethodThrown=function(e){},e.prototype.onRequestBefore=function(e){},e.prototype.onRequestAfter=function(e){},e.prototype.onRequestReject=function(e){},e.prototype.onRequestThrottled=function(e){},e.prototype.onRequestRetry=function(e){},e.prototype.onRequestUnauthorized=function(e){},e.prototype.onRequestDeprecated=function(e){},e.prototype.onRequestResolve=function(e){},e.prototype.onRequestFinally=function(e){},e}(),a.__adapter__="IEnhancementAdapter",s);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=function(){function e(t){r(this,e),this.client=t}return e.prototype.auto=function(e,t){var n=this.client.adapters.getCacheAdapter(),r=function(){};return n?(r=function(t){void 0!==t&&n.set(e,t)},n.get(e).catch(function(){return Promise.resolve(t(r)).then(function(e){return r(e),e})})):Promise.resolve(t(r))},e}();t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(58),s=r(a),u=n(14),c=r(u),l=n(15),f=r(l),p=n(3),d=function(){function e(t,n,r){if(o(this,e),this.host=t,this.name=n,this.endpoint=s.default[n],!this.endpoint)throw new Error('Unknown request endpoint "'+n+'".');this.params={},this.addParams(r),this.headers={}}return e.prototype.addHeaders=function(e){return this.headers=i({},this.headers,e),this},e.prototype.addHeader=function(e,t){return this.headers[e]=t,this},e.prototype.addParams=function(e){return this.params=i({},this.params,e),this},e.prototype.addParam=function(e,t){this.params[e]=t},e.prototype.getPath=function(){var e=this,t=this.endpoint,n=t.path,r=t.chain,o=t.trailing,i=n;return r&&r.forEach(function(t){"/"!==i[i.length-1]&&(i+="/"),i+=e.params[t]}),o&&"/"!==i[i.length-1]&&(i+="/"),i},e.prototype.getQuery=function(){var e=this,t=this.endpoint.query;if(t){var n=[];if("string"==typeof t){var r=this.params[t];(0,c.default)(r)&&Object.keys(r).forEach(function(e){void 0!==r[e]&&n.push(e+"="+encodeURIComponent(r[e]))})}else t.forEach(function(t){void 0!==e.params[t]&&n.push(t+"="+encodeURIComponent(e.params[t]))});if(n.length)return"?"+n.filter(Boolean).join("&")}return""},e.prototype.getHeaders=function(){var e,t=i({},this.headers,(e={},e[p.SDK_VERSION_HEADER]=f.default,e));if("POST"===this.endpoint.method||"PATCH"===this.endpoint.method||"PUT"===this.endpoint.method)switch(this.endpoint.version){case 2:t["Content-Type"]="application/json";break;case 1:default:t["Content-Type"]="application/x-www-form-urlencoded"}return t},e.prototype.getBody=function(){var e=this,t=this.endpoint;if(t.body){if("string"==typeof t.body){var n=this.params[t.body];return n=(0,c.default)(n)?JSON.stringify(n):String(n)}var r=!0===t.body?Object.keys(this.params):t.body,o={};switch(r.forEach(function(t){var n=e.params[t];void 0!==n&&(o[t]=n)}),t.version){case 2:return JSON.stringify(o);case 1:default:return Object.keys(o).map(function(t){return t+"="+encodeURIComponent(e.params[t])}).join("&")}}return null},e.prototype.getMethod=function(){return(this.endpoint.method||"GET").toUpperCase()},e.prototype.isWithCredentials=function(){return!0===this.endpoint.credentials},e.prototype.build=function(){return{host:this.host,method:this.getMethod(),path:this.getPath(),query:this.getQuery(),body:this.getBody(),headers:this.getHeaders(),credentials:this.isWithCredentials()}},e}();t.default=d},function(e,t){e.exports={"accounts.register":{method:"POST",path:"/api/users/register",body:["email","password","privateKey","publicKey","referrer"],anonymous:!0},"accounts.login":{method:"POST",path:"/api/users/login",body:["email","password","totp"],anonymous:!0},"accounts.generate-activation-code":{method:"GET",path:"/api/users/auth/generate",chain:["userId"],trailing:!0},"accounts.activate":{method:"POST",path:"/api/users/auth/activate",body:["userId","authCode"],trailing:!0},"accounts.forgot-password":{method:"POST",path:"/api/users/resetpasswordrequest",body:["email"],anonymous:!0},"accounts.set-password-request":{method:"POST",path:"/api/users/setpasswordrequest",body:["email"],anonymous:!0},"accounts.reset-password":{method:"POST",path:"/api/users/resetpassword",body:["email","secret","newPassword","newPrivateKey","newPublicKey"],anonymous:!0},"accounts.set-password":{method:"POST",path:"/api/users/setpassword",body:["email","secret","newPassword","newPrivateKey","newPublicKey"],anonymous:!0},"accounts.logout":{method:"GET",path:"/api/users/logout"},"profile.upload-avatar":{method:"POST",path:"/api/media/file/avatar",body:["uploadedImage"]},"profile.delete-avatar":{method:"POST",path:"/api/media/file/avatar/delete"},"profile.change-password":{method:"POST",path:"/api/users/changepassword",body:["oldPassword","newPassword","newPrivateKey"],trailing:!0},"profile.status":{method:"GET",path:"/api/users/status"},"profile.set-status":{version:2,method:"POST",path:"/api/users/status/set",body:["emoji","message","away"]},"profile.clear-status":{method:"POST",path:"/api/users/status/clear"},"preferences.all":{method:"GET",path:"/api/users/preferences/all"},"preferences.get":{method:"GET",path:"/api/users/preferences/get",query:["preferences"]},"preferences.update":{version:2,method:"POST",path:"/api/users/preferences/update",body:!0},"preferences.reset":{version:2,method:"POST",path:"/api/users/preferences/reset",body:["preferences"]},"dashboard.inbox":{method:"GET",path:"/api/proofs/dashboard/proofin",trailing:!0},"dashboard.sent":{method:"GET",path:"/api/proofs/dashboard/proofout",trailing:!0},"dashboard.outbox":{method:"GET",path:"/api/proofs/dashboard/proofoutbox",trailing:!0},"dashboard.briefs":{method:"GET",path:"/api/briefs/dashboard",trailing:!0},"dashboard.search":{method:"POST",path:"/api/proofs/search",body:["query","all","filterBy"]},"dashboard.groups.filter-by":{method:"GET",path:"/api/proofs/dashboard/groups",chain:["filterBy"],trailing:!0},"team.dashboard.inbox":{method:"GET",path:"/api/admin/dashboard/proofin",chain:["page"],trailing:!0},"team.dashboard.sent":{method:"GET",path:"/api/admin/dashboard/proofsent",chain:["page"],trailing:!0},"team.dashboard.outbox":{method:"GET",path:"/api/admin/dashboard/proofout",chain:["page"],trailing:!0},"team.dashboard.search":{method:"POST",path:"/api/admin/search",body:["query","all","filterBy","page"]},"admin.team.dashboard.groups.category":{method:"GET",path:"/api/admin/dashboard/groups",chain:["category"]},"admin.team.proofs.groups.load":{method:"GET",path:"/api/admin/group",chain:["groupId"]},"users.by-id":{method:"GET",path:"/api/users",chain:["userId"]},"users.by-email":{method:"POST",path:"/api/users/email",body:["email"],trailing:!0},"users.invite":{method:"POST",path:"/api/users/create",body:["email"]},"proofs.create":{version:2,method:"POST",path:"/api/v2/proofs/create",body:"proof"},"proofs.normalize-workflow":{method:"POST",path:"/api/proofs/permission/check",body:["proofId","workflowId"]},"proofs.get-workflow-metrics":{method:"GET",path:"/api/workflows/metrics",query:["proofId"]},"proofs.set-workflow":{method:"POST",path:"/api/proofs/update",body:["proofId","workflowId"]},"proofs.set-tags":{method:"POST",path:"/api/tags/create",body:["relatedId","tag"]},"proofs.set-file":{method:"POST",path:"/api/proofs/update",body:["proofId","fileId"]},"proofs.distribute-file":{method:"GET",path:"/api/proofs/distribute",chain:["proofId"],trailing:!0},"proofs.archive":{version:2,method:"POST",path:"/api/proofs/close",body:["proofIds"]},"proofs.unarchive":{method:"GET",path:"/api/proofs/reopen",chain:["proofId"],trailing:!0},"proofs.delete":{method:"GET",path:"/api/proofs/delete",chain:["proofId"],trailing:!0},"proofs.start":{method:"POST",path:"/api/proofs/startworkflow",body:["proofId"],trailing:!0},"proofs.manual-approval":{method:"POST",path:"/api/proofs/manualapproval",body:["proofId","message"],trailing:!0},"proofs.withdraw-approval":{method:"POST",path:"/api/proofs/revertapproval",body:["proofId","messageToSender"],trailing:!0},"proofs.editors.add":{version:2,method:"POST",path:"/api/proofs/editor/add",body:["proofId","editors","editorMessage"]},"proofs.editors.add-bulk":{version:2,method:"POST",path:"/api/proofs/editor/add/bulk",body:["proofsWithEditors"]},"proofs.bulk-update":{version:2,method:"POST",path:"/api/proofs/update/bulk",body:["proofs"]},"proofs.editors.remove":{version:2,method:"POST",path:"/api/proofs/editor/remove",body:["proofId","editors"]},"proofs.editors.replace":{version:2,method:"POST",path:"/api/proofs/editor/replace",body:["proofId","oldEditors","newEditors"]},"proofs.editors.set":{version:2,method:"POST",path:"/api/proofs/editor/set",body:["proofId","editors"]},"briefs.start":{method:"POST",path:"/api/briefs/start",body:["briefId"]},"proofs.return":{version:2,method:"POST",path:"/api/v2/proofs/return",body:["proofIds"]},"proofs.groups.create":{method:"POST",path:"/api/proofs/groups/create",body:["name","ownedByTeam"]},"proofs.groups.update":{version:2,method:"POST",path:"/api/proofs/groups/update",body:["groupId","name","ownedByTeam","folderName"]},"proofs.groups.delete":{method:"POST",path:"/api/groups/delete",body:["groupId"]},"proofs.groups.load":{method:"GET",path:"/api/proofs/group",chain:["groupId"]},"proofs.groups.ready":{method:"POST",path:"/api/proofs/groups/ready",body:["groupId"]},"proofs.groups.archive":{version:2,method:"POST",path:"/api/groups/archive",body:["groupIds","archiveProofs"]},"proofs.groups.reopen":{version:2,method:"POST",path:"/api/groups/reopen",body:["groupIds"]},"proofs.groups.remove-proof":{method:"POST",path:"/api/groups/proof/remove",body:["proofId"]},"proofs.groups.add-proof":{method:"POST",path:"/api/groups/proof/add",body:["proofId","groupId"]},"proofs.groups.owners.add":{version:2,method:"POST",path:"/api/v2/proofs/owners/groups/add",body:["groupId","owners"]},"proofs.groups.workflows.add-reviewers":{version:2,method:"POST",path:"/api/v2/workflows/groups/reviewers/add",body:["groupId","reviewers"]},"proofs.groups.replace-approver":{version:2,method:"POST",path:"/api/groups/approver/replace",body:["groupId","user"]},"proofs.versions.attach":{method:"POST",path:"/api/proofs/versions/create",body:["proofId","versionId"]},"proofs.versions.list":{method:"GET",path:"/api/proofs/versions",chain:["proofId"],trailing:!0},"proofs.load":{method:"GET",path:"/api/proofs/",chain:["proofId"],trailing:!0},"proofs.next":{method:"POST",path:"/api/proofs/next",body:["proofId"]},"proofs.request-access":{method:"GET",path:"/api/proofs/requestaccess",chain:["proofId"]},"proofs.lock":{method:"GET",path:"/api/proofs/lock/",chain:["proofId"],trailing:!0},"proofs.unlock":{method:"GET",path:"/api/proofs/unlock/",chain:["proofId"],trailing:!0},"proofs.request-unlock":{method:"GET",path:"/api/proofs/unlockemail/",chain:["proofId"],trailing:!0},"proofs.images":{method:"GET",path:"/api/proofs/graph/thumbnails/",chain:["proofId"]},"proofs.video-credentials":{method:"GET",path:"/api/proofs/assets/video-credentials/",chain:["proofId"]},"proofs.finish":{method:"POST",path:"/api/proofs/finished",body:["proofId","decision"]},"proofs.update-decision":{method:"POST",path:"/api/proofs/update/decision",body:["proofId","decision"]},"proofs.decisions.load":{method:"GET",path:"/api/decisions/proofs",chain:["proofId"]},"proofs.decisions.get-options":{method:"GET",path:"/api/decisions/proofs",chain:["proofId","type"]},"proofs.decisions.leave-decision":{version:2,method:"POST",path:"/api/decisions/proofs",body:["decisionId"],chain:["proofId"]},"proofs.assets.extracted-text":{version:2,method:"GET",path:"/api/proofs/assets/extracted-text",chain:["proofId"]},"proofs.assets.color-separations":{version:2,method:"GET",path:"/api/proofs/assets/color-separations",chain:["proofId"]},"files.legacy.generate-token":{method:"GET",path:"/api/media/getfiletoken",query:["relatedId","fileType"]},"files.legacy.upload-block":{method:"POST",path:"/api/media/file",query:["block","part","token"],body:"data"},"files.legacy.upload-complete":{method:"POST",path:"/api/media/file",query:["block","blockCount","part","token","extn","pages","filename","storeoriginal","adobeExportData"],body:"envelope"},"files.details":{method:"GET",path:"/api/media/file/details",chain:["fileId"]},"files.download-block":{method:"GET",path:"/api/media/getfilechunk",chain:["proofId","fileId","block"],query:["s"]},"files.thumbnail":{method:"GET",path:"/api/media/getimage/thumb",chain:["fileId"]},"files.preview":{method:"GET",path:"/api/media/getimage",chain:["fileId","quality","pageNumber"],trailing:!0},"files.import.generic":{method:"POST",path:"/api/media/filedropbox",body:["extn","filename","url","envelope","storeOriginal"]},"files.import.drive":{method:"POST",path:"/api/media/filedrive",body:["extn","filename","url","envelope","storeOriginal","accessToken"]},"files.import.onedrive":{method:"POST",path:"/api/media/fileonedrive",body:["extn","filename","url","envelope","storeOriginal","accessToken"]},"files.import.box":{method:"POST",path:"/api/media/filebox",body:["extn","filename","url","envelope","storeOriginal","accessToken"]},"files.import.dropbox":{method:"POST",path:"/api/media/filedropbox",body:["extn","filename","url","envelope","storeOriginal","accessToken"]},"files.import.canva":{method:"POST",path:"/api/media/filecanva",body:["extn","filename","url","envelope","storeOriginal","accessToken"]},"files.v2.generate-credentials":{version:2,method:"POST",path:"/api/media/file/upload",body:["files","supports"]},"files.v2.upload-complete":{version:2,method:"POST",path:"/api/media/file/queue",body:["files"]},"files.can-download.update":{method:"POST",path:"/api/media/downloadoption",body:["fileId","downloadOriginal"]},"files.import.web.validate":{method:"POST",path:"/api/media/import/url/validate",body:["url"]},"files.import.web":{method:"POST",path:"/api/media/import/url",body:["url","envelope"]},"files.create-email":{version:2,method:"POST",path:"/api/email-upload/files/create"},"files.duplicate":{version:2,method:"POST",path:"/api/files/v2/duplicate",body:["id"]},"workflows.create":{version:2,method:"POST",path:"/api/v2/workflows/create",body:["title","ownedByTeam"]},"workflows.favorite":{method:"POST",path:"/api/workflows/favorite",body:["workflowId"]},"workflows.unfavorite":{method:"POST",path:"/api/workflows/unfavorite",body:["workflowId"]},"workflows.update":{method:"POST",path:"/api/workflows/update",body:["workflowId","title","ownedByTeam"]},"workflows.load":{version:2,method:"GET",path:"/api/v2/workflows/detail",chain:["workflowId"]},"workflows.nudge-message":{method:"GET",path:"/api/workflows/nudgemessage",query:["workflowId","userId"]},"workflows.steps.add":{version:2,method:"POST",path:"/api/v2/workflows/steps/add",body:["workflowId","title","position","dueDate","mandatoryDecisionThreshold"]},"workflows.steps.update":{version:2,method:"POST",path:"/api/v2/workflows/steps/update",body:["stepId","title","dueDate","mandatoryDecisionThreshold"]},"workflows.steps.move-before":{method:"POST",path:"/api/workflows/step/movebefore",body:["stepId","beforeStepId"]},"workflows.steps.move-after":{method:"POST",path:"/api/workflows/step/moveafter",body:["stepId","afterStepId"]},"workflows.steps.swap":{method:"POST",path:"/api/workflows/step/swap",body:["stepId","swapStepId"]},"workflows.users.set":{version:2,method:"POST",path:"/api/v2/workflows/users/set",body:["workflowId","stepId","position","users"]},"workflows.users.update":{version:2,method:"POST",path:"/api/v2/workflows/users/update",body:["workflowId","stepId","userId","role","permissions"]},"workflows.users.add":{version:2,method:"POST",path:"/api/v2/workflows/users/add",body:["workflowId","stepId","users"]},"workflows.users.skip-all":{method:"POST",path:"/api/workflows/skipall",body:["workflowId"]},"workflows.user.nudge":{version:2,method:"POST",path:"/api/workflows/user/nudge",body:["workflowId","userId","message"]},"workflows.nudge-all":{version:2,method:"POST",path:"/api/v2/workflows/nudgeall",body:["workflowIds","message"]},"workflows.delete":{method:"POST",path:"/api/workflows/delete",body:["workflowId"]},"workflows.duplicate":{method:"POST",path:"/api/workflows/duplicateonly",body:["workflowId","noOwners","includeOwnedByTeam","excludeStepDueDates","includeSharedUsers"]},"workflows.set-starting-step":{method:"POST",path:"/api/workflows/startfrom",body:["workflowId","stepId"]},"workflows.owned":{method:"GET",path:"/api/workflows",trailing:!0},"workflows.shared":{method:"GET",path:"/api/workflows/share/user",trailing:!0},"workflows.owned.email-list":{method:"GET",path:"/api/workflows/emaillist",trailing:!0},"workflows.shared.email-list":{method:"GET",path:"/api/workflows/share/emaillist",trailing:!0},"workflows.replace-approver":{version:2,method:"POST",path:"/api/v2/workflows/approver/replace/bulk",body:["workflowIds","user"]},"workflows.proof-owners.add":{version:2,method:"POST",path:"/api/workflows/permission/add",body:!0},"comments.load-all":{method:"POST",path:"/api/proofs/recent",body:["proofId","timestamp"]},"comments.load-page":{method:"POST",path:"/api/proofs/comment/recent",body:["proofId","timestamp","page"]},"comments.state.update":{method:"POST",path:"/api/proofs/comment/updatestatus",body:["commentId","change","done"]},"comments.state.multiple-update":{version:2,method:"POST",path:"/api/comments/update/status/batch",body:["proofId","commentIds","change","done"]},"comments.create":{version:2,method:"POST",path:"/api/proofs/comment/create",body:["proofId","page","envelope","encryptedComment","xy","parent","mentions","metadata","sourceMetadata","creationToken","change","done","boxFillImage","boxFillType","autoState","private"]},"comments.delete":{method:"POST",path:"/api/proofs/comment/delete",body:["commentId"]},"comments.import.create-task":{version:2,method:"POST",path:"/api/proofs/comments/import/tasks",body:"options"},"comments.import.action-task":{version:2,method:"POST",path:"/api/proofs/comments/import/tasks",chain:["id","action"],body:"options"},"comments.import.get-task":{method:"GET",path:"/api/proofs/comments/import/tasks",chain:["id"]},"comments.load-context":{method:"GET",path:"/api/comments/context",chain:["commentId"]},"proofs-owners.add":{version:2,method:"POST",path:"/api/v2/proofs/owners/add",body:["proofIds","users"]},"proofs-reviewers.add":{version:2,method:"POST",path:"/api/proofs/reviewers/add",body:["proofIds","reviewers"]},"proofs-workflow.add-bulk":{version:2,method:"POST",path:"/api/proofs/workflow/add/bulk",body:["proofIds","workflowTemplateId"]},"proofs-owners.remove":{version:2,method:"POST",path:"/api/v2/proofs/owners/remove",body:["proofId","users"]},"proofs.tag-delete":{method:"POST",path:"/api/tags/delete",body:["relatedId","tag"]},"proofs.return-todos":{version:2,method:"POST",path:"/api/proofs/returntodos",body:["proofIds","messageToOwners","markCommentAsTodo"]},"proofs.set-message-to-reviewers":{version:2,method:"POST",path:"/api/proofs/messagetoreviewers/update/bulk",body:["proofIds","messageToReviewers"]},"proofs.remove-editor":{method:"GET",path:"/api/proofs/deleteeditor",chain:["proofId"],trailing:!0},"proofs.update":{version:2,method:"POST",path:"/api/v2/proofs/update",body:"proof"},"briefs.create":{method:"POST",path:"/api/briefs/create",body:["title","messageToRecipient","dueDate","tag","isPublic"]},"briefs.update":{method:"POST",path:"/api/briefs/update",body:["briefId","title","messageToRecipient","dueDate","tag","recipient","editorId","editorMessage","isPublic"]},"admin.team.users.enabled":{method:"GET",path:"/api/admin/getusers/active",trailing:!0},"admin.team.users.disabled":{method:"GET",path:"/api/admin/getusers/inactive",trailing:!0},"admin.team.users.set-enabled":{method:"POST",path:"/api/admin/setenabled",body:["email","enabled"]},"admin.team.users.invite":{version:2,method:"POST",path:"/api/admin/member/invite",body:["emails"]},"admin.team.users.remove-from-team":{version:2,method:"POST",path:"/api/admin/member/remove",body:["users"]},"admin.team.users.upload-avatar":{method:"POST",path:"/api/admin/member/avatar",body:["userId","uploadedImage"]},"admin.team.users.delete-avatar":{method:"POST",path:"/api/admin/member/avatar/delete",body:["userId"]},"admin.team.users.invitations":{method:"GET",path:"/api/admin/team/users/invitations"},"admin.team.users.revoke-invitation":{version:2,method:"POST",path:"/api/admin/team/users/revoke-invitation",body:["email","invitationId"]},"admin.team.features.load":{method:"GET",path:"/api/admin/settings",trailing:!0},"admin.team.features.update":{version:2,method:"POST",path:"/api/admin/settings",body:["displayComments","generalComments","privateComments","enableWebhooks","editComments","ownerCanDeleteComments","proofReference","proofReferenceRequired","displayTeamName","emailTitleTextColor","emailLinkTextColor","emailButtonBackgroundColor","emailButtonTextColor","disableReplyingToCommentsInStatuses","publicProofs","defaultProofIsPublic","messageToOwners","allowedDecisions","enableChecklists","suggestionsIncludeTeamMembers","enableUserGroups","enableCommentVisibility","defaultCommentVisibility","usePreviousVersionDueDate","enableViewOnlyReviewers","enableIntelligence","enableIntelligenceSmartTags","enableProofMagicAccess","enableIntelligenceSmartCheckCr","defaultGifOutput"]},"admin.team.features.sender-email.set":{version:2,method:"POST",path:"/api/admin/sender-email/set",body:["senderEmail"]},"integrations.get-setup-url":{method:"GET",path:"/api/integrations/setup_url",query:"params"},"integrations.get-proof-setup":{method:"GET",path:"/api/integrations/proof_setup",query:["integration_key","id"]},"integrations.get-configurations":{method:"GET",path:"/api/integrations/configuration",query:["level","integration_keys"]},"integrations.disable":{method:"POST",path:"/api/integrations/disable",query:["level","integration_key"]},"integrations.update-configuration":{version:2,method:"POST",path:"/api/integrations/configuration/update",body:["level","integrationKey","key","value"]},"integrations.get-available-reference-integrations":{method:"GET",path:"/api/integrations/reference/available_integrations"},"integrations.get-available-reference-options":{method:"GET",path:"/api/integrations/reference/options",query:"params"},"integrations.load-reference-additional-information":{method:"GET",path:"/api/integrations/reference/additional_information",query:"params"},"integrations.proof-integration-references.add":{version:2,method:"POST",path:"/api/integrations/reference/proof_integration_references",body:["proofId","integrationReference"]},"integrations.proof-integration-references.remove":{version:2,method:"POST",path:"/api/integrations/reference/proof_integration_references/remove",body:["proofId","referenceId"]},"admin.team.preferences.notifications.load":{method:"GET",path:"/api/admin/preferences/notifications",trailing:!0},"admin.team.preferences.notifications.set":{method:"POST",path:"/api/admin/preferences/notifications/set",body:["ownerAddedByAdmin"]},"admin.team.workflows.owned":{method:"GET",path:"/api/admin/workflows/templates"},"admin.team.workflows.owned.email-list":{method:"GET",path:"/api/admin/workflows/templates/emaillist"},"admin.team.custom-tools.load":{method:"GET",path:"/api/custom-tools/admin/team"},"admin.team.custom-tools.update":{version:2,method:"PATCH",path:"/api/custom-tools/admin/team",body:"updates"},"sessions.check":{method:"GET",path:"/api/sessions/check"},"sso.get-public-key":{method:"GET",path:"/sso/public_key",anonymous:!0},"sso.get-session":{version:2,method:"POST",path:"/sso/session",body:["nonce"],anonymous:!0,credentials:!0},"sso.get-login-options":{version:2,method:"POST",path:"/sso/login_options",body:["email"],anonymous:!0},"sso.initiate-login":{version:2,method:"POST",path:"/sso/initiate_login",body:["email"],anonymous:!0},"mfa.setup":{method:"POST",path:"/api/users/mfa/setup"},"mfa.enable":{method:"POST",path:"/api/users/mfa/enable",body:["totp"]},"mfa.remove":{method:"POST",path:"/api/users/mfa/remove",body:["password"]},"reminders.add":{version:2,method:"POST",path:"/api/reminders/add",body:["entityId","reminders"]},"reminders.update":{version:2,method:"POST",path:"/api/reminders/update",body:["reminderId","relativeDate"]},"reminders.delete":{version:2,method:"POST",path:"/api/reminders/delete",body:["reminderIds"]},"reminders.all":{version:2,method:"GET",path:"/api/reminders/list",chain:["entityId"]},"reminders.set":{version:2,method:"POST",path:"/api/reminders/list",chain:["entityId","reminders"]},"proofs.audit.summary":{version:2,method:"GET",path:"/api/proofs/audit/summary",chain:["proofId"]},"brian.rekey-users-proofs":{version:2,method:"GET",path:"/api/brian/rekey/proofs",chain:["userId"]},"live.generate-access-token":{version:2,method:"GET",path:"/api/users/live/token"},"reports.create":{version:2,method:"POST",path:"/api/reports",body:!0},"reports.configurations":{version:2,method:"GET",path:"/api/reports/configurations"},"printing.create":{version:2,method:"POST",body:!0,path:"/api/print"},"printing.options":{version:2,method:"GET",query:["proofId"],path:"/api/print/options"},"teams.invitations.info":{version:2,method:"GET",path:"/api/teams/invitations/info",chain:["invitationId"]},"teams.invitations.accept":{version:2,method:"POST",path:"/api/teams/invitations/accept",chain:["invitationId"]},"teams.invitations.decline":{version:2,method:"POST",path:"/api/teams/invitations/decline",chain:["invitationId"]},"scim.admin.settings":{method:"GET",path:"/api/scim/admin/settings"},"scim.admin.enable":{method:"POST",path:"/api/scim/admin/enable"},"scim.admin.disable":{method:"POST",path:"/api/scim/admin/disable"},"scim.admin.regenerate-access-token":{version:2,method:"POST",path:"/api/scim/admin/regenerate-access-token",body:["type"]},"proofs.custom-tools.load":{method:"GET",path:"/api/custom-tools/proof",chain:["proofId"]},"proofs.custom-tools.update":{version:2,method:"PATCH",path:"/api/custom-tools/proof",chain:["proofId"],body:"updates"},"proofs.custom-tools.validate":{version:2,method:"POST",path:"/api/custom-tools/validate",body:"schema"},"email.proofs.generate":{version:2,method:"POST",path:"/api/email-upload/email-address",body:!0},"proofs.link-check.results":{version:2,method:"GET",chain:["proofId"],path:"/api/link-check/results"},"proofs.link-check.recheck":{version:2,method:"POST",body:["proofId"],path:"/api/link-check/recheck"},"free-trial.request-team":{version:2,method:"POST",path:"/api/free-trial/request/team",body:!0},"proofs.send-share-link":{version:2,method:"POST",path:"/api/public-proofs/proof/send-share-link",body:["proofId","message","emailAddresses"]},graphql:{version:2,method:"POST",path:"/spider/graphql",body:!0}}},function(e,t,n){"use strict";t.__esModule=!0;var r=Object.prototype.toString;t.default=function(e){return r.call(e)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(6),a=r(i),s=n(61),u=n(3),c=n(7),l=r(c),f=n(24),p=function(){function e(){o(this,e),this.error=!1,this.code=-1,this.data=null,this.message=null,this.deprecated=null}return e.parse=function(t){var n=t.status,r=t.headers,o=void 0===r?{}:r,i=t.body,c=new e;if(n===s.TOO_MANY_REQUESTS_STATUS)return c.error=!0,c.message="Too many requests. Unable to process request due to high volume of requests from your application.",c.code=a.default.ERROR_THROTTLED,c.data={timeout:1e3*(parseFloat(o[u.RETRY_AFTER_HEADER])||60)},c;if((0,l.default)(o,"deprecated")&&(c.deprecated=o.deprecated),n===s.OK_STATUS&&!i)return c.code=a.default.OK,c;try{var p=JSON.parse(i);if("string"==typeof p||(p&&"ResponseCode"in p?(c.code=p.ResponseCode,c.code!==a.default.OK&&(c.error=!0)):p.Message&&1===Object.keys(p).length?(c.error=!0,c.code=a.default.ERROR_CRITICAL):"boolean"==typeof p.success&&p.message&&(c.error=!1===p.success,c.code=n,c.message=p.message)),c.error){var d="Response returned with the response code: "+c.code+". Please check SDK error documentation for details.",h=(0,f.getErrorMessage)(c.code,d);c.message=c.message||h}c.data=p}catch(e){c.error=!0}return c},e}();t.default=p},function(e,t,n){"use strict";t.__esModule=!0;t.TOO_MANY_REQUESTS_STATUS=429,t.OK_STATUS=200},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(8),l=r(c),f=n(63),p=r(f),d=n(64),h=r(d),m=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.sso=new p.default(n),r.mfa=new h.default(n),r}return a(t,e),t.prototype._generateCredentials=function(e){var t=this;return this.client.crypto().generatePasswordHash(e).then(function(e){return Promise.all([e,t.client.crypto().generateKeyPair()])}).then(function(n){var r=n[0],o=n[1];return Promise.all([r,o,t.client.crypto().encryptPrivateKey(o.privateKeyPEM,e)])})},t.prototype.register=function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return"string"==typeof r&&(console.warn("Warning: Passing the user's activation code during account creation has been moved into an options object. For compatibility reasons, the legacy behaviour still functions as expected, but please update your code as this will be changed in a future version."),r={activationCode:r}),this._generateCredentials(t).then(function(t){var o=t[0],i=t[1],a=t[2];return Promise.all([i,n.client.request("accounts.register",{email:e,password:o,privateKey:a,publicKey:i.publicKeyPEM,referrer:r.referrer})])}).then(function(r){var o=r[0];return Promise.all([o,n.login(e,t,void 0,!1)])}).then(function(e){var t=e[0],o=e[1];return Promise.all([t,o,r.activationCode?n.activate(r.activationCode).catch(function(){return n.generateActivationCode()}):n.generateActivationCode()])}).then(function(e){var t=e[0],n=e[1];return n.privateKeyPEM=t.privateKeyPEM,n})},t.prototype.generateActivationCode=function(){return this.client.request("accounts.generate-activation-code",{userId:this.client.session.userId})},t.prototype.activate=function(e){var t=this;return this.client.request("accounts.activate",{userId:this.client.session.userId,authCode:e}).then(function(){t.client.session.user.hasActivated=!0})},t.prototype.login=function(e,t,n){var r=this,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return this.client.crypto().generatePasswordHash(t).then(function(t){return r.client.request("accounts.login",{email:e,password:t,totp:n})}).then(function(t){var n=(new l.default).fromSession(t.data);return n.user.email=e,n}).then(function(e){return o?r.client.crypto().decryptPrivateKey(e.privateKeyPEM$,t).then(function(t){return e.privateKeyPEM=t,e}):e}).then(function(e){return r.client.setSession(e),e})},t.prototype.resetPassword=function(e){var t=this,n=e.email,r=e.code,o=e.password;return this._generateCredentials(o).then(function(e){var o=e[0],i=e[1],a=e[2];return Promise.all([i,t.client.request("accounts.reset-password",{email:n,secret:r,newPassword:o,newPrivateKey:a,newPublicKey:i.publicKeyPEM})])}).then(function(e){var r=e[0];return Promise.all([r,t.login(n,o,void 0,!1)])}).then(function(e){var t=e[0],n=e[1];return n.privateKeyPEM=t.privateKeyPEM,n})},t.prototype.forgotPassword=function(e){return this.client.request("accounts.forgot-password",{email:e})},t.prototype.setPasswordRequest=function(e){return this.client.request("accounts.set-password-request",{email:e})},t.prototype.setPassword=function(e){var t=this,n=e.email,r=e.code,o=e.password;return this._generateCredentials(o).then(function(e){var o=e[0],i=e[1],a=e[2];return Promise.all([i,t.client.request("accounts.set-password",{email:n,secret:r,newPassword:o,newPrivateKey:a,newPublicKey:i.publicKeyPEM})])}).then(function(e){var r=e[0];return Promise.all([r,t.login(n,o,void 0,!1)])}).then(function(e){var t=e[0],n=e[1];return n.privateKeyPEM=t.privateKeyPEM,n})},t.prototype.logout=function(){var e=this;return this.client.request("accounts.logout").catch(function(t){return e.client.setSession(null),Promise.reject(t)}).then(function(){e.client.setSession(null)})},t}(u.default);t.default=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(8),l=r(c),f=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.getSession=function(){var e=this;return this.client.request("sso.get-public-key").then(function(e){return e.data.ServerPublicKey}).then(function(t){return e.client.crypto().generateWrappedSymmetricKey(t)}).then(function(t){var n=t.key,r=t.key$;return Promise.all([n,e.client.request("sso.get-session",{nonce:r})])}).then(function(t){var n=t[0],r=t[1],o=(new l.default).fromSession(r.data);return Promise.all([o,e.client.crypto().decryptManagedPrivateKey(o.privateKeyPEM$,n)])}).then(function(e){var t=e[0],n=e[1];return t.privateKeyPEM=n,t})},t.prototype.getLoginOptions=function(e){return this.client.request("sso.get-login-options",{email:e}).then(function(e){return e.data})},t.prototype.initiateLogin=function(e){return this.client.request("sso.initiate-login",{email:e}).then(function(e){return e.data})},t}(u.default);t.default=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.setup=function(){return this.client.request("mfa.setup").then(function(e){return{secret:e.data.SetupSecret,qrCodeImage:e.data.SetupQrCode}})},t.prototype.enable=function(e){return this.client.request("mfa.enable",{totp:e})},t.prototype.remove=function(e){var t=this;return this.client.crypto().generatePasswordHash(e).then(function(e){return t.client.request("mfa.remove",{password:e})})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t={};return Object.keys(v).forEach(function(n){t[n]=e[v[n]]}),t}function u(e){return(e||[]).map(function(e){return(new p.default).fromProof(e)})}t.__esModule=!0;var c=n(0),l=r(c),f=n(5),p=r(f),d=n(9),h=r(d),m=n(70),y=r(m),v={inbox:"ProofIn",sent:"ProofOut",outbox:"ProofOutBox",briefs:"AllBriefs"},_=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.groups=new y.default(n),r}return a(t,e),t.prototype.inbox=function(){return this._loadSingleTabProofs("inbox")},t.prototype.sent=function(){return this._loadSingleTabProofs("sent")},t.prototype.outbox=function(){return this._loadSingleTabProofs("outbox")},t.prototype.briefs=function(){return this._loadSingleTabProofs("briefs")},t.prototype._loadSingleTabProofs=function(e){return this.client.request("dashboard."+e).then(function(e){return s(e.data)}).then(function(t){return t[e]}).then(u)},t.prototype.search=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.status,r=t.everything;return this._loadSearchProofs({query:e,filterBy:void 0===n?void 0:[].concat(n).join(","),all:r?1:0})},t.prototype.everything=function(){return this.search(void 0,{everything:!0})},t.prototype.approved=function(){return this.search(void 0,{status:h.default.APPROVED})},t.prototype.archived=function(){return this.search(void 0,{status:h.default.ARCHIVED})},t.prototype._loadSearchProofs=function(e){return this.client.request("dashboard.search",e).then(function(e){return u(e.data.Proofs)})},t}(l.default);t.default=_},function(e,t,n){"use strict";function r(e,t,n){return(1-(t+n))*e+t}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={count:(0,o.number)("Count"),decision:(0,o.number)("Decision"),users:(0,o.each)("Users",function(e){return{id:e.UserId,name:e.Name,email:e.Email,nudgedDate:(0,o.date)("NudgedInStep")(e)}})},s=function(){function e(){r(this,e)}return e.prototype.fromDecisionSummary=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={referenceId:"ReferenceId",referenceUrl:"ReferenceUrl",referenceType:"ReferenceType",referenceLabel:"ReferenceLabel",metadata:"Metadata"},s=function(){function e(){r(this,e)}return e.prototype.fromProofIntegrationReference=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={id:"Id",templateId:"TemplateId",name:"Name",description:"Description",isRequiredForFinalApproval:"IsRequiredForFinalApproval",shouldOpenOnProofLoad:"ShouldOpenOnProofLoad"},s=function(){function e(){r(this,e)}return e.prototype.fromProofChecklist=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return(e||[]).map(function(e){return(new f.default).fromProofGroup(e)})}t.__esModule=!0;var u=n(0),c=r(u),l=n(11),f=r(l),p=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype._loadGroups=function(e){return this.client.request("dashboard.groups.filter-by",{filterBy:e}).then(function(e){return s(e.data)})},t.prototype.current=function(){return this._loadGroups("current")},t.prototype.archived=function(){return this._loadGroups("archived")},t}(c.default);t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return e.data.length>0?(new p.default).fromUser(e.data[0]):(new p.default).fromUser(e.data)}function u(e){return e.data.length?(new p.default).fromUser(e.data[0]):null}t.__esModule=!0;var c=n(0),l=r(c),f=n(4),p=r(f),d=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.byEmail=function(e){return this.client.request("users.by-email",{email:e}).then(u)},t.prototype.byId=function(e){return this.client.request("users.by-id",{userId:e}).then(s)},t.prototype.invite=function(e){return this.client.request("users.invite",{email:e}).then(s)},t}(l.default);t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t=[].concat(e);return t.forEach(function(e){e.proofId=e.id,delete e.id}),t}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=n(0),l=r(c),f=n(73),p=r(f),d=n(74),h=r(d),m=n(75),y=r(m),v=n(76),_=r(v),b=n(77),w=r(b),g=n(80),E=r(g),O=n(81),P=r(O),T=n(90),k=r(T),I=n(91),S=r(I),C=n(92),R=r(C),A=n(93),D=r(A),M=n(5),x=r(M),j=n(94),F=r(j),q=n(12),N=r(q),B=n(3),U=n(2),L=r(U),G=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.owners=new p.default(n),r.editors=new h.default(n),r.reviewers=new y.default(n),r.versions=new _.default(n),r.groups=new w.default(n),r.reminders=new F.default(n),r.audit=new E.default(n),r.assets=new P.default(n),r.customTools=new k.default(n),r.integrationReferences=new S.default(n),r.linkCheck=new R.default(n),r.decisions=new D.default(n),r}return a(t,e),t.prototype.setWorkflow=function(e,t){var n=this;return this.client.request("proofs.normalize-workflow",{proofId:e,workflowId:t}).then(function(){return n.client.request("proofs.set-workflow",{proofId:e,workflowId:t})})},t.prototype.setTags=function(e,t){return this.client.request("proofs.set-tags",{relatedId:e,tag:t.join(",")})},t.prototype.deleteTag=function(e,t){return this.client.request("proofs.tag-delete",{relatedId:e,tag:t})},t.prototype.setFile=function(e,t){var n=this;return this.client.request("proofs.set-file",{proofId:e,fileId:t}).then(function(){return n.client.request("proofs.distribute-file",{proofId:e})})},t.prototype.create=function(e){var t=this,n=e.name,r=e.tags,o=void 0===r?[]:r,i=e.dueDate,a=void 0===i?new Date(Date.now()+3*B.DAY_IN_MS):i,s=e.messageToReviewers,u=e.workflow,c=e.workflowTemplate,l=e.proofTemplate,f=e.checklist,p=e.file,d=e.group,h=e.previousProof,m=e.team,y=e.reference,v=e.customTools,_=e.integrationReferences,b=e.reminders,w=void 0===b?[]:b,g=e.owners,E=e.canDownload,O=e.isPublic,P=e.start,T=void 0===P||P,k=e.commentVisibility,I=void 0===k?null:k;return this.client.request("proofs.create",{proof:{name:n,tags:o,dueDate:a.toISOString?a.toISOString():String(a),messageToReviewers:s,workflowId:u&&u.id||void 0,workflowTemplateId:c&&c.id||void 0,proofTemplateId:l&&l.id||void 0,checklist:f,fileId:p&&p.id||void 0,groupId:d&&d.id||void 0,previousProofId:h&&h.id||void 0,teamSlug:m&&m.slug||void 0,reference:y,integrationReferences:_,reminders:[].concat(w),owners:g,canDownload:E,isPublic:O,start:T,commentVisibility:I}}).then(function(e){var n=(new x.default).fromProof(e.data);return n.calculateState(),v&&!h?t.customTools.update(n.id,v).then(function(){return n}):n})},t.prototype.archive=function(e){return this.client.request("proofs.archive",{proofIds:e})},t.prototype.unarchive=function(e){return this.client.request("proofs.unarchive",{proofId:e})},t.prototype.delete=function(e){return this.client.request("proofs.delete",{proofId:e})},t.prototype.finish=function(e,t){return this.client.request("proofs.finish",{proofId:e,decision:t})},t.prototype.approve=function(e,t){return this.client.request("proofs.manual-approval",{proofId:e,message:t})},t.prototype.withdrawApproval=function(e,t){return this.client.request("proofs.withdraw-approval",{proofId:e,messageToSender:t})},t.prototype.generateEmail=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.client.request("email.proofs.generate",u({proofId:e},t)).then(function(e){return e.data})},t.prototype.return=function(e){return this.client.request("proofs.return",{proofIds:[].concat(e)}).then(function(e){return{proofIds:e.data.ProofIds,errors:e.data.Errors.map(function(e){return{proofId:e.ProofId,errorCode:e.ErrorCode,errorMessage:e.ErrorMessage}})}})},t.prototype.start=function(e){return this.client.request("proofs.start",{proofId:e})},t.prototype.removeEditor=function(e){return this.client.request("proofs.remove-editor",{proofId:e})},t.prototype.load=function(e){return this.client.request("proofs.load",{proofId:e}).then(function(e){return(new x.default).fromProof(e.data)})},t.prototype.lock=function(e){return this.client.request("proofs.lock",{proofId:e})},t.prototype.unlock=function(e){return this.client.request("proofs.unlock",{proofId:e})},t.prototype.requestUnlock=function(e){return this.client.request("proofs.request-unlock",{proofId:e})},t.prototype.requestAccess=function(e){return this.client.request("proofs.request-access",{proofId:e})},t.prototype.images=function(e){return this.client.request("proofs.images",{proofId:e}).then(function(e){return e.data.proof.file})},t.prototype.videoCredentials=function(e){var t=this;return this.client.cache.auto(B.VIDEO_CREDENTIALS_CACHE_PREFIX+e,function(){return t._videoCredentials(e)})},t.prototype._videoCredentials=function(e){var t=this,n=new L.default;return this.client.request("proofs.video-credentials",{proofId:e}).then(function(e){return Promise.all([e.data.envelope.envelope,t.client.rawRequest({method:"GET",url:new N.default(e.data.videoCredentials.url)}).then(function(e){return e.body})])}).then(function(e){var n=e[0],r=e[1];return t.client.crypto().decryptImage(n+"-"+r,t.client.keyPairs.getPrivateKeyPEMs())}).then(function(e){return n.createBase64(e).then(function(e){return n.read(e)})}).then(function(e){try{return JSON.parse(e)}catch(o){var t=e.split("|"),n=t[0],r=t[1];return{streamingUrl:n.replace("http://","https://")+"/manifest(format=m3u8-aapl,encryption=cbc)",accessToken:r,manifestUrl:n.replace("http://","https://")+"/manifest",bearerToken:r}}})},t.prototype._getProofSetup=function(e,t){return this.client.request("integrations.get-proof-setup",{integration_key:e,id:t}).then(function(e){return{payload:e.data.payload}})},t.prototype.setMessageToReviewers=function(e,t){return this.client.request("proofs.set-message-to-reviewers",{proofIds:[].concat(e),messageToReviewers:t})},t.prototype.returnTodos=function(e,t){var n=t.messageToOwners,r=t.markCommentsAsTodo,o=void 0!==r&&r;return this.client.request("proofs.return-todos",{proofIds:[].concat(e),messageToOwners:n,markCommentAsTodo:o})},t.prototype.updateDecision=function(e,t){return this.client.request("proofs.update-decision",{proofId:e,decision:t})},t.prototype.update=function(e){if(1===e.length||void 0===e.length){var t=[].concat(e)[0],n=t.id,r=t.name,o=t.tags,i=t.dueDate,a=t.messageToReviewers,u=t.workflow,c=t.checklist,l=t.group,f=t.proofTemplate,p=t.file,d=t.reference,h=t.integrationReferences,m=t.reminders,y=t.owners,v=t.canDownload,_=t.isPublic,b=t.start,w=t.commentVisibility;return this.client.request("proofs.update",{proof:{id:n,name:r,tags:o,dueDate:i?i.toISOString():void 0,messageToReviewers:a,workflowId:u&&u.id||void 0,proofTemplateId:f&&f.id||void 0,checklist:c,fileId:p&&p.id||void 0,groupId:l&&l.id||void 0,reference:d,integrationReferences:h,reminders:m?[].concat(m):void 0,owners:y,canDownload:v,isPublic:_,start:b,commentVisibility:w}}).then(function(e){var t=(new x.default).fromProof(e.data);return t.calculateState(),t})}return this.client.request("proofs.bulk-update",{proofs:s(e)})},t.prototype.next=function(e){return this.client.request("proofs.next",{proofId:e}).then(function(e){return(new x.default).fromProof(e.data)})},t.prototype.addWorkflow=function(e,t){return this.client.request("proofs-workflow.add-bulk",{proofIds:[].concat(e),workflowTemplateId:t})},t.prototype.sendShareLink=function(e){var t=e.proofId,n=e.message,r=e.emailAddresses;return this.client.request("proofs.send-share-link",{proofId:t,message:n,emailAddresses:r})},t.prototype.getWorkflowMetrics=function(e){return this.client.request("proofs.get-workflow-metrics",{proofId:e}).then(function(e){return e.data?e.data.workflowMetrics:null})},t}(l.default);t.default=G},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.add=function(e,t){return this.client.request("proofs-owners.add",{proofIds:[].concat(e),users:[].concat(t)})},t.prototype.remove=function(e,t){return this.client.request("proofs-owners.remove",{proofId:e,users:[].concat(t)})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){var t=[].concat(e);return t.forEach(function(e){e.editorMessage=e.messageToEditors,delete e.messageToEditors}),t}t.__esModule=!0;var s=n(0),u=function(e){return e&&e.__esModule?e:{default:e}}(s),c=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.add=function(e,t,n){var r={proofId:e,editors:[].concat(t),editorMessage:null===n?"":n};return this.client.request("proofs.editors.add",r)},t.prototype.addBulk=function(e){return this.client.request("proofs.editors.add-bulk",{proofsWithEditors:a(e)})},t.prototype.remove=function(e,t){return this.client.request("proofs.editors.remove",{proofId:e,editors:[].concat(t)})},t.prototype.replace=function(e,t,n){return this.client.request("proofs.editors.replace",{proofId:e,oldEditors:[].concat(t),newEditors:[].concat(n)})},t.prototype.set=function(e,t){return this.client.request("proofs.editors.set",{proofId:e,editors:[].concat(t)})},t}(u.default);t.default=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.add=function(e,t){return this.client.request("proofs-reviewers.add",{proofIds:[].concat(e),reviewers:[].concat(t)})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(28),l=r(c),f=n(29),p=(0,f.sortObjectsByKey)("version"),d=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.attach=function(e,t){return this.client.request("proofs.versions.attach",{proofId:e,versionId:t})},t.prototype.list=function(e){return this.client.request("proofs.versions.list",{proofId:e}).then(function(e){return e.data.map(function(e){return(new l.default).fromProofVersion(e)}).sort(p)})},t}(u.default);t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return(new p.default).fromProofGroup(e.data)}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=n(0),l=r(c),f=n(11),p=r(f),d=n(78),h=r(d),m=n(79),y=r(m),v=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.owners=new h.default(n),r.workflows=new y.default(n),r}return a(t,e),t.prototype.create=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=e.isOwnedByTeam;return this.client.request("proofs.groups.create",{name:t,ownedByTeam:n}).then(s)},t.prototype.load=function(e){return this.client.request("proofs.groups.load",{groupId:e}).then(s)},t.prototype.ready=function(e){return this.client.request("proofs.groups.ready",{groupId:e})},t.prototype.update=function(e,t){var n=t.name,r=t.isOwnedByTeam,o=t.folder;return this.client.request("proofs.groups.update",{groupId:e,name:n,ownedByTeam:r,folderName:o&&o.name}).then(s)},t.prototype.removeProof=function(e){return this.client.request("proofs.groups.remove-proof",{proofId:e})},t.prototype.addProof=function(e,t){return this.client.request("proofs.groups.add-proof",{groupId:e,proofId:t})},t.prototype.delete=function(e){return this.client.request("proofs.groups.delete",{groupId:e})},t.prototype.archive=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(function(e){return"string"==typeof e}))return this.client.request("proofs.groups.archive",{groupIds:t});var r={archiveProofs:!1},o=t[0],i=t[1],a=void 0===i?r:i,s=[].concat(o);return this.client.request("proofs.groups.archive",u({groupIds:s},a))},t.prototype.reopen=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.client.request("proofs.groups.reopen",{groupIds:t})},t}(l.default);t.default=v},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.add=function(e,t){return this.client.request("proofs.groups.owners.add",{groupId:e,owners:[].concat(t)})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.addReviewers=function(e,t){return this.client.request("proofs.groups.workflows.add-reviewers",{groupId:e,reviewers:[].concat(t)})},t.prototype.replaceApprover=function(e,t){return this.client.request("proofs.groups.replace-approver",{groupId:e,user:t})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.summary=function(e){return this.client.request("proofs.audit.summary",{proofId:e}).then(function(e){return e.data.summary})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(82),l=r(c),f=n(89),p=r(f),d=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.extractedText=new p.default(n),r.colorSeparations=new l.default(n),r}return a(t,e),t}(u.default);t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(12),l=r(c),f=n(2),p=r(f),d=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.resources=function(e){return this.client.request("proofs.assets.color-separations",{proofId:e}).then(function(e){return e.data.result}).catch(function(e){if(!e||!e.response||400!==e.response.code)throw e})},t.prototype.download=function(e,t,n){var r=this,o=e.pages.filter(function(e){return e.number===t});if(!o.length)return Promise.reject(new Error("Page does not have any color separation plates."));var i=o[0].plates.filter(function(e){return e.name===n});if(!i.length)return Promise.reject(new Error("Page "+t+' does not have a plate named "'+n+'".'));var a=new l.default(i[0].url),s=e.envelope,u=new p.default;return this.client.rawRequest({method:"GET",url:a},{bluffer:!0}).then(function(e){return e.body}).then(function(e){return u.readBase64(e)}).then(function(e){return r.client.crypto().decryptBytes(e,s,r.client.keyPairs.getPrivateKeyPEMs(),[],[])}).then(function(e){return u.createBase64(e)})},t}(u.default);t.default=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(17),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a=function(){function e(){r(this,e)}return e.prototype.create=function(e){return Promise.resolve(new Blob([(0,i.default)(e)]))},e.prototype.createBase64=function(e){return this.create(atob(e))},e.prototype.createArrayBuffer=function(e){return Promise.resolve(new Blob([e]))},e.prototype.combine=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Promise.resolve(new Blob(t))},e.prototype.slice=function(e,t,n){return Promise.resolve(e.slice(t,n))},e.prototype.read=function(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=function(){n(r.error)},r.readAsText(e)})},e.prototype.readBase64=function(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(){var e=r.result;t(e.substring(e.indexOf(",")+1))},r.onerror=function(){n(r.error)},r.readAsDataURL(e)})},e.prototype.readArrayBuffer=function(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=function(){n(r.error)},r.readAsArrayBuffer(e)})},e.prototype.size=function(e){return e.size},e}();t.default=a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=function(){function e(){r(this,e)}return e.prototype.create=function(e){return Promise.resolve(Buffer.from(e))},e.prototype.createBase64=function(e){return Promise.resolve(Buffer.from(e,"base64"))},e.prototype.createArrayBuffer=function(e){for(var t=Buffer.alloc(e.byteLength),n=new Uint8Array(e),r=0;r<t.length;r++)t[r]=n[r];return Promise.resolve(t)},e.prototype.combine=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Promise.resolve(Buffer.concat(t))},e.prototype.slice=function(e,t,n){return Promise.resolve(e.slice(t,n))},e.prototype.read=function(e){return Promise.resolve(e.toString())},e.prototype.readBase64=function(e){return Promise.resolve(e.toString("base64"))},e.prototype.readArrayBuffer=function(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r<e.length;r++)n[r]=e[r];return Promise.resolve(t)},e.prototype.size=function(e){return Buffer.byteLength(e)},e}();t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){for(var t=e.length,n=e.length-1;n>=0;n--){var r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}t.__esModule=!0;var a=n(86),s=n(30),u=r(s),c=n(17),l=r(c),f=function(){function e(){o(this,e)}return e.prototype.create=function(e){return Promise.resolve(e)},e.prototype.createBase64=function(e){return Promise.resolve((0,a.atob)(e))},e.prototype.createArrayBuffer=function(e){return Promise.resolve((0,u.default)(e))},e.prototype.combine=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Promise.resolve(t.join(""))},e.prototype.slice=function(e,t,n){return Promise.resolve(e.slice(t,n))},e.prototype.read=function(e){return Promise.resolve(e)},e.prototype.readBase64=function(e){return Promise.resolve((0,a.btoa)(e))},e.prototype.readArrayBuffer=function(e){return Promise.resolve((0,l.default)(e))},e.prototype.size=function(e){return i(e)},e}();t.default=f},function(e,t,n){!function(){function e(e){this.message=e}var n=t,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.prototype=new Error,e.prototype.name="InvalidCharacterError",n.btoa||(n.btoa=function(t){for(var n,o,i=String(t),a=0,s=r,u="";i.charAt(0|a)||(s="=",a%1);u+=s.charAt(63&n>>8-a%1*8)){if((o=i.charCodeAt(a+=.75))>255)throw new e("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");n=n<<8|o}return u}),n.atob||(n.atob=function(t){var n=String(t).replace(/[=]+$/,"");if(n.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,i,a=0,s=0,u="";i=n.charAt(s++);~i&&(o=a%4?64*o+i:i,a++%4)?u+=String.fromCharCode(255&o>>(-2*a&6)):0)i=r.indexOf(i);return u})}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return e.byteLength!==e.buffer.byteLength?e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength):e.buffer}function a(e){return new Uint8Array(e)}function s(e){return(0,d.default)(i(e))}function u(e){return a((0,m.default)(e))}function c(e){for(var t=new Uint8Array(e.reduce(function(e,t){return e+t.byteLength},0)),n=0,r=0;n<e.length;n++)t.set(e[n],r),r+=e[n].byteLength;return t}t.__esModule=!0;var l=n(88),f=r(l),p=n(30),d=r(p),h=n(17),m=r(h),y=function(){function e(){o(this,e)}return e.prototype.create=function(e){return Promise.resolve(u(e))},e.prototype.createBase64=function(e){return Promise.resolve(f.default.toByteArray(e))},e.prototype.createArrayBuffer=function(e){return Promise.resolve(a(e))},e.prototype.combine=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Promise.resolve(c(t))},e.prototype.slice=function(e,t,n){return Promise.resolve(e.slice(t,n))},e.prototype.read=function(e){return Promise.resolve(s(e))},e.prototype.readBase64=function(e){return Promise.resolve(f.default.fromByteArray(e))},e.prototype.readArrayBuffer=function(e){return Promise.resolve(i(e))},e.prototype.size=function(e){return e.byteLength},e}();t.default=y},function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function o(e){var t=r(e),n=t[0],o=t[1];return 3*(n+o)/4-o}function i(e,t,n){return 3*(t+n)/4-n}function a(e){var t,n,o=r(e),a=o[0],s=o[1],u=new p(i(e,a,s)),c=0,l=s>0?a-4:a;for(n=0;n<l;n+=4)t=f[e.charCodeAt(n)]<<18|f[e.charCodeAt(n+1)]<<12|f[e.charCodeAt(n+2)]<<6|f[e.charCodeAt(n+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===s&&(t=f[e.charCodeAt(n)]<<2|f[e.charCodeAt(n+1)]>>4,u[c++]=255&t),1===s&&(t=f[e.charCodeAt(n)]<<10|f[e.charCodeAt(n+1)]<<4|f[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u}function s(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function u(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(s(r));return o.join("")}function c(e){for(var t,n=e.length,r=n%3,o=[],i=0,a=n-r;i<a;i+=16383)o.push(u(e,i,i+16383>a?a:i+16383));return 1===r?(t=e[n-1],o.push(l[t>>2]+l[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(l[t>>10]+l[t>>4&63]+l[t<<2&63]+"=")),o.join("")}t.byteLength=o,t.toByteArray=a,t.fromByteArray=c;for(var l=[],f=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,m=d.length;h<m;++h)l[h]=d[h],f[d.charCodeAt(h)]=h;f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(12),l=r(c),f=n(2),p=r(f),d=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.resources=function(e){return this.client.request("proofs.assets.extracted-text",{proofId:e}).then(function(e){return e.data.result}).catch(function(e){if(!e||!e.response||400!==e.response.code)throw e})},t.prototype.download=function(e,t){var n=this,r=e.pages.filter(function(e){return e.number===t});if(!r||!r.length)return Promise.reject(new Error("Page does not contain any text."));var o=e.envelope,i=new l.default(r[0].chunks[0].url),a=new p.default;return this.client.rawRequest({method:"GET",url:i},{bluffer:!0}).then(function(e){return e.body}).then(function(e){return a.readBase64(e)}).then(function(e){return n.client.crypto().decryptBytes(e,o,n.client.keyPairs.getPrivateKeyPEMs(),[],["unzip"])}).then(function(e){return a.createBase64(e)}).then(function(e){return a.readArrayBuffer(e)}).then(function(e){return n.client.protobuf().ExtractedText(e)})},t}(u.default);t.default=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.validate=function(e){return this.client.request("proofs.custom-tools.validate",{schema:e}).then(function(){})},t.prototype.load=function(e){return this.client.request("proofs.custom-tools.load",{proofId:e}).then(function(e){return e.data.tools})},t.prototype.update=function(e,t){return this.client.request("proofs.custom-tools.update",{proofId:e,updates:t}).then(function(e){return e.data.tools})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(0),u=function(e){return e&&e.__esModule?e:{default:e}}(s),c=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.availableIntegrations=function(){return this.client.request("integrations.get-available-reference-integrations").then(function(e){return e.data.integrations})},t.prototype.options=function(e,t){return this.client.request("integrations.get-available-reference-options",{params:a({},t,{integration_key:e})}).then(function(e){return e.data.optionTypes})},t.prototype.add=function(e,t){return this.client.request("integrations.proof-integration-references.add",{proofId:e,integrationReference:t})},t.prototype.remove=function(e,t){return this.client.request("integrations.proof-integration-references.remove",{proofId:e,referenceId:t})},t.prototype.loadReferenceAdditionalInformation=function(e,t,n){return this.client.request("integrations.load-reference-additional-information",{params:a({},n,{reference_type:e,reference_id:t})}).then(function(e){return e.data.information})},t}(u.default);t.default=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.results=function(e){return this.client.request("proofs.link-check.results",{proofId:e})},t.prototype.recheck=function(e){return this.client.request("proofs.link-check.recheck",{proofId:e})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.load=function(e){return this.client.request("proofs.decisions.load",{proofId:e}).then(function(e){return e.data.decisions})},t.prototype.getOptions=function(e){return this.client.request("proofs.decisions.get-options",{proofId:e,type:"options"}).then(function(e){return{currentDecision:e.data.currentDecision,options:e.data.options}})},t.prototype.leaveDecision=function(e,t){return this.client.request("proofs.decisions.leave-decision",{proofId:e,decisionId:t})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return e.map(function(e){return(new f.default).fromReminder(e)})}t.__esModule=!0;var u=n(0),c=r(u),l=n(95),f=r(l),p=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.add=function(e,t){return this.client.request("reminders.add",{entityId:e,reminders:[{action:t.action,relativeTo:t.relativeTo,relativeDate:t.relativeDate,absoluteDate:t.absoluteDate}]}).then(function(e){return s(e.data)})},t.prototype.set=function(e,t){return this.client.request("reminders.set",{entityId:e,reminders:t.map(function(e){return[{action:e.action,relativeTo:e.relativeTo,relativeDate:e.relativeDate,absoluteDate:e.absoluteDate}]})}).then(function(e){return s(e.data)})},t.prototype.update=function(e,t){return this.client.request("reminders.update",{reminderId:e,relativeDate:t})},t.prototype.delete=function(e){return this.client.request("reminders.delete",{reminderIds:[].concat(e)})},t.prototype.all=function(e){return this.client.request("reminders.all",{entityId:e}).then(function(e){return s(e.data)})},t}(c.default);t.default=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={id:"ReminderId",action:"Action",absoluteDate:(0,o.date)("TriggerDate"),relativeTo:"RelativeTo",relativeDate:"RelativeDate"},s=function(){function e(){r(this,e)}return e.prototype.fromReminder=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(5),l=r(c),f=n(10),p=r(f),d=n(3),h=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.setTags=function(e,t){return this.client.request("proofs.set-tags",{relatedId:e,tag:t.join(",")})},t.prototype.deleteTag=function(e,t){return this.client.request("proofs.tag-delete",{relatedId:e,tag:t})},t.prototype.setFile=function(e,t){var n=this;return this.client.request("proofs.set-file",{proofId:e,fileId:t}).then(function(){return n.client.request("proofs.distribute-file",{proofId:e})})},t.prototype.create=function(e){var t=this,n=e.name,r=e.file,o=e.isPublic,i=e.tags,a=void 0===i?[]:i,s=e.dueDate,u=void 0===s?new Date(Date.now()+3*d.DAY_IN_MS):s;return this.client.request("briefs.create",{title:n,isPublic:o,messageToRecipient:"",dueDate:u.toISOString(),tag:a.join(",")}).then(function(e){var n=(new l.default).fromProof(e.data.Brief);return Promise.all([n,r&&t.setFile(n.id,r.id)])}).then(function(e){var t=e[0];return r&&(t.fileId=r.id,t.fileStatus=p.default.UPLOADING),t.calculateState(),t})},t.prototype.update=function(e){var t=this,n=e.briefId,r=e.data,o=e.start,i=void 0!==o&&o;return this.client.request("briefs.update",{briefId:n,title:r.title,messageToRecipient:r.messageToRecipient,dueDate:r.dueDate?r.dueDate.toISOString():"",tag:r.tags?r.tags.join(","):"",recipient:r.recipient,editorId:r.editorId,editorMessage:r.editorMessage,isPublic:r.isPublic}).then(function(e){return(new l.default).fromProof(e.data.Brief)}).then(function(e){return Promise.resolve(i&&t.start(e.id)).then(function(){return e})})},t.prototype.delete=function(e){return this.client.request("proofs.delete",{proofId:e})},t.prototype.start=function(e){return this.client.request("briefs.start",{briefId:e})},t}(u.default);t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e,t,n){return(1-(t+n))*e+t}t.__esModule=!0;var c=n(0),l=r(c),f=n(18),p=r(f),d=n(10),h=r(d),m=n(31),y=r(m),v=n(98),_=r(v),b=n(2),w=r(b),g=n(3),E=n(32),O=r(E),P=n(99),T=r(P),k=n(33),I=r(k),S=n(100),C=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.generateToken=function(e,t){return e&&!t?Promise.reject(Error('The "assignedType" option is required when specifying the "assignedTo" option.')):!e&&t?Promise.reject(Error('The "assignedTo" option is required when specifying the "assignedType" option.')):this.client.request("files.legacy.generate-token",{relatedId:e,fileType:t}).then(function(e){return e.data.Token})},t.prototype.setCanDownload=function(e,t){return this.client.request("files.can-download.update",{fileId:e,downloadOriginal:t?1:0})},t.prototype._waitFileProcessed=function(e){var t=this;return new Promise(function(n,r){var o=null,i=null;!function a(){t.details(e).then(function(t){switch(o=null,t.status){case h.default.OK:n(t);break;case h.default.ERROR:r(new Error("File "+e+" encountered a processing error: "+t.message));break;default:o=setTimeout(a,5e3)}o&&t.status!==h.default.RIPPING||clearTimeout(i)}).catch(r)}(),i=setTimeout(function(){clearTimeout(o),r(new Error("File did not finish processing within specified duration."))},3e4)})},t.prototype._createWebsiteFile=function(e){var t=this;return this._generateKeyIVEnvelope().then(function(n){var r=n.envelope;return t.client.request("files.import.web",{url:e,envelope:r})}).then(function(e){return e.data})},t.prototype._importFileFromUrl=function(e){var t=this,n=e.name,r=e.url,o=e.provider,i=e.auth,a=e.download,s=o;o===y.default.NONE&&(s="generic");var u=(0,S.parseFilename)(n),c=u.name,l=u.extension;return this._generateKeyIVEnvelope().then(function(e){var n=e.envelope;return t.client.request("files.import."+s,{extn:l,filename:c,url:r,envelope:n,accessToken:i,storeOriginal:a})}).then(function(e){return e.data})},t.prototype.import=function(e){var t=this,n=e.name,r=e.url,o=e.provider,i=void 0===o?y.default.NONE:o,a=e.auth,s=e.download,u=void 0!==s&&s,c=e.process,l=void 0!==c&&c;return Object.keys(y.default).some(function(e){return y.default[e]===i})?(i===y.default.WEBSITE?this._createWebsiteFile(r):this._importFileFromUrl({name:n,url:r,provider:i,auth:a,download:u})).then(function(e){if(l)return t._waitFileProcessed(e);var n=new p.default;return n.id=e,n}):Promise.reject(new Error('Unsupported provider "'+i+'"'))},t.prototype.email=function(){return this.client.request("files.create-email").then(function(e){return e.data})},t.prototype._generateKeyIVEnvelope=function(){var e=this;return this.client.crypto().generateKeyIV().then(function(t){return Promise.all([t,e.client.crypto().envelopeSeal(t.keyIV,e.client.keyPairs.getPublicKeyPEMs())])}).then(function(e){return{keyIV:e[0],envelope:e[1]}})},t.prototype.upload=function(){return this.upload__v2.apply(this,arguments)},t.prototype.upload__v2=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.concurrent,i=void 0===r?6:r,a=o(n,["concurrent"]),s=(0,T.default)(i),u=(0,T.default)(1),c=[],l=Array.isArray(e),f=l?e:[e],d=void 0;try{d=(0,S.prepareFilesForUpload)(f)}catch(e){return Promise.reject(e)}var h=function(e){return c.push(e),u(function(){if(c.length){var e=c.slice();return c.length=0,t.client.request("files.v2.upload-complete",{files:e})}return null})},m=new w.default;return this.client.request("files.v2.generate-credentials",{supports:{providers:["abs","custom"]},files:d.map(function(e){var t=void 0,n=void 0;if(e.extension){var r=[e.name,e.extension];t=r[0],n=r[1]}else{var o=[e.parsedFilename.name,e.parsedFilename.extension];t=o[0],n=o[1]}var i=m.size(e.contents),a=Math.ceil(i/g.BYTES_PER_BLOCK);return e.onProgress&&e.onProgress(0),{name:t,extension:n,chunks:a,size:i,fileTypeOverride:e.fileTypeOverride,hash:null,adobeExportData:e.adobeExportData?JSON.stringify(e.adobeExportData):null,assignedTo:e.assignedTo,assignedType:e.assignedType,canDownload:void 0===e.download||!!e.download}})}).then(function(e){return Promise.all(d.map(function(n,r){var o=e.data[r];n.onProgress&&n.onProgress(1);var i=new p.default;return i.id=o.FileId,n.onFileDetails&&n.onFileDetails(i),t._upload__v2(n,o,a,s,h).then(function(){return i})}))}).then(function(e){return l?e:e[0]})},t.prototype._upload__v2=function(e,t,n,r,o){var i=this;return this._generateKeyIVEnvelope().then(function(a){var s=a.keyIV,c=a.envelope;return new Promise(function(a,l){function f(e,t){var n=D(e,t);return E.push(n),n}function p(){y||r(function(){return b().then(function(e){if(e)return p(),f(e,v++);if(!y){y=!0;var t=Promise.all(E).then(M);a(t)}})})}var d=t.FileId,h=t.UploadCredentials,m=new w.default,y=!1,v=0,b=(0,_.default)(e.contents,function(e){return m.readBase64(e)}),E=[],O=Math.ceil(m.size(e.contents)/g.BYTES_PER_BLOCK),P=new Array(O),T=1,k=function(){},S=e.onProgress;S&&(k=function(e,t){P[e]=Math.max(t,P[e]||0);var r=100*u(P.reduce(function(e,t){return e+(t||0)},0)/O/100,.01,.01);void 0!==n.progressDecimalPlaces&&(r=+r.toFixed(n.progressDecimalPlaces)),T!==r&&(S(r),T=r)});var C=function(e,t){return i.client.rawRequest({method:"PUT",host:h.url,path:"/"+d+"/"+t,query:h.sas,body:e,headers:{"x-ms-blob-type":"BlockBlob"}},{onUploadProgress:k.bind(null,t)})},R=function(e,t){var n={"file.id":d,"chunk.index":t},r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e};return e.replace(/\{([\w\.]+)\}/g,function(e,r){return t(n[r])})},o={};return Object.keys(h.headers).forEach(function(e){var t=r(h.headers[e]);o[r(e)]=t}),i.client.rawRequest({method:h.method,host:r(h.host),path:r(h.path,encodeURIComponent),query:r(h.query,encodeURIComponent),body:e,headers:o},{onUploadProgress:k.bind(null,t)})},A={abs:C,custom:R}[h.type],D=function(e,t){return i.client.crypto().encryptFileBlock(s,e,!0).then(function(e){return m.createBase64(e)}).then(function(e){return m.readArrayBuffer(e)}).then(function(e){function r(){return A(e,t).then(function(e){if(-1===[200,201].indexOf(e.status)){if(o<i)return o++,n.chunkRetryDelay?(0,I.default)(n.chunkRetryDelay).then(r):r();var a=new Error("Failed to upload block #"+t+" (retried "+o+" times).");throw l(a),y=!0,a}return e})}var o=0,i=void 0!==n.chunkRetryLimit?n.chunkRetryLimit:3;return r()})},M=function(){return o({fileId:d,envelope:c}).then(function(){S&&S(100)})};p(),!1!==e.async&&a()})})},t.prototype.upload__legacy=function(e){var t=this,n=e.name,r=e.contents,o=e.adobeExportData,i=e.assignedTo,a=e.assignedType,s=e.download,u=void 0!==s&&s,c=e.async,l=void 0===c||c,f=e.onProgress,d=e.onError,h=void 0;try{h=(0,S.parseFilename)(n)}catch(e){return Promise.reject(e)}return this.generateToken(i,a).then(function(e){return Promise.all([e,t._generateKeyIVEnvelope()])}).then(function(e){var n=e[0],i=e[1],a=i.keyIV,s=i.envelope,c=t._upload__legacy({parsedFilename:h,contents:r,adobeExportData:o,download:u,token:n,keyIV:a,envelope:s,onProgress:f,onError:d});return l&&(c=Promise.resolve()),c.then(function(){return n})}).then(function(e){var t=new p.default;return t.id=e,t})},t.prototype._upload__legacy=function(e){var t=this,n=e.parsedFilename,r=e.contents,o=e.adobeExportData,i=e.download,a=e.token,s=e.keyIV,u=e.envelope,c=e.onProgress;return new Promise(function(e){function l(){h().then(function(t){if(!v)if(null===t)v=!0,e(m.then(k));else{var n=T(t,y++);m=m.then(function(){return n}),n.then(l)}})}var f=4,p=n.name,d=n.extension,h=(0,_.default)(r),m=Promise.resolve(),y=0,v=!1,b=new w.default,E=Math.ceil(b.size(r)/g.BYTES_PER_BLOCK),O=new Array(E),P=function(){};c&&(P=function(e,t){O[e]=Math.max(t,O[e]||0),c(O.reduce(function(e,t){return e+(t||0)},0)/E*.99)});for(var T=function(e,n){return t.client.crypto().encryptFileBlock(s,e).then(function(e){return t.client.request("files.legacy.upload-block",{block:n,part:1,token:a,data:e},{onUploadProgress:P.bind(null,n)})})},k=function(){return t.client.request("files.legacy.upload-complete",{block:0,blockCount:y,part:0,token:a,extn:d,pages:1,filename:p,storeoriginal:i?1:0,adobeExportData:o?JSON.stringify(o):null,envelope:u}).then(function(){return c&&c(100)})};f--;)l()})},t.prototype.download=function(e){var t=this,n="string"==typeof e?{fileId:e}:e,r=n.fileId,o=n.onFileDetails;return this.details(r).then(function(e){if(!n.silent){if(!e.downloadable)throw new Error("File "+r+" is not downloadable.");if(e.status!==h.default.OK)throw new Error("File "+r+" cannot be download. The file may still be uploading, processing or has errored.");if(!e.blocks)throw new Error("File "+r+" is empty.")}return o&&o(e),t._downloadFile(e,n)})},t.prototype._downloadFile=function(e,t){var n=this;return new Promise(function(r){function o(){if(!m)if(h<u.length){var e=h++,t=d(e);c=c.then(function(){return t.then(function(t){return l(t,e,s)})}),t.then(o)}else m=!0,r(c.then(y))}var i=4,a=new w.default,s=e.blocks,u=new Array(s),c=Promise.resolve(),l=t.onData||function(e,t){u[t]=e},f=function(){};if(t.onProgress){var p=new Array(s);f=function(e,n){p[e]=Math.max(n,p[e]||0),t.onProgress(p.reduce(function(e,t){return e+(t||0)},0)/s*.99)}}for(var d=function(r){return n.client.request("files.download-block",{proofId:e.assignedTo,fileId:e.id,block:r+1,s:t.silent?1:void 0},{onDownloadProgress:f.bind(null,r)}).then(function(e){return n.client.crypto().decryptFileBlock(e.data,n.client.keyPairs.getPrivateKeyPEMs()).then(function(e){return a.createBase64(e)})})},h=0,m=!1,y=function(){return t.onProgress&&t.onProgress(100),t.onData?null:a.combine.apply(a,u)};i--;)o()})},t.prototype.details=function(e){return this.client.request("files.details",{fileId:e}).then(function(e){return(new p.default).fromFile(e.data)})},t.prototype.thumbnail=function(e){var t=this;return this.client.cache.auto(g.THUMBNAIL_CACHE_PREFIX+e,function(){return t._thumbnail(e)})},t.prototype._thumbnail=function(e){var t=this;return this.client.request("files.thumbnail",{fileId:e}).then(function(e){return t.client.crypto().decryptImage(e.data,t.client.keyPairs.getPrivateKeyPEMs())}).then(function(e){return(new w.default).createBase64(e)})},t.prototype.preview=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"low";return this.client.cache.auto(g.PREVIEW_CACHE_PREFIX+e+n+r,function(){return t._preview(e,n,r)})},t.prototype._preview=function(e,t,n){var r=this;return this.client.request("files.preview",{fileId:e,pageNumber:t,quality:{low:"lo",high:"hi"}[n]||n}).then(function(e){return r.client.crypto().decryptImage(e.data,r.client.keyPairs.getPrivateKeyPEMs())}).then(function(e){return(new w.default).createBase64(e)})},t.prototype.thumbnails=function(e,t){var n=this,r=t.async,o=void 0!==r&&r,i=t.onLoadThumbnail,a=t.onLoadThumbnails,s=t.onLoadThumbnailsThrottleMs,u=void 0===s?1e3:s,c=t.onLoadError,l=[],f={},p=a?(0,O.default)(function(){Object.keys(f).length&&(a(f),f={})},u):function(){};return Promise.all(e.map(function(e){return n.client.cache.auto(g.THUMBNAIL_CACHE_PREFIX+e,function(t){l.push({fileId:e,resolve:t})}).then(function(t){var n;return t&&(n={},n[e]=t,n)})})).then(function(e){var t=Promise.all(l.map(function(e){var t=e.fileId,r=e.resolve;return n._thumbnail(t).then(function(e){var n;if(r(e),i){var o;i((o={},o[t]=e,o))}return f[t]=e,p(),n={},n[t]=e,n}).catch(function(e){return c&&c(e,t),o?{}:Promise.reject(e)})}));return o?e:t.then(function(t){return[].concat(e,t)})}).then(function(e){return Object.assign.apply(Object,[{}].concat(e))})},t.prototype.duplicate=function(e){return this.client.request("files.duplicate",{id:e}).then(function(e){return e.data.file})},t}(l.default);t.default=C},function(e,t,n){"use strict";function r(e){return(new s.default).readBase64(e).then(function(e){return"data:;base64,"+e})}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,n=new s.default,o=0,a=Promise.resolve(),u=n.size(e);return function(){var r=o++*i.BYTES_PER_BLOCK,s=r+i.BYTES_PER_BLOCK;return a=a.then(function(){return r>u?null:n.slice(e,r,s).then(t)})}}t.__esModule=!0;var i=n(3),a=n(2),s=function(e){return e&&e.__esModule?e:{default:e}}(a);t.default=o},function(e,t,n){"use strict";function r(e){function t(){if(n<e&&r.length){var o=r.shift(),i=o.handler,a=o.callback;return n+=1,Promise.resolve(i()).then(function(){return a(null)},function(e){return a(e)}).then(function(){return n-=1,t()})}return Promise.resolve()}var n=0,r=[];return function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise(function(o,i){var a={handler:e,callback:function(e){e?i(e):o()}};n?r.splice(0,0,a):r.push(a),t()})}}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";function r(e,t){var n=(0,l.getErrorMessage)(e,t);return{error:!0,code:e||-1,data:{ResponseStatus:e?Object.keys(p.default).find(function(t){return p.default[t]===e})||"UNKNOWN":"UNKNOWN",ResponseCode:e||-1},message:n,deprecated:null}}function o(e){if(!e||"string"!=typeof e){throw r(p.default.ERROR_FILE_UPLOAD_INVALID_FILENAME,"Filename must be a non-empty string")}var t=e.lastIndexOf(".");if(-1===t||t===e.length-1){throw r(p.default.ERROR_FILE_UPLOAD_MISSING_EXTENSION,'Invalid filename "'+e+'". Filename must include a file extension')}if(0===t){throw r(p.default.ERROR_FILE_UPLOAD_INVALID_FILENAME)}var n=e.substring(0,t),o=e.substring(t+1);if(!n.trim()){throw r(p.default.ERROR_FILE_UPLOAD_INVALID_FILENAME)}if(!o.trim()){throw r(p.default.ERROR_FILE_UPLOAD_MISSING_EXTENSION)}return{name:n.trim(),extension:o.trim().toLowerCase()}}function i(e){if(!Array.isArray(e)){throw new Error("Files must be an array")}e.forEach(function(e,t){if(!e||"object"!==(void 0===e?"undefined":c(e))){throw new Error("File at index "+t+" must be an object")}if(!e.name||"string"!=typeof e.name){throw new Error("File at index "+t+" must have a valid name (string)")}if(!e.contents){throw new Error("File at index "+t+" must have contents")}})}function a(e){return e.map(function(e){var t=null;if(!e.extension)try{t=o(e.name)}catch(e){throw e}return u({},e,{parsedFilename:t})})}function s(e){return i(e),a(e)}var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=n(24),f=n(6),p=function(e){return e&&e.__esModule?e:{default:e}}(f);e.exports={parseFilename:o,validateFiles:i,addParsedFilenames:a,prepareFilesForUpload:s}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(102),l=r(c),f=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.team=new l.default(n),r}return a(t,e),t}(u.default);t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(103),l=r(c),f=n(104),p=r(f),d=n(106),h=r(d),m=n(117),y=r(m),v=n(120),_=r(v),b=n(121),w=r(b),g=n(36),E=r(g),O=n(122),P=r(O),T=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.users=new l.default(n),r.dashboard=new p.default(n),r.features=new h.default(n),r.preferences=new y.default(n),r.scim=new _.default(n),r.workflows=new w.default(n),r.integrations=new E.default(n,"team"),r.customTools=new P.default(n),r}return a(t,e),t}(u.default);t.default=T},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return e.data.map(function(e){return(new d.default).fromUser(e)})}t.__esModule=!0;var u=n(0),c=r(u),l=n(2),f=r(l),p=n(4),d=r(p),h=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.enabled=function(){return this.client.request("admin.team.users.enabled").then(s)},t.prototype.disabled=function(){return this.client.request("admin.team.users.disabled").then(s)},t.prototype.getInvitations=function(){return this.client.request("admin.team.users.invitations").then(function(e){return e.data})},t.prototype._setEnabled=function(e,t){return this.client.request("admin.team.users.set-enabled",{email:e,enabled:t})},t.prototype.enable=function(e){return this._setEnabled(e,!0)},t.prototype.disable=function(e){return this._setEnabled(e,!1)},t.prototype.invite=function(e){return this.client.request("admin.team.users.invite",{emails:[].concat(e)})},t.prototype.revokeInvitation=function(e){var t=e.email,n=e.invitationId;return this.client.request("admin.team.users.revoke-invitation",{email:t,invitationId:n})},t.prototype.remove=function(e){return this.client.request("admin.team.users.remove-from-team",{users:[].concat(e)})},t.prototype.uploadAvatar=function(e,t){var n=this;return(new f.default).readBase64(t).then(function(t){return n.client.request("admin.team.users.upload-avatar",{userId:e,uploadedImage:"data:image/png;base64,"+t})})},t.prototype.deleteAvatar=function(e){return this.client.request("admin.team.users.delete-avatar",{userId:e})},t}(c.default);t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){var n={};return n.proofs=u(e[v[t]]),n.total=e.ProofsNumber,n}function u(e){return(e||[]).map(function(e){return(new p.default).fromProof(e)})}t.__esModule=!0;var c=n(0),l=r(c),f=n(5),p=r(f),d=n(9),h=r(d),m=n(105),y=r(m),v={inbox:"ProofIn",sent:"ProofSent",outbox:"ProofOut",search:"Proofs"},_=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.groups=new y.default(n),r}return a(t,e),t.prototype.inbox=function(e){return this._loadSingleTeamTabProofs("inbox",{page:e})},t.prototype.sent=function(e){return this._loadSingleTeamTabProofs("sent",{page:e})},t.prototype.outbox=function(e){return this._loadSingleTeamTabProofs("outbox",{page:e})},t.prototype._loadSingleTeamTabProofs=function(e,t){return this.client.request("team.dashboard."+e,t).then(function(t){return s(t.data,e)}).then(function(e){return e})},t.prototype.everything=function(e){return this.search(void 0,{everything:!0,page:e})},t.prototype.approved=function(e){return this.search(void 0,{status:h.default.APPROVED,page:e})},t.prototype.archived=function(e){return this.search(void 0,{status:h.default.ARCHIVED,page:e})},t.prototype.search=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.status,r=t.everything,o=t.page;return this._loadTeamSearchProofs({query:e,filterBy:void 0===n?void 0:[].concat(n).join(","),all:r?1:0,page:o})},t.prototype._loadTeamSearchProofs=function(e){return this.client.request("team.dashboard.search",e).then(function(e){return s(e.data,"search")})},t}(l.default);t.default=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return(e||[]).map(function(e){return(new p.default).fromProofGroup(e)})}function u(e){return(new p.default).fromProofGroup(e.data)}t.__esModule=!0;var c=n(0),l=r(c),f=n(11),p=r(f),d=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype._loadGroups=function(e){return this.client.request("admin.team.dashboard.groups.category",{category:e}).then(function(e){return s(e.data)})},t.prototype.load=function(e){return this.client.request("admin.team.proofs.groups.load",{groupId:e}).then(u)},t.prototype.current=function(){return this._loadGroups("current")},t.prototype.archived=function(){return this._loadGroups("archived")},t}(l.default);t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(107),l=r(c),f=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.load=function(){return this.client.request("admin.team.features.load").then(function(e){return e.data?(new l.default).fromTeamFeatures(e.data):null})},t.prototype.update=function(e){var t=e.emails,n=e.comments,r=e.proofs,o=e.workflows,i=e.addressBook,a=e.userGroups,s=e.webhooks,u=e.intelligence,c=t&&t.displayComments,l=t&&t.displayTeamName,f=n&&n.generalComments,p=n&&n.privateComments,d=n&&n.enableCommentVisibility,h=n&&n.defaultCommentVisibility,m=o&&o.enableViewOnlyReviewers,y=t&&t.titleTextColor,v=t&&t.linkTextColor,_=t&&t.buttonBackgroundColor,b=t&&t.buttonTextColor,w=n&&n.editComments,g=n&&n.ownerCanDeleteComments,E=n&&n.disableReplyingToCommentsInStatuses&&[].concat(n.disableReplyingToCommentsInStatuses),O=r&&r.reference,P=r&&r.referenceRequired,T=r&&r.publicProofs,k=r&&r.usePreviousVersionDueDate,I=r&&r.defaultIsPublic,S=r&&r.messageToOwners,C=r&&r.allowedDecisions,R=r&&r.enableChecklists,A=r&&r.enableProofMagicAccess,D=r&&r.defaultGifOutput,M=i&&i.suggestionsIncludeTeamMembers,x=a&&a.enableUserGroups,j=s&&s.enabled,F=u&&u.enableIntelligence,q=u&&u.enableSmartTags,N=u&&u.enableSmartCheckCr;return this.client.request("admin.team.features.update",{displayComments:c,displayTeamName:l,generalComments:f,privateComments:p,enableWebhooks:j,enableCommentVisibility:d,defaultCommentVisibility:h,enableViewOnlyReviewers:m,emailTitleTextColor:y,emailLinkTextColor:v,emailButtonBackgroundColor:_,emailButtonTextColor:b,editComments:w,ownerCanDeleteComments:g,disableReplyingToCommentsInStatuses:E,proofReference:O,proofReferenceRequired:P,publicProofs:T,defaultProofIsPublic:I,messageToOwners:S,allowedDecisions:C,enableChecklists:R,enableProofMagicAccess:A,defaultGifOutput:D,enableIntelligence:F,enableIntelligenceSmartTags:q,enableIntelligenceSmartCheckCr:N,suggestionsIncludeTeamMembers:M,enableUserGroups:x,usePreviousVersionDueDate:k})},t.prototype.setSenderEmail=function(e){return this.client.request("admin.team.features.sender-email.set",{senderEmail:e}).then(function(e){return{success:e.data.Success,domain:e.data.Domain,email:e.data.Email,records:e.data.Records&&e.data.Records.map(function(e){return{version:e.Version,current:e.Current,new:e.New}})}})},t}(u.default);t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(1),a=r(i),s=n(108),u=r(s),c=n(109),l=r(c),f=n(110),p=r(f),d=n(111),h=r(d),m=n(112),y=r(m),v=n(113),_=r(v),b=n(114),w=r(b),g=n(115),E=r(g),O=n(116),P=r(O),T={emails:function(e){return(new u.default).fromTeamEmailFeatures(e)},comments:function(e){return(new l.default).fromTeamCommentFeatures(e)},proofs:function(e){return(new p.default).fromTeamProofFeatures(e)},workflows:function(e){return(new h.default).fromTeamWorkflowFeatures(e)},addressBook:function(e){return(new y.default).fromTeamAddressBookFeatures(e)},accounts:function(e){return(new _.default).fromTeamAccountFeatures(e)},webhooks:function(e){return(new w.default).fromTeamWebhookFeatures(e)},userGroups:function(e){return(new P.default).fromTeamUserGroupsFeatures(e)},intelligence:function(e){return(new E.default).fromTeamIntelligenceFeatures(e)}},k=function(){function e(){o(this,e)}return e.prototype.fromTeamFeatures=function(e){return(0,a.default)(this,T,e),this},e}();t.default=k},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={displayComments:"DisplayComments",displayTeamName:"DisplayTeamName",customStyles:"EmailCustomStyles",titleTextColor:"EmailTitleTextColor",linkTextColor:"EmailLinkTextColor",buttonBackgroundColor:"EmailButtonBackgroundColor",buttonTextColor:"EmailButtonTextColor",senderEmail:"SenderEmail"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamEmailFeatures=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={editComments:"EditComments",ownerCanDeleteComments:"OwnerCanDeleteComments",disableReplyingToCommentsInStatuses:"DisableReplyingToCommentsInStatuses",generalComments:"GeneralComments",configurePrivateComments:"LicensePrivateComments",privateComments:"PrivateComments",configureCommentVisibility:"LicenseCommentVisibility",enableCommentVisibility:"EnableCommentVisibility",defaultCommentVisibility:"DefaultCommentVisibility"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamCommentFeatures=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={reference:"ProofReference",referenceRequired:"ProofReferenceRequired",publicProofs:"PublicProofs",usePreviousVersionDueDate:"UsePreviousVersionDueDate",defaultIsPublic:"DefaultProofIsPublic",messageToOwners:"MessageToOwners",allowedDecisions:"AllowedDecisions",enableChecklists:"EnableChecklists",defaultGifOutput:"DefaultGifOutput",enableProofMagicAccess:"EnableProofMagicAccess"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamProofFeatures=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={configureViewOnlyReviewers:"LicenseViewOnlyReviewers",enableViewOnlyReviewers:"EnableViewOnlyReviewers"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamWorkflowFeatures=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={suggestionsIncludeTeamMembers:"SuggestionsIncludeTeamMembers",configureSuggestionsIncludeTeamMembers:"LicenseSuggestionsIncludeTeamMembers"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamAddressBookFeatures=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={teamId:"Id",teamName:"Name",teamType:"Type",teamIsPlus:"IsPlus",teamIsTrial:"IsTrial"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamAccountFeatures=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={configurable:"LicenseWebhooks",enabled:"EnableWebhooks"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamWebhookFeatures=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={enableIntelligence:"EnableIntelligence",enableSmartTags:"EnableIntelligenceSmartTags",enableSmartCheckCr:"EnableIntelligenceSmartCheckCr"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamIntelligenceFeatures=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={licenseUserGroups:"LicenseUserGroups",enableUserGroups:"EnableUserGroups"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamUserGroupsFeatures=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(118),l=r(c),f=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.notifications=new l.default(n),r}return a(t,e),t}(u.default);t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(119),l=r(c),f=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.load=function(){return this.client.request("admin.team.preferences.notifications.load").then(function(e){return e.data?(new l.default).fromTeamNotifications(e.data):null})},t.prototype.set=function(e){var t=e.ownerAddedByAdmin;return this.client.request("admin.team.preferences.notifications.set",{ownerAddedByAdmin:t})},t}(u.default);t.default=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={teamId:"TeamId",ownerAddedByAdmin:"OwnerAddedByAdmin"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamNotifications=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.settings=function(){return this.client.request("scim.admin.settings").then(function(e){return e.data.settings})},t.prototype.enable=function(){return this.client.request("scim.admin.enable").then(function(e){return e.data.settings})},t.prototype.disable=function(){return this.client.request("scim.admin.disable").then(function(){})},t.prototype.regenerateAccessToken=function(e){return this.client.request("scim.admin.regenerate-access-token",{type:e}).then(function(e){return e.data.settings})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return(e||[]).map(function(e){return(new f.default).fromWorkflow(e)})}t.__esModule=!0;var u=n(0),c=r(u),l=n(19),f=r(l),p=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.owned=function(){return this.client.request("admin.team.workflows.owned").then(function(e){return s(e.data)})},t.prototype._getOwnedEmailList=function(){return this.client.request("admin.team.workflows.owned.email-list").then(function(e){return e.data.map(function(e){return{id:e.WorkflowId,emails:e.Emails}})})},t}(c.default);t.default=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.load=function(){return this.client.request("admin.team.custom-tools.load").then(function(e){return e.data.tools})},t.prototype.update=function(e){return this.client.request("admin.team.custom-tools.update",{updates:e}).then(function(e){return e.data.tools})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return e&&((0,v.isUserId)(e.id)||e.email)}function u(e){return(e||[]).map(function(e){return(new p.default).fromWorkflow(e)})}t.__esModule=!0;var c=n(0),l=r(c),f=n(19),p=r(f),d=n(13),h=r(d),m=n(20),y=r(m),v=n(27),_=n(124),b=r(_),w=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.steps=new b.default(n),r}return a(t,e),t.prototype.create=function(e){var t=this,n=e.save,r=void 0!==n&&n,o=e.name,i=e.steps,a=void 0===i?[]:i,u=e.reviewers,c=e.approver,l=e.owners,f=e.isOwnedByTeam,p=void 0!==f&&f,d=Array.isArray(c)?c:[c];if(!d.every(s))return Promise.reject(Error("Please provide an id or email address for every approver."));if(r&&!o)return Promise.reject(Error("A workflow must have a name when saving it as a workflow template."));var h=a;u&&u.length&&h.splice(0,0,{users:u}),c&&h.push({position:1e3,users:d,start:c.start});for(var m=0,y=0;y<h.length;y++){var v=h[y];v.users=v.users||[],(!v.position||v.position<m)&&(v.position=m+1),m=Math.max(m,v.position);for(var _=0;_<v.users.length;_++){if(!s(v.users[_]))return Promise.reject(Error("A user id or email address must be provided for a workflow user."))}}var b=void 0;return this._createWorkflow(o,p).then(function(e){return b=e.id,Promise.all([e,Promise.all(h.map(function(n){var r=e.getStepByPosition(n.position),o={};return n.dueDate&&(o.dueDate=n.dueDate),void 0!==n.mandatoryDecisionThreshold&&(o.mandatoryDecisionThreshold=n.mandatoryDecisionThreshold),n.name&&(o.title=n.name),r?Promise.resolve(Object.keys(o).length&&t.steps.update(r.id,o).then(function(e){r.dueDate=e.dueDate})).then(function(){return t._setWorkflowStepUsersMutate(e.id,r,n.users,n.start)}):t._addWorkflowStepAndUsers(e.id,n,n.start)})),l&&Promise.all(l.map(function(e){return t._addProofOwnerToWorkflowTemplate(b,e)}))])}).then(function(e){var t=e[0],n=e[1];return t.steps=n,t}).then(function(e){return r?t._duplicateWorkflow(b):e}).catch(function(e){return Promise.resolve(b&&t._deleteWorkflow(b)).then(function(){return Promise.reject(e)})})},t.prototype.load=function(e){return this.client.request("workflows.load",{workflowId:e}).then(function(e){return(new p.default).fromWorkflow(e.data)})},t.prototype.use=function(e,t){return this.duplicate(e,t)},t.prototype.duplicate=function(e,t){return this._duplicateWorkflow(e,t)},t.prototype.delete=function(e){return this._deleteWorkflow(e)},t.prototype.all=function(){return Promise.all([this.owned(),this.shared()]).then(function(e){return[].concat(e[0],e[1])})},t.prototype.owned=function(){return this.client.request("workflows.owned").then(function(e){return u(e.data)})},t.prototype.shared=function(){return this.client.request("workflows.shared").then(function(e){return u(e.data)})},t.prototype.setApprover=function(e,t){return this.client.request("workflows.users.set",{workflowId:e,position:1e3,users:[t]})},t.prototype.skipAll=function(e){return this.client.request("workflows.users.skip-all",{workflowId:e})},t.prototype.nudgeUser=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return this.client.request("workflows.user.nudge",{workflowId:e,userId:t,message:n})},t.prototype.nudgeAll=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.client.request("workflows.nudge-all",{workflowIds:[].concat(e),message:t}).then(function(e){return{nudgedWorkflows:e.data.NudgedWorkflows.map(function(e){return{workflowId:e.WorkflowId,users:e.Users.map(function(e){return{userId:e.UserId,role:e.Role,stepId:e.StepId,position:Number(e.Position)}})}}),errors:e.data.Errors.map(function(e){return{workflowId:e.WorkflowId,errorCode:e.ErrorCode,errorMessage:e.ErrorMessage}})}})},t.prototype.setStartingStep=function(e,t){return this.client.request("workflows.set-starting-step",{workflowId:e,stepId:t})},t.prototype.replaceApprover=function(e,t){return this.client.request("workflows.replace-approver",{workflowIds:[].concat(e),user:t})},t.prototype.update=function(e,t){var n=t.name,r=t.isOwnedByTeam;return this.client.request("workflows.update",{workflowId:e,title:n,ownedByTeam:r}).then(function(e){return(new p.default).fromWorkflow(e.data)})},t.prototype.getNudgeAllMessage=function(e){return this.client.request("workflows.nudge-message",{workflowId:e}).then(function(e){return e.data.Message})},t.prototype.getNudgeMessage=function(e,t){return this.client.request("workflows.nudge-message",{workflowId:e,userId:t}).then(function(e){return e.data.Message})},t.prototype.favorite=function(e){return this.client.request("workflows.favorite",{workflowId:e})},t.prototype.unfavorite=function(e){return this.client.request("workflows.unfavorite",{workflowId:e})},t.prototype._duplicateWorkflow=function(e,t){var n=this;return this.client.request("workflows.duplicate",{workflowId:e,noOwners:!(!t||!1!==t.includeOwners)||void 0,excludeStepDueDates:!(!t||!1!==t.includeStepDueDates)||void 0,includeOwnedByTeam:t&&!0===t.includeOwnedByTeam||void 0,includeSharedUsers:t&&!0===t.includeSharedUsers||void 0}).then(function(e){var t=e.data.WorkflowId;return n.load(t)})},t.prototype._deleteWorkflow=function(e){return this.client.request("workflows.delete",{workflowId:e})},t.prototype._createWorkflow=function(e,t){return this.client.request("workflows.create",{title:e,ownedByTeam:t}).then(function(e){return(new p.default).fromWorkflow(e.data)})},t.prototype._addWorkflowStepAndUsers=function(e,t,n){var r=this;return this.client.request("workflows.steps.add",{workflowId:e,title:t.name,position:t.position,dueDate:t.dueDate,mandatoryDecisionThreshold:t.mandatoryDecisionThreshold}).then(function(o){var i=(new h.default).fromWorkflowStep(o.data);return r._setWorkflowStepUsersMutate(e,i,t.users,n)})},t.prototype._setWorkflowStepUsersMutate=function(e,t,n,r){var o=this;return this.client.request("workflows.users.set",{workflowId:e,stepId:t.id,users:n.map(function(e){return{email:e.email,userId:e.id,role:e.role,permissions:e.permissions&&{inviter:!!e.permissions.inviter}}})}).then(function(e){var n=e.data.map(function(e){return(new y.default).fromWorkflowUser(e)});t.users=n}).then(function(){return!0===r?o.setStartingStep(e,t.id).then(function(){return t}):t})},t.prototype._addProofOwnerToWorkflowTemplate=function(e,t){return this.client.request("workflows.proof-owners.add",{relatedId:e,workflowCopyToProof:1,userId:t.id,email:t.email})},t.prototype._getOwnedEmailList=function(){return this.client.request("workflows.owned.email-list").then(function(e){return e.data.map(function(e){return{id:e.WorkflowId,emails:e.Emails}})})},t.prototype._getSharedEmailList=function(){return this.client.request("workflows.shared.email-list").then(function(e){return e.data.map(function(e){return{id:e.WorkflowId,emails:e.Emails}})})},t}(l.default);t.default=w},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(13),u=r(s),c=n(0),l=r(c),f=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.moveBefore=function(e,t){return this.client.request("workflows.steps.move-before",{stepId:e,beforeStepId:t})},t.prototype.moveAfter=function(e,t){return this.client.request("workflows.steps.move-after",{stepId:e,afterStepId:t})},t.prototype.swap=function(e,t){return this.client.request("workflows.steps.swap",{stepId:e,swapStepId:t})},t.prototype.update=function(e,t){var n=t.title,r=t.dueDate,o=t.mandatoryDecisionThreshold;return this.client.request("workflows.steps.update",{stepId:e,title:n,dueDate:r,mandatoryDecisionThreshold:o}).then(function(e){return(new u.default).fromWorkflowStep(e.data)})},t}(l.default);t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return(new p.default).fromPreference(e)}function u(e,t){var n=new Array(e.length);return t.forEach(function(t){n[e.indexOf(t.name)]=t}),n}t.__esModule=!0;var c=n(0),l=r(c),f=n(126),p=r(f),d=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.all=function(){return this.client.request("preferences.all")},t.prototype.get=function(e){var t=[].concat(e);return this.client.request("preferences.get",{preferences:t}).then(function(e){return e.data.map(s)}).then(function(n){return"string"==typeof e?n[0]:u(t,n)})},t.prototype.update=function(e,t){var n,r=void 0!==t?(n={},n[e]=t,n):e;return this.client.request("preferences.update",r)},t.prototype.reset=function(e){return this.client.request("preferences.reset",{preferences:[].concat(e)})},t}(l.default);t.default=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={name:"Name",defaultValue:"DefaultValue",value:"Value"},s=function(){function e(){r(this,e)}return e.prototype.getValueOrDefault=function(){return null===this.value?this.defaultValue:this.value},e.prototype.fromPreference=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t=[];return Object.keys(e).forEach(function(n){e[n].Comments.forEach(function(e){t.push(e)})}),t}function u(e){var t=[],n=[];e.forEach(function(e){var r=(new p.default).fromComment(e);r.parentCommentId?n.push(r):t.push(r)}),t.sort(j);var r=t.map(function(e){return e.id}),o=(0,y.sortObjectsBy)(function(e){return r.indexOf(e.parentCommentId)},!0);return n.sort((0,y.combineSort)(F,o)),t.concat(n)}t.__esModule=!0;var c=n(0),l=r(c),f=n(37),p=r(f),d=n(23),h=r(d),m=n(3),y=n(29),v=n(22),_=n(41),b=r(_),w=n(21),g=r(w),E=n(129),O=n(32),P=r(O),T=n(38),k=r(T),I=n(43),S=n(130),C=r(S),R=n(2),A=r(R),D=(0,y.sortObjectsByKey)("pageNumber"),M=(0,y.sortObjectsByKey)("createdDate",!0),x=(0,y.sortObjectsByKey)("createdDate",!1),j=(0,y.combineSort)(D,M),F=(0,y.combineSort)(D,x),q=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.import=new C.default(n),r}return a(t,e),t.prototype._mark=function(e,t,n){if(-1===Object.keys(h.default).map(function(e){return h.default[e]}).indexOf(t))throw new Error('Cannot mark comment state "'+t+'".');var r=h.default.TODO,o=h.default.DONE,i=h.default.UNMARKED,a={commentId:e};switch(t){case i:a.change=0,a.done=0;break;case r:a.change=n?1:0,a.done=0;break;case o:a.done=n?1:0}return this.client.request("comments.state.update",a).then(function(e){return(0,k.default)(e.data)})},t.prototype._markAll=function(e,t,n,r){if(-1===Object.keys(h.default).map(function(e){return h.default[e]}).indexOf(n))throw new Error('Cannot mark comment state "'+n+'".');var o=h.default.TODO,i=h.default.DONE,a=h.default.UNMARKED,s={proofId:e,commentIds:t};switch(n){case a:s.change=0,s.done=0;break;case o:s.change=r?1:0,s.done=0;break;case i:s.done=r?1:0}return this.client.request("comments.state.multiple-update",s).then(function(e){return e.data.map(function(e){return{commentId:e.CommentId,commentState:(0,k.default)(e)}})})},t.prototype.mark=function(e,t){return this._mark(e,t,!0)},t.prototype.unmark=function(e,t){return this._mark(e,t,!1)},t.prototype.markAll=function(e,t,n){return this._markAll(e,t,n,!0)},t.prototype.unmarkAll=function(e,t,n){return this._markAll(e,t,n,!1)},t.prototype.delete=function(e){return this.client.request("comments.delete",{commentId:e})},t.prototype.load=function(e){var t=this,n="string"==typeof e?{proofId:e}:e,r=n.proofId,o=n.pageNumber,i=void 0===o?null:o,a=n.sinceDate,c=void 0===a?null:a,l=n.async,f=void 0!==l&&l,p=n.decrypt,d=void 0===p||p,h=n.onDecryptComment,y=n.onDecryptComments,v=n.onDecryptCommentsThrottleMs,_=void 0===v?1e3:v,b=n.onDecryptError,w=c?c.toISOString().match(m.ISO_REGEX)[0]:m.DEFAULT_ISO_DATE,g={proofId:r,page:i,timestamp:w};return this.client.request(null!==i?"comments.load-page":"comments.load-all",g).then(function(e){var n=u(e.data.Pages?s(e.data.Pages):e.data),r=Promise.resolve();if(d){var o=[],i=[],a=y?(0,P.default)(function(){i.length&&(y(i),i=[])},_):function(){},c=Promise.all(n.map(function(e){return t.client.cache.auto(m.COMMENT_CACHE_PREFIX+e.comment$,function(t){o.push({comment:e,resolve:t})}).then(function(t){return t&&e.fromRawComment(t),e})}));r=r.then(function(){return c}),r=r.then(function(){var e=o.map(function(e){var n=e.comment,r=e.resolve;return t.client.crypto().decryptComment(n.comment$,n.envelope,t.client.keyPairs.getPrivateKeyPEMs()).then(function(e){n.fromRawComment(e),r(e),h&&h(n),i.push(n),a()}).catch(function(e){if(b&&b(e,n),!f)return Promise.reject(e)})});return f?null:Promise.all(e)})}return r.then(function(){return n})})},t.prototype.create=function(e){var t=this,n=e.raw,r=e.tokens,o=e.proofId,i=e.pageNumber,a=void 0===i?1:i,s=e.pin,u=e.pins,c=e.mediaTime,l=e.mediaDuration,f=e.parentCommentId,d=e.metadata,m=e.sourceMetadata,y=e.state,_=e.autoState,w=e.isPrivate,O=e.creationToken,P=[],T=n||(0,v.serialize)(r),k=r||(0,g.default)(n);P.push.apply(P,(0,b.default)(k));var S=[],C=void 0;u?S=S.concat(u):s&&S.push(s);var R=S[0];R&&(R.fill&&(C=R.fill),c&&(R.time=c),l&&(R.duration=l));var A=O||(0,E.generateCreationToken)();return this.client.crypto().encryptComment(T,this.client.keyPairs.getPublicKeyPEMs()).then(function(e){var t=e.envelope,n=e.comment$;return{proofId:o,page:f?void 0:a,envelope:t,encryptedComment:n,xy:(0,I.serializePins)(S),boxFillImage:C?C.image:void 0,boxFillType:C?C.type:void 0,parent:f||void 0,mentions:P,metadata:d?JSON.stringify(d):"{}",sourceMetadata:m,creationToken:A,change:y===h.default.TODO?"1":void 0,done:y===h.default.DONE?"1":void 0,autoState:_,private:void 0!==w?w?"1":"0":void 0}}).then(function(e){return t.client.request("comments.create",e).then(function(e){return(new p.default).fromComment(e.data).fromRawComment(T)})}).catch(function(e){return e&&(e.creationToken=A),Promise.reject(e)})},t.prototype.loadContext=function(e){var t=this;return this.client.request("comments.load-context",{commentId:e}).then(function(e){return t.client.crypto().decryptImage(e.data,t.client.keyPairs.getPrivateKeyPEMs())}).then(function(e){return(new A.default).createBase64(e)})},t}(l.default);t.default=q},function(e,t,n){"use strict";function r(e){for(var t=[],n=e.split(/\n/g),r=0;r<n.length;r++){var i=n[r],a=[];if(0===r){var s=i.match(o.COMMENT_LABEL_REGEX);s&&a.push({type:"label",index:0,length:s[0].length,metadata:{label:s[1].toLowerCase()}})}for(var u=void 0;null!==(u=o.MENTION_REGEX.exec(i));){var c=u,l=c[0],f=c[1],p=c[2];a.push({type:"mention",index:u.index,length:p.length,metadata:{id:f}}),i=i.substring(0,u.index)+p+i.substring(u.index+l.length)}t.push({type:"text",value:i,styles:[],entities:a})}return{version:2,blocks:t}}t.__esModule=!0,t.parse=void 0;var o=n(3);t.parse=r},function(e,t,n){"use strict";function r(){var e=(new Date).getTime();return(0,i.default)(s,a)+"-"+e}t.__esModule=!0,t.generateCreationToken=void 0;var o=n(42),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a=32,s=o.lower+o.upper+o.numbers+o.symbols;t.generateCreationToken=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=n(0),l=r(c),f=n(12),p=r(f),d=n(2),h=r(d),m=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype._createTask=function(e){var t=this;return this.client.crypto().generateCommentImportKey(this.client.session.serverPublicKeyPEM).then(function(n){var r=n.key,o=n.key$;return t.client.request("comments.import.create-task",{options:u({},e,{key:o})}).then(function(e){return[e.data,r]})})},t.prototype._startTask=function(e,t){return this.client.request("comments.import.action-task",{id:e,options:t,action:"start"}).then(function(e){return e.data.task})},t.prototype.fromFile=function(e,t,n){var r=this,i=t.proofId,a=t.fileName,s=o(t,["proofId","fileName"]);return this._createTask({type:"pdf",proofId:i,fileName:a}).then(function(t){var o=t[0],i=o.task,a=o.uploadRequest,s=t[1],u=new h.default;return u.readBase64(e).then(function(e){return r.client.crypto().encryptCommentImportFile(s,e)}).then(function(e){return u.createBase64(e)}).then(function(e){return r.client.rawRequest({url:new p.default(a.url),method:a.method,headers:a.headers,body:e},{onUploadProgress:n})}).then(function(){return i})}).then(function(e){return r._startTask(e.id,s)})},t.prototype.info=function(e){return this.client.request("comments.import.get-task",{id:e}).then(function(e){return e.data.task})},t.prototype.cancel=function(e){return this.client.request("comments.import.action-task",{id:e,action:"cancel",options:{}}).then(function(e){return e.data.task})},t}(l.default);t.default=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(2),l=r(c),f=n(36),p=r(f),d=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.integrations=new p.default(n,"user"),r}return a(t,e),t.prototype.uploadAvatar=function(e){var t=this;return(new l.default).readBase64(e).then(function(e){return t.client.request("profile.upload-avatar",{uploadedImage:"data:image/png;base64,"+e})})},t.prototype.deleteAvatar=function(){return this.client.request("profile.delete-avatar")},t.prototype.changePassword=function(e,t){var n=this,r=this.client.crypto();return Promise.all([r.generatePasswordHash(e),r.generatePasswordHash(t),r.encryptPrivateKey(this.client.session.privateKeyPEM,t)]).then(function(e){var t=e[0],r=e[1],o=e[2];return n.client.request("profile.change-password",{oldPassword:t,newPassword:r,newPrivateKey:o})})},t.prototype.getStatus=function(){return this.client.request("profile.status").then(function(e){return e.data.status})},t.prototype.setStatus=function(e){return this.client.request("profile.set-status",e)},t.prototype.clearStatus=function(){return this.client.request("profile.clear-status")},t}(u.default);t.default=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.check=function(){return this.client.request("sessions.check").then(function(){return null})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(2),l=r(c),f=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.decrypt=function(e){var t=this,n=e.version,r=e.data,o=e.envelope,i=new l.default;return("string"==typeof r?i.create(r):Promise.resolve(r)).then(function(e){return i.read(e).then(function(e){return t.client.crypto().decryptData(n,e,o,t.client.keyPairs.getPrivateKeyPEMs()).then(function(e){return i.create(e)})})})},t}(u.default);t.default=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.generateAccessToken=function(){return this.client.request("live.generate-access-token").then(function(e){return e.data.AccessToken})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.rekeyUsersProofs=function(e){return this.client.request("brian.rekey-users-proofs",{userId:e.userId})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=n(7),a=function(e){return e&&e.__esModule?e:{default:e}}(i),s=n(16)("EventEmitter"),u=function(){function e(){r(this,e),this.handlers={}}return e.prototype.getHandlers=function(e){var t=this,n=[],r=[e];if(-1!==e.indexOf("."))for(var o=e;(o=o.substring(0,o.lastIndexOf("."))).length;)r.push(o+".*");return r.push("*"),r.forEach(function(e){(0,a.default)(t.handlers,e)&&n.push.apply(n,t.handlers[e])}),n},e.prototype.on=function(e,t){if("function"!=typeof t)return void s("Handler is not a function, got "+(void 0===t?"undefined":o(t)));(0,a.default)(this.handlers,e)||(this.handlers[e]=[]),this.handlers[e].push(t)},e.prototype.off=function(e,t){if((0,a.default)(this.handlers,e)){var n=this.handlers[e];n.splice(n.indexOf(t),1)}},e.prototype.addEventListener=function(e,t){return this.on(e,t)},e.prototype.removeEventListener=function(e,t){return this.off(e,t)},e.prototype.emit=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.getHandlers(e),o=new Array(r.length);s("Emitting"+(n?" async":"")+' "'+e+'" event ('+(t?"with":"without")+" data) to "+r.length+" handler(s)");var i=Object.freeze({type:e,data:t,timestamp:Date.now()});return r.forEach(function(e,t){try{o[t]=e(i)}catch(e){o[t]=e}}),n?Promise.all(o):o},e}();t.default=u},function(e,t,n){"use strict";function r(){try{o||(o=Intl.DateTimeFormat().resolvedOptions().timeZone||null)}catch(e){}return o}t.__esModule=!0;var o=null;t.default=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;t.AggregateError="undefined"!=typeof globalThis&&globalThis.AggregateError||"undefined"!=typeof global&&global.AggregateError||"undefined"!=typeof window&&window.AggregateError||function(e){function t(n,i){r(this,t);var a=o(this,e.call(this,n));return a.name="AggregateError",a.errors=i,a}return i(t,e),t}(Error)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;t.GraphQLError=function(e){function t(n,i,a){r(this,t);var s=o(this,e.call(this,n));return s.name="GraphQLError",i&&(s.locations=i),a&&(s.path=a),s}return i(t,e),t}(Error)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(0),u=function(e){return e&&e.__esModule?e:{default:e}}(s),c=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.listConfigurations=function(){return this.client.request("reports.configurations")},t.prototype.create=function(e,t){return this.client.request("reports.create",a({report:e},t))},t}(u.default);t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(142),l=r(c),f=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.invitations=new l.default(n),r}return a(t,e),t}(u.default);t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(143),l=r(c),f=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.info=function(e){return this.client.request("teams.invitations.info",{invitationId:e}).then(function(e){return(new l.default).fromTeamInvitation(e.data)})},t.prototype.accept=function(e){return this.client.request("teams.invitations.accept",{invitationId:e}).then(function(){return null})},t.prototype.decline=function(e){return this.client.request("teams.invitations.decline",{invitationId:e}).then(function(){return null})},t}(u.default);t.default=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={name:"Name",logo:"Logo",teamId:"TeamId"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamInvitation=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.options=function(e){return this.client.request("printing.options",{proofId:e})},t.prototype.create=function(e){return this.client.request("printing.create",e)},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.requestTeam=function(e){return this.client.request("free-trial.request-team",e).then(function(e){return e.data})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=function(){function e(t){r(this,e),this.keyPairs=[],this.client=t}return e.prototype.addKeyPair=function(e){var t=this;return this.keyPairs.push(e),function(){return t.removeKeyPair(e)}},e.prototype.removeKeyPair=function(e){this.keyPairs.splice(this.keyPairs.indexOf(e),1)},e.prototype.getPrivateKeyPEMs=function(){return[this.client.session&&this.client.session.privateKeyPEM].concat(this.keyPairs.map(function(e){return e.privateKeyPEM})).filter(Boolean)},e.prototype.getPublicKeyPEMs=function(){return[this.client.session&&this.client.session.serverPublicKeyPEM,this.client.session&&this.client.session.publicKeyPEM].concat(this.keyPairs.map(function(e){return e.publicKeyPEM})).filter(Boolean)},e}();t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){return e.raw=t,e}t.__esModule=!0;var u=s(["\n fragment ChecklistTemplate on ChecklistTemplate {\n id\n state\n name\n description\n defaultIsRequiredForFinalApproval\n defaultShouldOpenOnProofLoad\n }\n"],["\n fragment ChecklistTemplate on ChecklistTemplate {\n id\n state\n name\n description\n defaultIsRequiredForFinalApproval\n defaultShouldOpenOnProofLoad\n }\n"]),c=s(["\n mutation sdk_ChecklistTemplates_create($input: CreateChecklistTemplateInput!) {\n createChecklistTemplate(input: $input) {\n ...ChecklistTemplate\n }\n }\n ","\n"],["\n mutation sdk_ChecklistTemplates_create($input: CreateChecklistTemplateInput!) {\n createChecklistTemplate(input: $input) {\n ...ChecklistTemplate\n }\n }\n ","\n"]),l=s(["\n mutation sdk_ChecklistTemplates_update($id: ID!, $input: UpdateChecklistTemplateInput!) {\n updateChecklistTemplate(id: $id, input: $input) {\n ...ChecklistTemplate\n }\n }\n ","\n"],["\n mutation sdk_ChecklistTemplates_update($id: ID!, $input: UpdateChecklistTemplateInput!) {\n updateChecklistTemplate(id: $id, input: $input) {\n ...ChecklistTemplate\n }\n }\n ","\n"]),f=s(["\n query sdk_ChecklistTemplates_list($states: [ChecklistTemplateState!]) {\n checklistTemplates(states: $states) {\n ...ChecklistTemplate\n }\n }\n ","\n"],["\n query sdk_ChecklistTemplates_list($states: [ChecklistTemplateState!]) {\n checklistTemplates(states: $states) {\n ...ChecklistTemplate\n }\n }\n ","\n"]),p=s(["\n query sdk_ChecklistTemplates_load($id: ID!) {\n checklistTemplate(id: $id) {\n ...ChecklistTemplate\n }\n }\n ","\n"],["\n query sdk_ChecklistTemplates_load($id: ID!) {\n checklistTemplate(id: $id) {\n ...ChecklistTemplate\n }\n }\n ","\n"]),d=n(0),h=r(d),m=n(44),y=n(148),v=r(y),_=(0,m.gql)(u),b=(0,m.gql)(c,_),w=(0,m.gql)(l,_),g=(0,m.gql)(f,_),E=(0,m.gql)(p,_),O=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.entities=new v.default(n),r}return a(t,e),t.prototype.create=function(e){return this.client.graphql(b,{input:e}).then(function(e){return e.data.createChecklistTemplate})},t.prototype.update=function(e,t){return this.client.graphql(w,{id:e,input:t}).then(function(e){return e.data.updateChecklistTemplate})},t.prototype.list=function(e){return this.client.graphql(g,e).then(function(e){return e.data.checklistTemplates})},t.prototype.load=function(e){return this.client.graphql(E,{id:e}).then(function(e){return e.data.checklistTemplate})},t}(h.default);t.default=O},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){return e.raw=t,e}t.__esModule=!0;var s=a(["\n fragment ChecklistTemplateEntity on ChecklistTemplateEntity {\n id\n name\n type\n description\n }\n"],["\n fragment ChecklistTemplateEntity on ChecklistTemplateEntity {\n id\n name\n type\n description\n }\n"]),u=a(["\n query sdk_ChecklistTemplatesEntities_list($checklistId: ID!) {\n checklistTemplate(id: $checklistId) {\n entities {\n ...ChecklistTemplateEntity\n ...on ChecklistTemplateEntityGroup {\n entities {\n ...ChecklistTemplateEntity\n ...on ChecklistTemplateEntityGroup {\n entities {\n ...ChecklistTemplateEntity\n ...on ChecklistTemplateEntityGroup {\n entities {\n ...ChecklistTemplateEntity\n ...on ChecklistTemplateEntityGroup {\n entities {\n ...ChecklistTemplateEntity\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n ","\n"],["\n query sdk_ChecklistTemplatesEntities_list($checklistId: ID!) {\n checklistTemplate(id: $checklistId) {\n entities {\n ...ChecklistTemplateEntity\n ...on ChecklistTemplateEntityGroup {\n entities {\n ...ChecklistTemplateEntity\n ...on ChecklistTemplateEntityGroup {\n entities {\n ...ChecklistTemplateEntity\n ...on ChecklistTemplateEntityGroup {\n entities {\n ...ChecklistTemplateEntity\n ...on ChecklistTemplateEntityGroup {\n entities {\n ...ChecklistTemplateEntity\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n ","\n"]),c=n(0),l=function(e){return e&&e.__esModule?e:{default:e}}(c),f=n(44),p=(0,f.gql)(s),d=(0,f.gql)(u,p),h=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.list=function(e){return this.client.graphql(d,{checklistId:e}).then(function(e){return e.data.checklistTemplate.entities})},t}(l.default);t.default=h},function(e,t,n){"use strict";function r(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,r)}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.ProofRole=t.Decision=t.Preference=t.FileCategory=t.ProofType=t.ReminderRelativeTo=t.ReminderAction=t.WorkflowUserState=t.WorkflowUserRole=t.WorkflowStepState=t.ResponseStatus=t.ProofStatus=t.ProofState=t.ImportProvider=t.FileStatus=t.FileAssignee=t.CommentState=void 0;var o=n(23),i=r(o),a=n(151),s=r(a),u=n(10),c=r(u),l=n(31),f=r(l),p=n(25),d=r(p),h=n(9),m=r(h),y=n(6),v=r(y),_=n(35),b=r(_),w=n(152),g=r(w),E=n(34),O=r(E),P=n(153),T=r(P),k=n(154),I=r(k),S=n(26),C=r(S),R=n(155),A=r(R),D=n(156),M=r(D),x=n(157),j=r(x),F=n(158),q=r(F);t.CommentState=i.default,t.FileAssignee=s.default,t.FileStatus=c.default,t.ImportProvider=f.default,t.ProofState=d.default,t.ProofStatus=m.default,t.ResponseStatus=v.default,t.WorkflowStepState=b.default,t.WorkflowUserRole=g.default,t.WorkflowUserState=O.default,t.ReminderAction=T.default,t.ReminderRelativeTo=I.default,t.ProofType=C.default,t.FileCategory=A.default,t.Preference=M.default,t.Decision=j.default,t.ProofRole=q.default},function(e,t,n){"use strict";t.__esModule=!0;var r={PROOF:"proof",ATTACHMENT:"attachment",SNAPSHOT:"snapshot"};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={VIEW_ONLY:"view-only",REVIEWER:"reviewer",MANDATORY:"mandatory",GATEKEEPER:"gatekeeper",APPROVER:"approver"};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={WORKFLOW_NUDGE_ALL:"nudge_all"};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={PROOF_DUE_DATE:"due_date"};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={STATIC:"static",VIDEO:"video",AUDIO:"audio",WEB:"web"};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={DEFAULT_DUE_DATE:"dueDate",DEFAULT_DUE_TIME:"dueTime",DEFAULT_MESSAGE_TO_REVIEWERS:"messageToReviewers",COLORS:"colors",DEFAULT_REMINDER:"proofReminders"};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={NO_DECISION:0,APPROVED:1,SEND_CHANGES:2,APPROVED_WITH_CHANGES:3};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={UNLISTED_REVIEWER:"unlisted-reviewer"};t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.WorkflowUser=t.WorkflowStep=t.Workflow=t.User=t.Session=t.ProofVersion=t.ProofGroup=t.Proof=t.File=t.Comment=void 0;var o=n(37),i=r(o),a=n(18),s=r(a),u=n(5),c=r(u),l=n(11),f=r(l),p=n(28),d=r(p),h=n(8),m=r(h),y=n(4),v=r(y),_=n(19),b=r(_),w=n(13),g=r(w),E=n(20),O=r(E);t.Comment=i.default,t.File=s.default,t.Proof=c.default,t.ProofGroup=f.default,t.ProofVersion=d.default,t.Session=m.default,t.User=v.default,t.Workflow=b.default,t.WorkflowStep=g.default,t.WorkflowUser=O.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return"string"==typeof e&&(e=(0,a.default)(e)),(0,c.default)(e)}t.__esModule=!0,t.pins=t.comments=void 0;var i=n(21),a=r(i),s=n(22),u=n(41),c=r(u),l=n(161),f=r(l),p=n(162),d=r(p),h=n(39),m=n(43);t.comments={parse:a.default,serialize:s.serialize,mentions:o,text:f.default,html:d.default},t.pins={parse:h.parsePins,serialize:m.serializePins}},function(e,t,n){"use strict";function r(e){return e.blocks.map(function(e){return e.value}).map(i.default).join("\n")}t.__esModule=!0;var o=n(45),i=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return{trusted:!0,value:e}}function i(e){return[].concat(e)}function a(e){return Object.keys(e).map(function(t){return t+": "+e[t]}).join("; ")}function s(e){var t=(0,h.default)(e);return u((0,l.default)(t,O))}function u(e){function t(e){e.forEach(function(e){e&&("string"==typeof e?n.push((0,y.default)(e)):!0===e.trusted?n.push(e.value):e.length&&t(e))})}var n=[];return t(e),n.join("")}t.__esModule=!0;var c=n(163),l=r(c),f=n(178),p=r(f),d=n(186),h=r(d),m=n(45),y=r(m),v={BOLD:{"font-weight":"bold"},ITALIC:{"font-style":"italic"},UNDERLINE:{"text-decoration":"underline"},STRIKETHROUGH:{"text-decoration":"line-through"},SUPERSCRIPT:{"font-size":"0.8em","vertical-align":"super"},SUBSCRIPT:{"font-size":"0.8em","vertical-align":"sub"}},_=function(e){var t=e.style,n=e.children;return[o('<span style="'+a(t)+'">'),i(n),o("</span>")]},b=function(e){return function(t){return[o("<"+e+">")].concat(t.map(function(e){return[o("<li>"),i(e),o("</li>")]}),[o("</"+e+">")])}},w={unstyled:function(e){return e.map(function(e){return[o("<div>"),i(e),o("<br /></div>")]})},"unordered-list-item":b("ul"),"ordered-list-item":b("ol")},g={mention:function(e,t){return[o('<span data-mention-user-id="'+t.mention.link+'">'),i(e),o("</span>")]}},E=[{strategy:p.default,component:function(e){var t=e.children;return[o('<a href="'+e.decoratedText+'" target="_blank" rel="noopener noreferrer">'),i(t),o("</a>")]}}],O={styles:(0,c.createStylesRenderer)(_,v),blocks:w,entities:g,decorators:E};t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeDecorator=t.renderNode=t.RawParser=t.createBlockRenderer=t.createStylesRenderer=void 0;var o=n(46),i=r(o),a=n(166),s=r(a),u=n(167),c=n(48),l=r(c),f=n(177),p=r(f);t.createStylesRenderer=s.default,t.createBlockRenderer=p.default,t.RawParser=i.default,t.renderNode=u.renderNode,t.CompositeDecorator=l.default,t.default=u.render},function(e,t,n){"use strict";function r(e){return Array.isArray(e)?e:Array.from(e)}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(165),u=function(e){return e&&e.__esModule?e:{default:e}}(s),c=function(){function e(t){i(this,e),this.content=t.content||[],this.start=void 0!==t.start?t.start:null,this.end=void 0!==t.end?t.end:null,this.entity=void 0!==t.entity?t.entity:null,this.decorator=void 0!==t.decorator?t.decorator:null,this.decoratorProps=t.decoratorProps||null,this.decoratedText=void 0!==t.decoratedText?t.decoratedText:null,this.contentState=t.contentState,this.style=t.style||null,this.styles=t.styles||null,this.block=t.block||{}}return a(e,[{key:"getCurrentContent",value:function(){return this.content[this.content.length-1]}},{key:"addToCurrentContent",value:function(e){this.content[this.content.length-1]=this.content[this.content.length-1]+e}},{key:"handleFlatPush",value:function(t,n){var r=this.getCurrentContent();if(r instanceof e&&(0,u.default)(n,r.styles))return void r.addToCurrentContent(t);var i=new e({styles:[].concat(o(n)),content:[t]});this.content.push(i)}},{key:"pushContent",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!n||n.length<1)return"string"==typeof t&&"string"==typeof this.getCurrentContent()?this.addToCurrentContent(t):this.content.push(t),this;if(o)return this.handleFlatPush(t,n),this;var i=r(n),a=i[0],s=i.slice(1),u=this.getCurrentContent();if(u instanceof e&&u.style===a)u.pushContent(t,s,o);else{var c=new e({style:a});c.pushContent(t,s,o),this.content.push(c)}return this}}]),e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return e.map(function(e){return t[e]}).reduce(function(e,t){var n={};if(void 0!==t){var r="text-decoration"in t?"text-decoration":"textDecoration";t[r]!==e[r]&&(n[r]=[e[r],t[r]].join(" ").trim())}return Object.assign(e,t,n)},{})},o=function(e,t){return function(n,o,i){var a=r(o,t);return e(Object.assign({},{children:n},i,{style:a}))}};t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.render=t.renderNode=void 0;var o=n(46),i=r(o),a=n(168),s=r(a),u=n(169),c=r(u),l=n(170),f=r(l),p=n(171),d=r(p),h=n(172),m=r(h),y=n(173),v=r(y),_=n(174),b=r(_),w=t.renderNode=function e(t,n,r,o,i,a,s){if(t.styles&&o)return o((0,d.default)(t.content,a),t.styles,{key:s()});var u=[],c=0;if(t.content.forEach(function(t){"string"==typeof t?u=(0,m.default)(t,u,c):(c+=1,u[c]=e(t,n,r,o,i,a,s),c+=1)}),t.style&&n[t.style])return n[t.style]((0,d.default)(u,a),{key:s()});if(null!==t.entity){var l=i[t.entity];if(l&&r[l.type])return r[l.type]((0,d.default)(u,a),l.data,{key:t.entity})}if(null!==t.decorator){var f=[t.block.key,t.start,0].join(".");return t.decorator(Object.assign({children:(0,d.default)(u,a),decoratedText:t.decoratedText,contentState:t.contentState,entityKey:t.entity,offsetKey:f,key:f},t.decoratorProps))}return u},g=function(e){var t=[],n=[],r=0,o=function(e){var o=r-e;for(n.length<o&&(o=n.length),o;o>0;o-=1){var i=t;t=n.pop(),t[t.length-1].children=i}};return e.forEach(function(e){r<e.depth?(n.push(t),t=[]):r>e.depth&&o(e.depth),r=e.depth,t.push(e)}),0!==r&&o(0),t},E=function(e,t,n,r,o){var i=r.prevType,a=r.prevDepth,s=r.prevKeys,u=r.prevData;if(0!==e.length){var c=t[i]||t[o.blockFallback];if(c){var l={depth:a,keys:s};return u&&u.some(function(e){return!!e})&&(l.data=u),void n.push(c(e,l))}n.push(e)}},O=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments[4],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},l=Object.assign({},v.default,u),p=[],h=[],m=null,y=0,_=[],b=[],g=!1,O=new i.default({flat:!!a});return t.forEach(function(t){if((0,c.default)(t,m,l))return void(!0===l.cleanup.split&&(g=!0));var i=O.parse(t),u=w(i,n,o,a,s,l,(0,f.default)());if((m&&m!==t.type||g)&&(E(h,r,p,{prevType:m,prevDepth:y,prevKeys:_,prevData:b},l),b=[],_=[],h=[],g=!1),t.children){var d=e(t.children,n,r,o,a,s,l);u.push(d)}h.push(u),m=t.type,y=t.depth,_.push(t.key),b.push(t.data)}),E(h,r,p,{prevType:m,prevDepth:y,prevKeys:_,prevData:b},l),(0,d.default)(p,l)};t.render=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||!Array.isArray(e.blocks))return(0,s.default)("invalid raw object"),null;if(!e.blocks.length)return null;var r=t.inline,o=t.blocks,i=t.entities,a=t.styles,u=t.decorators,c=u?(0,b.default)(e,u,n):e.blocks,l=g(c);return O(l,r,o,i,a,e.entityMap,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return!!(t.trim?e.trim():e)},o=function(e,t){return!!r(e.text,t)||(!(!e.data||!Object.keys(e.data).length)||!(!e.entityRanges||!e.entityRanges.length))},i=function(e,t,n){var r=n.cleanup;return!(!r||o(e,r))&&((!r.after||"all"===r.after||-1!==r.after.indexOf(t))&&(!(!r.except||-1!==r.except.indexOf(e.type))||!(!r.types||"all"!==r.types&&-1===r.types.indexOf(e.type))))};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){var e=0;return function(){var t=e;return e+=1,t}};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Array.isArray(e)&&t.joinOutput?e.join(""):e};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){var r=t;return t[n]?r[n]+=e:r[n]=e,r};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={joinOutput:!1,cleanup:{after:["atomic"],types:["unstyled"],trim:!1,split:!0},blockFallback:"unstyled"};t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(47),a=r(i),s=n(48),u=r(s),c=n(175),l=r(c),f=n(176),p=r(f),d=function(e,t){return e.forEach(function(e){var n=t.text.substring(0,e.offset),r=t.text.substring(e.offset,e.offset+e.length);e.offset=a.default.ucs2.decode(n).length,e.length=a.default.ucs2.decode(r).length}),e},h=function(e){return"function"==typeof e.getDecorations&&"function"==typeof e.getComponentForKey&&"function"==typeof e.getPropsForKey},m=function(e){var t=new u.default(e.filter(function(e){return!h(e)})),n=e.filter(function(e){return h(e)}),r=[].concat(o(n),[t]);return new l.default(r)},y=function(e,t,n,r){var o=r.createContentBlock,i=[],a=m(t),s=o?o(e):(0,p.default)(e),u=a.getDecorations(s,n),c=0;return u.forEach(function(e,t){if(!e)return void(c+=1);var r=t+1,o=u[r];o&&o===e||(i.push({offset:c,length:r-c,component:a.getComponentForKey(e),decoratorProps:a.getPropsForKey(e)||{},contentState:n}),c=r)}),Object.assign({},e,{decoratorRanges:d(i,e)})},v=function(e,t,n){var r=n.convertFromRaw&&n.convertFromRaw(e);return e.blocks.map(function(e){return y(e,t,r,n||{})})};t.default=v},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t){r(this,e),this.decorators=t}return o(e,[{key:"getDecorations",value:function(e,t){var n=new Array(e.getText().length).fill(null);return this.decorators.forEach(function(r,o){r.getDecorations(e,t).forEach(function(e,t){e&&(n[t]=o+"-"+e)})}),n}},{key:"getComponentForKey",value:function(t){return this.getDecoratorForKey(t).getComponentForKey(e.getInnerKey(t))}},{key:"getPropsForKey",value:function(t){return this.getDecoratorForKey(t).getPropsForKey(e.getInnerKey(t))}},{key:"getDecoratorForKey",value:function(e){var t=e.split("-"),n=Number(t[0]);return this.decorators[n]}}],[{key:"getInnerKey",value:function(e){return e.split("-").slice(1).join("-")}}]),e}();t.default=i},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t){r(this,e),Object.assign(this,t)}return o(e,[{key:"get",value:function(e){return this[e]}},{key:"getText",value:function(){return this.text}},{key:"getType",value:function(){return this.type}},{key:"getKey",value:function(){return this.key}},{key:"getLength",value:function(){return this.text.length}},{key:"getDepth",value:function(){return this.depth}},{key:"getData",value:function(){return this.data}}]),e}(),a=function(e){return new i(e)};t.default=a},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e,t){var n=e.keys;if(t)return t;if(n)return n.join(",")},i=function(e,t){return function(n,i,a){var s=Object.assign({},i),u=o(s,a);return delete s.depth,delete s.keys,t.apply(void 0,[e,Object.assign({},s,{key:u})].concat(r(n)))}},a=function(e,t,n){var r=n.children,o=n.props,a=n.key,s=i(t.wrapper,e),u=i(t.element,e);return s(r.map(function(e,t){return u(e,{depth:o.depth},o.keys&&o.keys[t])}),o,a)},s=function(e,t){var n={};return Object.keys(t).forEach(function(r){var o=t[r];if(o.wrapper)return void(n[r]=function(t,n,r){return a(e,o,{children:t,props:n,key:r})});n[r]=i(o.element,e)}),n};t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=n(179),i=r(o),a=n(185),s=r(a),u=(0,i.default)();u.tlds(s.default).set({fuzzyEmail:!1});var c=function(e,t){var n=u.match(e.get("text"));if(void 0!==n&&null!==n)for(var r=0;r<n.length;r+=1)t(n[r].index,n[r].lastIndex)};t.default=c},function(e,t,n){"use strict";function r(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function o(e){return Object.prototype.toString.call(e)}function i(e){return"[object String]"===o(e)}function a(e){return"[object Object]"===o(e)}function s(e){return"[object RegExp]"===o(e)}function u(e){return"[object Function]"===o(e)}function c(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function l(e){return Object.keys(e||{}).reduce(function(e,t){return e||_.hasOwnProperty(t)},!1)}function f(e){e.__index__=-1,e.__text_cache__=""}function p(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function d(){return function(e,t){t.normalize(e)}}function h(e){function t(e){return e.replace("%TLDS%",o.src_tlds)}function r(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}var o=e.re=n(180)(e.__opts__),l=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||l.push(w),l.push(o.src_xn),o.src_tlds=l.join("|"),o.email_fuzzy=RegExp(t(o.tpl_email_fuzzy),"i"),o.link_fuzzy=RegExp(t(o.tpl_link_fuzzy),"i"),o.link_no_ip_fuzzy=RegExp(t(o.tpl_link_no_ip_fuzzy),"i"),o.host_fuzzy_test=RegExp(t(o.tpl_host_fuzzy_test),"i");var h=[];e.__compiled__={},Object.keys(e.__schemas__).forEach(function(t){var n=e.__schemas__[t];if(null!==n){var o={validate:null,link:null};return e.__compiled__[t]=o,a(n)?(s(n.validate)?o.validate=p(n.validate):u(n.validate)?o.validate=n.validate:r(t,n),void(u(n.normalize)?o.normalize=n.normalize:n.normalize?r(t,n):o.normalize=d())):i(n)?void h.push(t):void r(t,n)}}),h.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[""]={validate:null,normalize:d()};var m=Object.keys(e.__compiled__).filter(function(t){return t.length>0&&e.__compiled__[t]}).map(c).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+o.src_ZPCc+"))("+m+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+o.src_ZPCc+"))("+m+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),f(e)}function m(e,t){var n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function y(e,t){var n=new m(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function v(e,t){if(!(this instanceof v))return new v(e,t);t||l(e)&&(t=e,e={}),this.__opts__=r({},_,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},b,e),this.__compiled__={},this.__tlds__=g,this.__tlds_replaced__=!1,this.re={},h(this)}var _={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},b={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]?0:t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},w="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",g="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");v.prototype.add=function(e,t){return this.__schemas__[e]=t,h(this),this},v.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},v.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,o,i,a,s,u;if(this.re.schema_test.test(e))for(s=this.re.schema_search,s.lastIndex=0;null!==(t=s.exec(e));)if(o=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||u<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=n.index+n[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(i=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=a)),this.__index__>=0},v.prototype.pretest=function(e){return this.re.pretest.test(e)},v.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},v.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(y(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(y(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},v.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse(),h(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,h(this),this)},v.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},v.prototype.onCompile=function(){},e.exports=v},function(e,t,n){"use strict";e.exports=function(e){var t={};t.src_Any=n(181).source,t.src_Cc=n(182).source,t.src_Z=n(183).source,t.src_P=n(184).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-(?!-)|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|[><|]|\\(|"+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E49\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t){e.exports=["aaa","aarp","abarth","abb","abbott","abbvie","abc","able","abogado","abudhabi","ac","academy","accenture","accountant","accountants","aco","active","actor","ad","adac","ads","adult","ae","aeg","aero","aetna","af","afamilycompany","afl","africa","ag","agakhan","agency","ai","aig","aigo","airbus","airforce","airtel","akdn","al","alfaromeo","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","am","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","ao","aol","apartments","app","apple","aq","aquarelle","ar","arab","aramco","archi","army","arpa","art","arte","as","asda","asia","associates","at","athleta","attorney","au","auction","audi","audible","audio","auspost","author","auto","autos","avianca","aw","aws","ax","axa","az","azure","ba","baby","baidu","banamex","bananarepublic","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bb","bbc","bbt","bbva","bcg","bcn","bd","be","beats","beauty","beer","bentley","berlin","best","bestbuy","bet","bf","bg","bh","bharti","bi","bible","bid","bike","bing","bingo","bio","biz","bj","black","blackfriday","blanco","blockbuster","blog","bloomberg","blue","bm","bms","bmw","bn","bnl","bnpparibas","bo","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","br","bradesco","bridgestone","broadway","broker","brother","brussels","bs","bt","budapest","bugatti","build","builders","business","buy","buzz","bv","bw","by","bz","bzh","ca","cab","cafe","cal","call","calvinklein","cam","camera","camp","cancerresearch","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","cartier","casa","case","caseih","cash","casino","cat","catering","catholic","cba","cbn","cbre","cbs","cc","cd","ceb","center","ceo","cern","cf","cfa","cfd","cg","ch","chanel","channel","chase","chat","cheap","chintai","christmas","chrome","chrysler","church","ci","cipriani","circle","cisco","citadel","citi","citic","city","cityeats","ck","cl","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","cm","cn","co","coach","codes","coffee","college","cologne","com","comcast","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cookingchannel","cool","coop","corsica","country","coupon","coupons","courses","cr","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","csc","cu","cuisinella","cv","cw","cx","cy","cymru","cyou","cz","dabur","dad","dance","data","date","dating","datsun","day","dclk","dds","de","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dj","dk","dm","dnp","do","docs","doctor","dodge","dog","doha","domains","dot","download","drive","dtv","dubai","duck","dunlop","duns","dupont","durban","dvag","dvr","dz","earth","eat","ec","eco","edeka","edu","education","ee","eg","email","emerck","energy","engineer","engineering","enterprises","epost","epson","equipment","er","ericsson","erni","es","esq","estate","esurance","et","etisalat","eu","eurovision","eus","events","everbank","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fi","fiat","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","fj","fk","flickr","flights","flir","florist","flowers","fly","fm","fo","foo","food","foodnetwork","football","ford","forex","forsale","forum","foundation","fox","fr","free","fresenius","frl","frogans","frontdoor","frontier","ftr","fujitsu","fujixerox","fun","fund","furniture","futbol","fyi","ga","gal","gallery","gallo","gallup","game","games","gap","garden","gb","gbiz","gd","gdn","ge","gea","gent","genting","george","gf","gg","ggee","gh","gi","gift","gifts","gives","giving","gl","glade","glass","gle","global","globo","gm","gmail","gmbh","gmo","gmx","gn","godaddy","gold","goldpoint","golf","goo","goodhands","goodyear","goog","google","gop","got","gov","gp","gq","gr","grainger","graphics","gratis","green","gripe","grocery","group","gs","gt","gu","guardian","gucci","guge","guide","guitars","guru","gw","gy","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hgtv","hiphop","hisamitsu","hitachi","hiv","hk","hkt","hm","hn","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","honeywell","horse","hospital","host","hosting","hot","hoteles","hotels","hotmail","house","how","hr","hsbc","ht","hu","hughes","hyatt","hyundai","ibm","icbc","ice","icu","id","ie","ieee","ifm","ikano","il","im","imamat","imdb","immo","immobilien","in","industries","infiniti","info","ing","ink","institute","insurance","insure","int","intel","international","intuit","investments","io","ipiranga","iq","ir","irish","is","iselect","ismaili","ist","istanbul","it","itau","itv","iveco","iwc","jaguar","java","jcb","jcp","je","jeep","jetzt","jewelry","jio","jlc","jll","jm","jmp","jnj","jo","jobs","joburg","jot","joy","jp","jpmorgan","jprs","juegos","juniper","kaufen","kddi","ke","kerryhotels","kerrylogistics","kerryproperties","kfh","kg","kh","ki","kia","kim","kinder","kindle","kitchen","kiwi","km","kn","koeln","komatsu","kosher","kp","kpmg","kpn","kr","krd","kred","kuokgroup","kw","ky","kyoto","kz","la","lacaixa","ladbrokes","lamborghini","lamer","lancaster","lancia","lancome","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lb","lc","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","li","liaison","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","linde","link","lipsy","live","living","lixil","lk","llc","loan","loans","locker","locus","loft","lol","london","lotte","lotto","love","lpl","lplfinancial","lr","ls","lt","ltd","ltda","lu","lundbeck","lupin","luxe","luxury","lv","ly","ma","macys","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","maserati","mattel","mba","mc","mckinsey","md","me","med","media","meet","melbourne","meme","memorial","men","menu","meo","merckmsd","metlife","mg","mh","miami","microsoft","mil","mini","mint","mit","mitsubishi","mk","ml","mlb","mls","mm","mma","mn","mo","mobi","mobile","mobily","moda","moe","moi","mom","monash","money","monster","mopar","mormon","mortgage","moscow","moto","motorcycles","mov","movie","movistar","mp","mq","mr","ms","msd","mt","mtn","mtr","mu","museum","mutual","mv","mw","mx","my","mz","na","nab","nadex","nagoya","name","nationwide","natura","navy","nba","nc","ne","nec","net","netbank","netflix","network","neustar","new","newholland","news","next","nextdirect","nexus","nf","nfl","ng","ngo","nhk","ni","nico","nike","nikon","ninja","nissan","nissay","nl","no","nokia","northwesternmutual","norton","now","nowruz","nowtv","np","nr","nra","nrw","ntt","nu","nyc","nz","obi","observer","off","office","okinawa","olayan","olayangroup","oldnavy","ollo","om","omega","one","ong","onl","online","onyourside","ooo","open","oracle","orange","org","organic","origins","osaka","otsuka","ott","ovh","pa","page","panasonic","panerai","paris","pars","partners","parts","party","passagens","pay","pccw","pe","pet","pf","pfizer","pg","ph","pharmacy","phd","philips","phone","photo","photography","photos","physio","piaget","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","pk","pl","place","play","playstation","plumbing","plus","pm","pn","pnc","pohl","poker","politie","porn","post","pr","pramerica","praxi","press","prime","pro","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","ps","pt","pub","pw","pwc","py","qa","qpon","quebec","quest","qvc","racing","radio","raid","re","read","realestate","realtor","realty","recipes","red","redstone","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","rightathome","ril","rio","rip","rmit","ro","rocher","rocks","rodeo","rogers","room","rs","rsvp","ru","rugby","ruhr","run","rw","rwe","ryukyu","sa","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sapo","sarl","sas","save","saxo","sb","sbi","sbs","sc","sca","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scjohnson","scor","scot","sd","se","search","seat","secure","security","seek","select","sener","services","ses","seven","sew","sex","sexy","sfr","sg","sh","shangrila","sharp","shaw","shell","shia","shiksha","shoes","shop","shopping","shouji","show","showtime","shriram","si","silk","sina","singles","site","sj","sk","ski","skin","sky","skype","sl","sling","sm","smart","smile","sn","sncf","so","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","space","spiegel","sport","spot","spreadbetting","sr","srl","srt","st","stada","staples","star","starhub","statebank","statefarm","statoil","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","su","sucks","supplies","supply","support","surf","surgery","suzuki","sv","swatch","swiftcover","swiss","sx","sy","sydney","symantec","systems","sz","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tc","tci","td","tdk","team","tech","technology","tel","telecity","telefonica","temasek","tennis","teva","tf","tg","th","thd","theater","theatre","tiaa","tickets","tienda","tiffany","tips","tires","tirol","tj","tjmaxx","tjx","tk","tkmaxx","tl","tm","tmall","tn","to","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","tr","trade","trading","training","travel","travelchannel","travelers","travelersinsurance","trust","trv","tt","tube","tui","tunes","tushu","tv","tvs","tw","tz","ua","ubank","ubs","uconnect","ug","uk","unicom","university","uno","uol","ups","us","uy","uz","va","vacations","vana","vanguard","vc","ve","vegas","ventures","verisign","versicherung","vet","vg","vi","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","vista","vistaprint","viva","vivo","vlaanderen","vn","vodka","volkswagen","volvo","vote","voting","voto","voyage","vu","vuelos","wales","walmart","walter","wang","wanggou","warman","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","wf","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","ws","wtc","wtf","xbox","xerox","xfinity","xihuan","xin","कॉम","セール","佛山","ಭಾರತ","慈善","集团","在线","한국","ଭାରତ","大众汽车","点看","คอม","ভাৰত","ভারত","八卦","موقع","বাংলা","公益","公司","香格里拉","网站","移动","我爱你","москва","қаз","католик","онлайн","сайт","联通","срб","бг","бел","קום","时尚","微博","淡马锡","ファッション","орг","नेट","ストア","삼성","சிங்கப்பூர்","商标","商店","商城","дети","мкд","ею","ポイント","新闻","工行","家電","كوم","中文网","中信","中国","中國","娱乐","谷歌","భారత్","ලංකා","電訊盈科","购物","クラウド","ભારત","通販","भारतम्","भारत","भारोत","网店","संगठन","餐厅","网络","ком","укр","香港","诺基亚","食品","飞利浦","台湾","台灣","手表","手机","мон","الجزائر","عمان","ارامكو","ایران","العليان","اتصالات","امارات","بازار","پاکستان","الاردن","موبايلي","بارت","بھارت","المغرب","ابوظبي","السعودية","ڀارت","كاثوليك","سودان","همراه","عراق","مليسيا","澳門","닷컴","政府","شبكة","بيتك","عرب","გე","机构","组织机构","健康","ไทย","سورية","招聘","рус","рф","珠宝","تونس","大拿","みんな","グーグル","ελ","世界","書籍","ഭാരതം","ਭਾਰਤ","网址","닷넷","コム","天主教","游戏","vermögensberater","vermögensberatung","企业","信息","嘉里大酒店","嘉里","مصر","قطر","广东","இலங்கை","இந்தியா","հայ","新加坡","فلسطين","政务","xperia","xxx","xyz","yachts","yahoo","yamaxun","yandex","ye","yodobashi","yoga","yokohama","you","youtube","yt","yun","za","zappos","zara","zero","zip","zippo","zm","zone","zuerich","zw"]},function(e,t,n){"use strict";function r(){return(0,s.default)(a.lower+a.upper+a.numbers,6)}function o(e){var t=0,n={},o=[];return e.blocks.forEach(function(e){var i=[],a=[];e.entities.forEach(function(r){var o=t++,i=e.value.substr(r.index,r.length);switch(r.type){case"mention":n[o]={type:"mention",mutability:"IMMUTABLE",data:{mention:{link:r.metadata.id,name:i}}};break;default:return}a.push({key:o,offset:r.index,length:r.length})}),e.styles.forEach(function(e){var t=u[e.type];t&&i.push({style:t,offset:e.index,length:e.length})}),o.push({key:r(),type:"text"===e.type?"unstyled":e.type,text:e.value,inlineStyleRanges:i,entityRanges:a,data:{},depth:0})}),{blocks:o,entityMap:n}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(42),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(){return Object.keys({italic:!0,bold:!0,underline:!0,strikethrough:!0,superscript:!0,subscript:!0}).reduce(function(e,t){var n;return i({},e,(n={},n[t]=t.toUpperCase(),n[t.toUpperCase()]=t,n))},{})}();t.default=o}])});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.PageProof=t():e.PageProof=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=48)}([function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=function e(t){r(this,e),this.client=t};t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){var r=[],o={};return Array.isArray(t)?(r=t,t.forEach(function(e){o[e]=e})):(0,m.default)(t)&&(r=Object.keys(t),o=t),r.forEach(function(t){var r=o[t],i=void 0;if("string"==typeof r)i=-1!==r.indexOf(".")?function(){for(var e=r.split("."),t=n,o=0;o<e.length;o++){var i=e[o];if(!(0,v.default)(t,i)){t=void 0;break}t=t[i]}return t}:function(){return n[r]};else{if("function"!=typeof r){if(null===r)return;throw new Error("Unknown transformer.")}i=r}var a=i.call(e,n);void 0!==a&&(e[t]=a)}),e}function i(e){return function(t){return Number(t[e])}}function a(e,t){return function(n){return t[n[e]]}}function s(e){return function(t){var n=t[e];if(n&&"0001-01-01T00:00:00"!==n)return"number"==typeof n?new Date(1e3*n):n.endsWith("Z")?new Date(n):new Date(n+"Z")}}function u(e){return function(t){var n=String(t[e]);return"1"===n||"true"===n}}function c(e){return function(t){return v.default.call(t,e)}}function l(e,t){return function(n){return n[e]?n[e].map(t):[]}}function f(e,t){return function(n){return n[e]?JSON.parse(n[e]):Array.isArray(t)?[].concat(t):d({},t)}}function p(e){return function(t){return t[e]?t[e]:void 0}}t.__esModule=!0;var d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.number=i,t.enumeration=a,t.date=s,t.truthy=u,t.exists=c,t.each=l,t.json=f,t.optional=p;var h=n(13),m=r(h),y=n(6),v=r(y);t.default=o},function(e,t,n){"use strict";function r(){if("function"==typeof r.driver){return new(0,r.driver)}if("string"==typeof r.driver){var e=void 0;switch(r.driver){case"Blob":e=n(82).default;break;case"Buffer":e=n(83).default;break;case"String":e=n(84).default;break;case"Uint8Array":e=n(86).default;break;default:throw new Error('Unknown Bluffer driver "'+r.driver+'".')}if(e)return new e;throw new Error('Bluffer driver "'+r.driver+'" not found.')}throw new Error('Bluffer.driver must be either "Blob", "Bluffer", "Uint8Array" (experimental), or "String" or a custom constructor.')}t.__esModule=!0;var o=n(16)("bluffer");r.driver="String","undefined"!=typeof Blob?r.driver="Blob":(o("The current JavaScript environment does not support native Bluffer, falling back to using StringBluffer."),r.driver="String"),t.default=r},function(e,t,n){"use strict";t.__esModule=!0;t.TOKEN_HEADER="x-authorization-token",t.HMAC_HEADER="x-authorization-hmac",t.TIMESTAMP_HEADER="x-timestamp",t.DEVICE_ID_HEADER="x-device-id",t.SUBSCRIPTION_KEY_HEADER="ocp-apim-subscription-key",t.LOCAL_ENCODED_METADATA_HEADER="x-p-lem",t.SDK_VERSION_HEADER="x-pageproof-javascript-sdk",t.RETRY_AFTER_HEADER="retry-after",t.BYTES_PER_BLOCK=2097152,t.MENTION_REGEX=/@{(U[a-zA-Z0-9]{15}|~everyone)}{(.*?)}/,t.COMMENT_LABEL_REGEX=/^(approved|highlight):/i,t.ISO_REGEX=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/,t.DEFAULT_ISO_DATE="0001-01-01T00:00:00",t.DAY_IN_MS=864e5,t.COMMENT_CACHE_PREFIX="comment",t.THUMBNAIL_CACHE_PREFIX="thumbnail",t.PREVIEW_CACHE_PREFIX="preview",t.BRIAN_USER_ID="__brian__",t.BRIAN_TOKEN_HEADER="x-authorization-apitoken",t.BRIAN_HMAC_HEADER="x-authorization-api_hmac",t.VIDEO_CREDENTIALS_CACHE_PREFIX="video-credentials-json-"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={id:"UserId",name:"Name",email:"Email",hasActivated:"Activated",hasRegistered:"IsRegistered",hasAvatar:"HasAvatar",accountType:"AccountType",teamType:"TeamType",teamLogo:"Branding.LogoURL",registeredDate:(0,o.date)("Registered"),lastLoginDate:(0,o.date)("LastLogin"),lastUploadDate:(0,o.date)("LastUpload"),isAdmin:"IsDomainAdmin",features:"Features",teamId:"DomainId",hasTOTP:"TotpEnabled"},s=function(){function e(){r(this,e)}return e.prototype.fromJSON=function(e){return(0,i.default)(this,Object.keys(a),e),this},e.prototype.fromUser=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(){return this.dueDate&&this.dueDate.getTime()<Date.now()}t.__esModule=!0;var a=n(1),s=r(a),u=n(24),c=r(u),l=n(8),f=r(l),p=n(25),d=r(p),h=n(9),m=r(h),y=n(26),v=n(65),_=r(v),b=n(4),w=r(b),g=n(66),E=r(g),O=n(67),T=r(O),P=n(68),k=r(P),I={id:"ProofId",name:"Title",status:"Status",workflowId:"WorkflowId",proofTemplateId:"ProofTemplateId",version:"Version",dueDate:(0,a.date)("DueDate"),createdDate:(0,a.date)("CreateDate"),approvedDate:(0,a.date)("ApprovedDate"),isLocked:"Locked",isArchived:"Closed",isOverdue:i,uploaderUserId:"UserId",ownerUserIds:"OwnerIds",editorUserId:"EditorId",editorUserIds:"EditorIds",lockerUserId:"ProofLockerId",messageToReviewers:"Description",messageToOwners:"OwnerMessage",messageToEditor:"EditorMessage",fileId:"FileId",fileExtension:"Extension",fileStatus:"FileStatus",fileMessage:"FileStatusMessage",fileSize:"FileSize",pageCount:(0,a.number)("Pages"),commentCount:(0,a.number)("ParentComments"),canDownload:(0,a.truthy)("DownloadOriginal"),type:"Type",processStatus:"ProcessStatus",recipient:"Recipient",recipientEmail:"RecipientEmail",todoCommentCount:(0,a.number)("CountTodoComments"),doneCommentCount:(0,a.number)("CountDoneComments"),fileCategory:"FileCategory",isAdminOnProof:"IsAdminOnProof",groupId:"GroupId",canReupload:"CanReupload",hasEditors:"HasEditors",groupName:"GroupName",role:"Role",canOthersEditComments:"FeatureEditComments",canAddCommentReplies:"FeatureCanAddCommentReplies",canHaveGeneralComments:"FeatureGeneralComments",canHavePrivateComments:"FeaturePrivateComments",canAddChecklist:"FeatureCanAddChecklist",hasDecisionsEnabled:"FeatureDecisions",hasColorSeparations:"HasColorSeparations",reference:"Reference",integrationReferences:(0,a.each)("IntegrationReferences",function(e){return(new T.default).fromProofIntegrationReference(e)}),checklist:function(e){return e.Checklist&&(new k.default).fromProofChecklist(e.Checklist)},isReferenceEnabled:"FeatureProofReference",source:"Source",owners:(0,a.each)("Owners",function(e){return(new w.default).fromUser(e)}),decisionSummary:(0,a.each)("Decisions",function(e){return(new E.default).fromDecisionSummary(e)}),tags:(0,a.each)("Tags",function(e){return e.Value}),teamId:"TeamId",isPublic:"IsPublic",canBePublic:"FeaturePublicProofs",availableWorkflowRoles:"FeatureAvailableWorkflowRoles",usePreviousVersionDueDate:"FeatureUsePreviousVersionDueDate",canSendShareLink:"FeatureSendShareLink",publicProofKeyPair:function(e){return e.PublicProofKeyPair&&{publicKeyPEM:e.PublicProofKeyPair.PublicKey,privateKeyPEM:e.PublicProofKeyPair.PrivateKey}},canSendMessageToOwners:"FeatureMessageToOwners",workflowMetrics:"WorkflowMetrics",commentVisibility:"CommentVisibility",canHaveCommentVisibility:"FeatureCommentVisibility",importUrl:"ImportURL",priority:"Priority"},C=function(){function e(){o(this,e)}return e.prototype.isUserAdminOfProofTeam=function(e){return e.isAdmin&&this.teamId===e.teamId},e.prototype.getState=function(){var e=c.default.ACTIVE;if(this.fileStatus===m.default.UPLOADING)e=c.default.UPLOADING;else if(this.hasFileError())e=c.default.FILE_ERROR;else if(this.isProcessing())e=c.default.PROCESSING;else if(this.type===d.default.BRIEF)switch(this.status){case f.default.NEW:e=c.default.SETUP_NEEDED;break;case f.default.PROOFING:e=c.default.BRIEFING;break;case f.default.AWAITING_NEW_VERSION:e=c.default.AWAITING_PROOF;break;case f.default.HAS_NEW_VERSION:e=c.default.HAS_NEW_VERSION;break;case f.default.ARCHIVED:e=c.default.ARCHIVED}else this.status===f.default.ARCHIVED?e=c.default.ARCHIVED:this.status===f.default.TODOS_REQUESTED?e=c.default.TODOS_REQUESTED:this.status===f.default.AWAITING_NEW_VERSION?e=c.default.AWAITING_NEW_VERSION:this.status===f.default.HAS_NEW_VERSION?e=c.default.HAS_NEW_VERSION:this.status===f.default.APPROVED?e=c.default.APPROVED:this.hasWorkflow()?this.hasWorkflowStarted()?this.isOverdue&&(e=c.default.OVERDUE):e=c.default.NOT_STARTED:e=c.default.PROOFERS_NEEDED;return e},e.prototype.getVideoProcessingProgress=function(){var e=0,t=String(this.fileMessage);if(t){var n=/^Thumb-\w+\-([-+]?[0-9]*\.?[0-9]*)/g.exec(t),r=/^Video-\w+\-([-+]?[0-9]*\.?[0-9]*)/g.exec(t);t.startsWith("Video-Scheduled-")?e=0:r?e=(0,_.default)(parseFloat(r[1])/100,0,.2):n&&(e=(0,_.default)(parseFloat(n[1])/100,.8,0))}return e},e.prototype.hasWorkflowStarted=function(){return this.hasWorkflow()&&this.status!==f.default.NEW},e.prototype.isProcessing=function(){return this.fileStatus===m.default.UPLOADING||this.fileStatus===m.default.QUEUED||this.fileStatus===m.default.RIPPING},e.prototype.isAwaitingFile=function(){return this.source&&this.fileStatus===m.default.CREATED},e.prototype.getProcessingProgress=function(){switch(this.fileStatus){case m.default.UPLOADING:return.1;case m.default.QUEUED:return.2;case m.default.RIPPING:return"video"===this.fileCategory?(0,_.default)(this.getVideoProcessingProgress(),.2,.1).toFixed(2):.6;default:return-1}},e.prototype.hasWorkflow=function(){return(0,y.isWorkflowId)(this.workflowId)},e.prototype.hasFile=function(){return(0,y.isFileId)(this.fileId)},e.prototype.hasFileError=function(){return this.fileStatus===m.default.ERROR||!this.fileStatus||!this.hasFile()},e.prototype.hasEditor=function(){return(0,y.isUserId)(this.editorUserId)},e.prototype.hasThumbnail=function(){return this.fileStatus===m.default.OK},e.prototype.canUserUploadNewVersion=function(e){return this.getState()===c.default.AWAITING_NEW_VERSION&&(this.isEditor(e)||this.isOwner(e))||this.getState()===c.default.AWAITING_PROOF&&(this.isEditor(e)||this.isRecipient(e))},e.prototype.isOwner=function(e){return-1!==this.ownerUserIds.indexOf(e)},e.prototype.isEditor=function(e){return-1!==this.editorUserIds.indexOf(e)},e.prototype.isRecipient=function(e){return this.recipient===e},e.prototype.calculateState=function(){this.state=this.getState()},e.prototype.fromProof=function(e){return(0,s.default)(this,I,e),this.calculateState(),this},e}();t.default=C},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(1),a=r(i),s=n(4),u=r(s),c=n(3),l={userId:"UserId",token:"Token",sharedKey:"SharedKey",privateKeyPEM$:"PrivateKey",privateKeyPEM:null,publicKeyPEM:"PublicKey",serverPublicKeyPEM:"PublicServerKey",redirectUrl:"RedirectURL"},f=function(){function e(){o(this,e)}return e.prototype.fromJSON=function(e){return(0,a.default)(this,Object.keys(l),e),this.user=(new u.default).fromJSON(e.user),this},e.prototype.fromSession=function(e){return(0,a.default)(this,l,e),this.user=(new u.default).fromUser(e),this},e.prototype.fromBrian=function(e){return this.userId=c.BRIAN_USER_ID,this.token=e.token,this.sharedKey=e.sharedKey,this.origin=e.origin,this},e}();t.default=f},function(e,t,n){"use strict";t.__esModule=!0;var r={NEW:0,PROOFING:10,FINAL_APPROVING:30,TODOS_REQUESTED:50,AWAITING_NEW_VERSION:60,HAS_NEW_VERSION:66,APPROVED:70,ARCHIVED:100};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={CREATED:"Created",OK:"OK",UPLOADING:"Uploading",QUEUED:"Queued",RIPPING:"Ripping",ERROR:"Error"};t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(1),a=r(i),s=n(5),u=r(s),c={canAddProofs:"CanAddProofs",id:"GroupId",name:"Name",description:"Description",isEmpty:"IsEmpty",isArchived:"Archived",teamId:"TeamId",createdBy:"CreatedBy",isOwnedByTeam:"OwnedByTeam",folder:function(e){return null!==e.FolderName?{name:e.FolderName}:null},proofs:(0,i.each)("ProofInfo",function(e){return(new u.default).fromProof(e)})},l=function(){function e(){o(this,e)}return e.prototype.isUserAdminOfGroupTeam=function(e){return e.isAdmin&&this.teamId===e.teamId},e.prototype.fromProofGroup=function(e){return(0,a.default)(this,c,e),this},e}();t.default=l},function(e,t,n){"use strict";t.__esModule=!0;var r="undefined"!=typeof window?window.URL:global.URL||global.require("url").URL;t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(1),a=r(i),s=n(20),u=r(s),c=n(34),l=r(c),f={id:"StepId",name:"Title",position:(0,i.number)("Position"),dueDate:(0,i.date)("DueDate"),visibleDate:(0,i.date)("VisibleDate"),completeDate:(0,i.date)("CompleteDate"),mandatoryDecisionThreshold:"MandatoryDecisionThreshold",state:function(e){return e.Complete?l.default.COMPLETE:e.Visible?l.default.VISIBLE:l.default.NOT_VISIBLE},users:(0,i.each)("Users",function(e,t){var n=(new u.default).fromWorkflowUser(e);return n._calculateState(e,t),n})},p=function(){function e(){o(this,e)}return e.prototype.fromWorkflowStep=function(e){return(0,a.default)(this,f,e),this},e}();t.default=p},function(e,t,n){"use strict";t.__esModule=!0;var r=n(58),o=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(e){return"[object Object]"===(0,o.default)(e)}},function(e,t,n){"use strict";t.__esModule=!0;var r=void 0;r="597.0.1754345488058",t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={ERROR_CRITICAL:3,OK:200,ERROR_INVALID:201,ERROR_NO_ACCESS:100,ERROR_NO_ACCESS_WRITE:101,ERROR_RESTRICTED:102,ERROR_SQL_ERROR:105,ERROR_OUT_SYNC:106,ERROR_STORAGE_ERROR:110,ERROR_QUEUE_ERROR:111,ERROR_SQL_DEADLOCK_ERROR:121,ERROR_BAD_REQUEST:400,ERROR_UNAUTHORISED:401,ERROR_MEDIA_PERMISSION_NO_ACCESS:402,ERROR_NOT_FOUND:1e3,ERROR_CREATE:1001,ERROR_UPDATE:1002,ERROR_DELETE:1003,ERROR_EXISTS:1004,ERROR_USER_INVALID_LOGIN:1010,ERROR_USER_INVALID_PASSWORD:1011,ERROR_USER_IS_REGISTERED:1012,ERROR_USER_INVALID_EMAIL:1013,ERROR_USER_INVALID_LOGIN_COUNT:1014,ERROR_USER_DISABLED:1015,ERROR_BAD_REQUEST_DATE:201,ERROR_THROTTLED:429,ERROR_REUSED_CREATION_TOKEN:2011,ERROR_UPGRADE_REQUIRED:3e3,ERROR_VISIBLE_WORKFLOW_USERS_EXIST:3001,ERROR_GROUP_EXISTS:3002,ERROR_GROUP_PROOFS_EXIST:3003};t.default=r},function(e,t,n){"use strict";e.exports=function e(){return e}},function(e,t,n){"use strict";function r(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return t}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={id:"FileId",name:"Name",blocks:"Chunks",size:"Size",downloadable:"Downloadable",assignedTo:"AssignedTo",assignedType:"AssignedType",status:"Status",message:"Message",adobeExportData:function(e){var t=e.AdobeExportData;if(t&&t.length)try{return JSON.parse(t)}catch(e){}return null},sourceMetadata:function(e){var t=e.SourceMetadata;if(t&&t.length)try{return JSON.parse(t)}catch(e){}return null},importUrl:"ImportURL"},s={id:"FileId",name:"Name",blocks:"Chunks",assignedTo:"CommentId",assignedType:function(){return"attachment"},status:"Status",message:function(){return""}},u=function(){function e(){r(this,e)}return e.prototype.fromFile=function(e){return(0,i.default)(this,a,e),this},e.prototype.fromCommentAttachment=function(e){return(0,i.default)(this,s,e),this},e}();t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(1),a=r(i),s=n(12),u=r(s),c={id:"WorkflowId",name:"Title",isOwnedByTeam:"OwnedByTeam",teamId:"TeamId",ownerId:"UserId",startFrom:"StartFrom",isFavorite:"IsFavorite",availableRoles:"AvailableRoles",steps:(0,i.each)("WorkflowSteps",function(e){return(new u.default).fromWorkflowStep(e)})},l=function(){function e(){o(this,e)}return e.prototype.getStepByPosition=function(e){for(var t=this.steps.length,n=0;n<t;n+=1){var r=this.steps[n];if(r.position===e)return r}return null},e.prototype.getOrderedSteps=function(){return this.steps.sort(function(e,t){return e.position<t.position?-1:e.position>t.position?1:0})},e.prototype.getApproverStep=function(){return this.getStepByPosition(1e3)},e.prototype.fromWorkflow=function(e){return(0,a.default)(this,c,e),this},e}();t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(1),u=r(s),c=n(4),l=r(c),f=n(33),p=r(f),d={id:"UserId",name:"Name",email:"Email",hasAvatar:"HasAvatar",hasRegistered:"IsRegistered",role:"Role",permissions:function(e){return{inviter:e.IsInviter}},firstViewedDate:(0,s.date)("FirstViewedDate"),nudgedDate:(0,s.date)("NudgedInStep"),decisionDate:(0,s.date)("DecisionDate"),decisionId:"Decision"},h=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype._calculateState=function(e,t){e.SkippedInStep?this.state=p.default.SKIPPED:e.CompleteInStep?this.state=p.default.FINISHED:e.ViewedInStep?this.state=p.default.SEEN:t.Visible?this.state=p.default.VISIBLE:this.state=p.default.NOT_VISIBLE},t.prototype.fromWorkflowUser=function(e){return this._calculateState({},{}),(0,u.default)(this,d,e),this},t}(l.default);t.default=h},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function o(e){if(0===e.indexOf(d)){var t=e.substring(d.length,e.indexOf(h));return parseInt(t,10)}if(e.match(f))try{return JSON.parse(e)[p]}catch(e){}return 1}function i(e){var t=o(e),n=l[t];if(n)return n(e);throw new Error("Unsupported comment schema version. Please update to a newer version of the SDK.")}t.__esModule=!0,t.getVersionNumber=void 0;var a=n(126),s=r(a),u=n(22),c=r(u),l={2:c.parse,1:s.parse},f=/^\s*{/,p="_",d='{"_":',h=",";t.default=i,t.getVersionNumber=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(Array.isArray(e))return e.map(function(e){return o(e,t)});if((0,f.default)(e)){var n={};for(var r in e)(0,c.default)(e,r)&&t[r]&&(n[t[r]]=o(e[r],t));return n}return e}function i(e){return o(JSON.parse(e),p)}function a(e){var t=o(s({version:2},e),d);return JSON.stringify(t)}t.__esModule=!0,t.serialize=t.parse=void 0;var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(6),c=r(u),l=n(13),f=r(l),p={_:"version",bs:"blocks",t:"type",v:"value",i:"index",l:"length",st:"styles",en:"entities",md:"metadata",i_:"id",lb:"label",ur:"url"},d={};for(var h in p)(0,c.default)(p,h)&&(d[p[h]]=h);t.parse=i,t.serialize=a},function(e,t,n){"use strict";t.__esModule=!0;var r={TODO:"todo",DONE:"done",UNMARKED:"unmarked"};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={UPLOADING:"uploading",FILE_ERROR:"file-error",PROCESSING:"processing",ARCHIVED:"archived",PROOFERS_NEEDED:"proofers-needed",TODOS_REQUESTED:"todos-requested",AWAITING_NEW_VERSION:"awaiting-new-version",HAS_NEW_VERSION:"has-new-version",APPROVED:"approved",NOT_STARTED:"not-started",OVERDUE:"overdue",ACTIVE:"active",SETUP_NEEDED:"setup-needed",BRIEFING:"briefing",AWAITING_PROOF:"awaiting-proof"};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={PROOF:1,BRIEF:2};t.default=r},function(e,t,n){"use strict";var r={Proof:"P",Workflow:"W",File:"F",User:"U",Brief:"B"},o={};Object.keys(r).forEach(function(e){o["is"+e+"Id"]=function(t){return t&&16===t.length&&t[0]===r[e]}}),e.exports=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={id:"ProofId",version:"Version",canDelete:"CanDelete"},s=function(){function e(){r(this,e)}return e.prototype.fromProofVersion=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){return o(function(t){return t[e]},t)}function o(e,t){var n=t?1:-1,r=t?-1:1;return function(t,o){var i=e(t),a=e(o);return i<a?n:i>a?r:0}}function i(e,t){var n={};t.forEach(function(e,t){n[e]=t});var r="function"==typeof e?e:function(t){return t[e]};return function(e,t){var o=n[r(e)],i=n[r(t)];return o<i?-1:o>i?1:0}}function a(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.length;return function(e,n){for(var o=0;o<r;o++){var i=t[o](e,n);if(i)return i}return 0}}t.__esModule=!0,t.sortObjectsByKey=r,t.sortObjectsBy=o,t.sortObjectsByValues=i,t.combineSort=a},function(e,t,n){"use strict";function r(e){return String.fromCharCode.apply(null,new Uint8Array(e))}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={NONE:"none",GOOGLE_DRIVE:"drive",DROPBOX:"dropbox",ONEDRIVE:"onedrive",BOX:"box",CANVA:"canva",WEBSITE:"website"};t.default=r},function(e,t,n){"use strict";function r(e,t){var n=void 0;return function(){n||(n=setTimeout(function(){e(),n=null},t))}}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t,n){return new Promise(function(r,o){setTimeout(function(){void 0!==n?o(n):r(t)},e)})}},function(e,t,n){"use strict";t.__esModule=!0;var r={NONE:null,NOT_VISIBLE:"not-visible",VISIBLE:"visible",SEEN:"seen",SKIPPED:"skipped",FINISHED:"finished"};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={NONE:null,NOT_VISIBLE:"not-visible",VISIBLE:"visible",COMPLETE:"complete"};t.default=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(0),u=function(e){return e&&e.__esModule?e:{default:e}}(s),c=function(e){function t(n,i){r(this,t);var a=o(this,e.call(this,n));return a.level=i,a}return i(t,e),t.prototype.configurations=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.client.request("integrations.get-configurations",{level:this.level,integration_keys:e.join(",")}).then(function(e){return e.data?e.data.integrations:null})},t.prototype.getSetupUrl=function(e,t){return this.client.request("integrations.get-setup-url",{params:a({},t,{integration_key:e,level:this.level})}).then(function(e){return{url:e.data.url,windowFeatures:e.data.windowFeatures}})},t.prototype.disable=function(e){return this.client.request("integrations.disable",{level:this.level,integration_key:e})},t.prototype.updateConfiguration=function(e,t,n){return this.client.request("integrations.update-configuration",{level:this.level,integrationKey:e,key:t,value:n})},t}(u.default);t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(1),s=r(a),u=n(4),c=r(u),l=n(18),f=r(l),p=n(21),d=r(p),h=n(37),m=r(h),y=n(38),v={id:"CommentId",proofId:"ProofId",pins:function(e){return(0,y.parsePins)(e.XY).map(function(t,n){return 0===n&&e.BoxFillType?i({},t,{fill:e.BoxFillType&&{type:e.BoxFillType,image:e.BoxFillImage}}):t})},pin:function(){return this.pins[0]},user:function(e){return(new c.default).fromUser(e)},comment$:"EncryptedComment",envelope:"Envelope",attachments:function(e){return e.Attachments?e.Attachments.map(function(t){return(new f.default).fromCommentAttachment(i({CommentId:e.CommentId},t))}):[]},agreeCount:function(e){return e.Agrees.length},pageNumber:(0,a.number)("Page"),mediaTime:function(){return this.pin&&this.pin.time},mediaDuration:function(){return this.pin&&this.pin.duration},createdDate:(0,a.date)("Timestamp"),updatedDate:(0,a.date)("Updated"),parentCommentId:(0,a.optional)("Parent"),metadata:(0,a.json)("Metadata",{}),sourceMetadata:"SourceMetadata",state:function(e){return(0,m.default)(e)},isPrivate:"Private"},_=function(){function e(){o(this,e)}return e.prototype.fromComment=function(e){return(0,s.default)(this,v,e),this},e.prototype.fromRawComment=function(e){var t=(0,d.default)(e);return this.raw=e,this.tokens=t,this},e}();t.default=_},function(e,t,n){"use strict";function r(e){return+e.Done?i.default.DONE:+e.Change?i.default.TODO:i.default.UNMARKED}t.__esModule=!0;var o=n(23),i=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r},function(e,t,n){"use strict";function r(e){if("{"===e[0]){var t=JSON.parse(e);return t.pins?[3,t.pins]:[2,t]}return-1!==e.indexOf(",")?[1,e]:[null]}function o(e){var t=e.split(",").map(function(e){return parseFloat(e)}),n=t[0],r=t[1];return[c({x:n,y:r})]}function i(e){return[c(e)]}function a(e){return e.map(c)}function s(e){if(null==e)return[];var t=[],n=r(e),s=n[0],u=n[1];switch(s){case 3:t=a(u);break;case 2:t=i(u);break;case 1:t=o(u)}return t}t.__esModule=!0,t.parsePins=s;var u=n(39),c=function(e){return{x:(0,u.withinPinBounds)((0,u.numberOrNull)(e.x)),y:(0,u.withinPinBounds)((0,u.numberOrNull)(e.y)),x2:(0,u.withinPinBounds)((0,u.numberOrNull)(e.x2)),y2:(0,u.withinPinBounds)((0,u.numberOrNull)(e.y2)),time:(0,u.numberOrNull)(e.time),duration:(0,u.numberOrNull)(e.duration)}}},function(e,t,n){"use strict";function r(e){return o(e)?e:null}function o(e){return"number"==typeof e&&!isNaN(e)}function i(e){return o(e)?Math.max(-.5,Math.min(.5,e)):e}t.__esModule=!0,t.numberOrNull=r,t.isFiniteNumber=o,t.withinPinBounds=i},function(e,t,n){"use strict";function r(e){var t=[];return e.blocks.forEach(function(e){e.entities.forEach(function(e){if("mention"===e.type){var n=e.metadata.id;-1===t.indexOf(n)&&t.push(n)}})}),t}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";function r(e,t){for(var n=new Array(t),r=t;r>0;--r)n[r]=e[Math.round(Math.random()*(e.length-1))];return n.join("")}t.__esModule=!0;t.lower="abcdefghijklmnopqrstuvwxyz",t.upper="ABCDEFGHIJKLMNOPQRSTUVWXYZ",t.numbers="0123456789",t.symbols="~`!@#$%^&*()_+-={}[]:\";'<>?,./|\\";t.default=r},function(e,t,n){"use strict";function r(e,t){if(!(0,i.isFiniteNumber)(t.x)||!(0,i.isFiniteNumber)(t.y))throw new Error("Malformed pin. Pins must contain, at minimum, an x and y coordinate.");return e.x=(0,i.withinPinBounds)(t.x),e.y=(0,i.withinPinBounds)(t.y),(0,i.isFiniteNumber)(t.x2)&&(e.x2=(0,i.withinPinBounds)(t.x2)),(0,i.isFiniteNumber)(t.y2)&&(e.y2=(0,i.withinPinBounds)(t.y2)),(0,i.isFiniteNumber)(t.time)&&(e.time=t.time),(0,i.isFiniteNumber)(t.duration)&&(e.duration=t.duration),e}function o(e){if(0===e.length)return"";var t={};return r(t,e[0]),e.length>1&&(t.pins=e.map(function(e){return r({},e)})),JSON.stringify(t)}t.__esModule=!0,t.serializePins=o;var i=n(39)},function(e,t,n){"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.map(function(e,t){return e+(void 0!==n[t]?n[t]:"")}).join("")}t.__esModule=!0,t.gql=r},function(e,t,n){"use strict";function r(e){return"string"==typeof e?e.replace(/</g,"<").replace(/>/g,">"):e}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments[2],r=arguments[3],o=0,a=[].concat(i(e),i(t)).sort(function(e,t){return e.offset-t.offset}),s=[];return a.length<1?(s.push(new d.default({block:r,start:0,end:n.length})),s):(a.forEach(function(e){e.offset>o&&s.push(new d.default({block:r,start:o,end:e.offset})),s.push(new d.default({block:r,entity:e.key,decorator:e.component,decoratorProps:e.decoratorProps,decoratedText:e.component?h(n,e.offset,e.offset+e.length):void 0,start:e.offset,end:e.offset+e.length,contentState:e.contentState})),o=e.offset+e.length}),o<n.length&&s.push(new d.default({block:r,start:o,end:n.length})),s)}function s(e,t){return t.forEach(function(t){e.push(t.offset),e.push(t.offset+t.length)}),e}function u(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=[];return o=s(o,t),o=s(o,n),o=s(o,r),o.push(0),o.push(e.length),o.filter(function(e,t,n){return n.indexOf(e)===t}).sort(function(e,t){return e-t})}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(46),f=r(l),p=n(162),d=r(p),h=function(e,t,n){return f.default.ucs2.encode(e.slice(t,n))},m=function(){function e(t){var n=t.flat,r=void 0!==n&&n;o(this,e),this.flat=r}return c(e,[{key:"relevantStyles",value:function(e){return this.ranges.filter(function(t){return e>=t.offset&&e<t.offset+t.length}).map(function(e){return e.style})}},{key:"nodeIterator",value:function(e,t,n){var r=this,o=this.relevantIndexes.slice(this.relevantIndexes.indexOf(t),this.relevantIndexes.indexOf(n));return o.forEach(function(t,i){var a=r.relevantStyles(t),s=o[i+1]?o[i+1]-t:1,u=h(r.textArray,t,t+s);e.pushContent(u,a,r.flat),!o[i+1]&&t<n&&e.pushContent(h(r.textArray,t+1,n),r.relevantStyles(n-1),r.flat)}),e}},{key:"parse",value:function(e){var t=this,n=e.text,r=e.inlineStyleRanges,o=e.entityRanges,i=e.decoratorRanges,s=void 0===i?[]:i;this.textArray=f.default.ucs2.decode(n),this.ranges=r,this.iterator=0,this.relevantIndexes=u(n,r,o,s);var c=a(o,s,this.textArray,e),l=c.map(function(e){return t.nodeIterator(e,e.start,e.end)});return new d.default({block:e,content:l})}}]),e}();t.default=m},function(e,t,n){"use strict";function r(e){throw new RangeError(f[e])}function o(e,t){for(var n=[],r=e.length;r--;)n[r]=t(e[r]);return n}function i(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(l,"."),r+o(e.split("."),t).join(".")}function a(e){for(var t=[],n=0,r=e.length;n<r;){var o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){var i=e.charCodeAt(n++);56320==(64512&i)?t.push(((1023&o)<<10)+(1023&i)+65536):(t.push(o),n--)}else t.push(o)}return t}t.__esModule=!0;var s=2147483647,u=/^xn--/,c=/[^\0-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,d=String.fromCharCode,h=function(e){return String.fromCodePoint.apply(String,e)},m=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:36},y=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},v=function(e,t,n){var r=0;for(e=n?p(e/700):e>>1,e+=p(e/t);e>455;r+=36)e=p(e/35);return p(r+36*e/(e+38))},_=function(e){var t=[],n=e.length,o=0,i=128,a=72,u=e.lastIndexOf("-");u<0&&(u=0);for(var c=0;c<u;++c)e.charCodeAt(c)>=128&&r("not-basic"),t.push(e.charCodeAt(c));for(var l=u>0?u+1:0;l<n;){for(var f=o,d=1,h=36;;h+=36){l>=n&&r("invalid-input");var y=m(e.charCodeAt(l++));(y>=36||y>p((s-o)/d))&&r("overflow"),o+=y*d;var _=h<=a?1:h>=a+26?26:h-a;if(y<_)break;var b=36-_;d>p(s/b)&&r("overflow"),d*=b}var w=t.length+1;a=v(o-f,w,0==f),p(o/w)>s-i&&r("overflow"),i+=p(o/w),o%=w,t.splice(o++,0,i)}return String.fromCodePoint.apply(String,t)},b=function(e){var t=[];e=a(e);for(var n=e.length,o=128,i=0,u=72,c=e,l=Array.isArray(c),f=0,c=l?c:c[Symbol.iterator]();;){var h;if(l){if(f>=c.length)break;h=c[f++]}else{if(f=c.next(),f.done)break;h=f.value}var m=h;m<128&&t.push(d(m))}var _=t.length,b=_;for(_&&t.push("-");b<n;){for(var w=s,g=e,E=Array.isArray(g),O=0,g=E?g:g[Symbol.iterator]();;){var T;if(E){if(O>=g.length)break;T=g[O++]}else{if(O=g.next(),O.done)break;T=O.value}var P=T;P>=o&&P<w&&(w=P)}var k=b+1;w-o>p((s-i)/k)&&r("overflow"),i+=(w-o)*k,o=w;for(var I=e,C=Array.isArray(I),S=0,I=C?I:I[Symbol.iterator]();;){var R;if(C){if(S>=I.length)break;R=I[S++]}else{if(S=I.next(),S.done)break;R=S.value}var D=R;if(D<o&&++i>s&&r("overflow"),D==o){for(var A=i,M=36;;M+=36){var j=M<=u?1:M>=u+26?26:M-u;if(A<j)break;var x=A-j,q=36-j;t.push(d(y(j+x%q,0))),A=p(x/q)}t.push(d(y(A,0))),u=v(i,k,b==_),i=0,++b}}++i,++o}return t.join("")},w=function(e){return i(e,function(e){return u.test(e)?_(e.slice(4).toLowerCase()):e})},g=function(e){return i(e,function(e){return c.test(e)?"xn--"+b(e):e})},E={version:"2.1.0",ucs2:{decode:a,encode:h},decode:_,encode:b,toASCII:g,toUnicode:w};t.ucs2decode=a,t.ucs2encode=h,t.decode=_,t.encode=b,t.toASCII=g,t.toUnicode=w,t.default=E},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,n){for(var r=t;r<n;r++)if(null!=e[r])return!1;return!0}function i(e,t,n,r){for(var o=t;o<n;o++)e[o]=r}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(){function e(t){r(this,e),this.decorators=t.slice()}return a(e,[{key:"getDecorations",value:function(e,t){var n=Array(e.getText().length).fill(null);return this.decorators.forEach(function(r,a){var s=0;(0,r.strategy)(e,function(e,t){o(n,e,t)&&(i(n,e,t,a+"."+s),s++)},t)}),n}},{key:"getComponentForKey",value:function(e){var t=parseInt(e.split(".")[0],10);return this.decorators[t].component}},{key:"getPropsForKey",value:function(e){var t=parseInt(e.split(".")[0],10);return this.decorators[t].props}}]),e}();t.default=s},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.version=t.util=t.Model=t.Enum=t.Bluffer=t.Client=void 0;var i=n(49),a=o(i),s=n(2),u=o(s),c=n(148),l=r(c),f=n(157),p=r(f),d=n(14),h=o(d),m=n(158),y=r(m);t.default=a.default,t.Client=a.default,t.Bluffer=u.default,t.Enum=l,t.Model=p,t.util=y,t.version=h.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(50),a=r(i),s=n(55),u=r(s),c=n(56),l=r(c),f=n(59),p=r(f),d=n(61),h=r(d),m=n(64),y=r(m),v=n(70),_=r(v),b=n(71),w=r(b),g=n(95),E=r(g),O=n(96),T=r(O),P=n(99),k=r(P),I=n(121),C=r(I),S=n(123),R=r(S),D=n(125),A=r(D),M=n(129),j=r(M),x=n(130),q=r(x),F=n(131),B=r(F),N=n(132),U=r(N),G=n(133),z=r(G),K=n(7),L=r(K),V=n(134),W=r(V),H=n(15),$=r(H),Z=n(32),Q=r(Z),X=n(3),Y=n(135),J=r(Y),ee=n(136),te=n(137),ne=n(138),re=r(ne),oe=n(139),ie=r(oe),ae=n(142),se=r(ae),ue=n(143),ce=r(ue),le=n(144),fe=r(le),pe=n(145),de=r(pe),he=n(14),me=r(he),ye=n(147),ve=r(ye),_e=n(16)("PageProof"),be=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.options,r=void 0===n?{}:n,i=t.adapters,s=void 0===i?[]:i;o(this,e),this.options=r,this.clientId=r.clientId||(0,ve.default)(),this.events=new W.default,this.adapters=new a.default(s),this.cache=new u.default(this),this.keyPairs=new fe.default(this),this.accounts=new h.default(this),this.comments=new A.default(this),this.dashboard=new y.default(this),this.files=new T.default(this),this.profile=new j.default(this),this.proofs=new w.default(this),this.briefs=new E.default(this),this.users=new _.default(this),this.workflows=new C.default(this),this.preferences=new R.default(this),this.sessions=new q.default(this),this.encryption=new B.default(this),this.live=new U.default(this),this.reports=new re.default(this),this.teams=new ie.default(this),this.printing=new se.default(this),this.freeTrial=new ce.default(this),this.checklistTemplates=new de.default(this),this.__admin=new k.default(this),this._hijackAdmin(),this._init(),this._registerCoreHooks(),this._enhance()}return e.prototype._init=function(){var e=this.adapters.getRequestAdapter();if(this.options.endpoint||(this.options.endpoint=e.options.endpoint),this.options.applicationId||(this.options.applicationId=e.options.applicationId),this.options.subscriptionKey||(this.options.subscriptionKey=e.options.key||this.options.key),this.options.subscriptionKey&&!this.options.applicationId)throw new Error("You must provide an applicationId.")},e.prototype._hijackAdmin=function(){var e=this;Object.getOwnPropertyNames(this.__admin).forEach(function(t){return e.admin[t]=e.__admin[t]})},e.prototype._registerCoreHooks=function(){this.on("error.throttled",function(e){var t=e.data.response.data.timeout;return _e("Sleeping "+t+"ms until rate limit resets"),(0,Q.default)(t)})},e.prototype._enhance=function(){var e=this;this.adapters.getEnhancementAdapters().forEach(function(t){return t.onClientReady(e)})},e.prototype.setSession=function(e){return!e||e instanceof L.default?this.session=e||null:this.session=(new L.default).fromJSON(e),this.session},e.prototype.rawRequest=function(e,t){var n=e.method,r=e.url,o=e.host,i=e.path,a=e.query,s=e.body,u=e.headers,c=this.adapters.getRequestAdapter();return r&&(o=r.origin,i=r.pathname,a=r.search),c.send({host:o,method:n,path:i,query:a,body:s,headers:u,credentials:!1},t)},e.prototype.getRequestLocalEncodedMetadata=function(){return[(0,J.default)()].map(function(e){return null!==e&&void 0!==e?encodeURIComponent(e):"#"}).join(":")},e.prototype.request=function(e,t,n){var r=this,o=new l.default(this.options.endpoint,e,t),i=this.adapters.getRequestAdapter(),a=Promise.resolve();if(!o.endpoint.anonymous){if(!this.session)return Promise.reject(new Error("Cannot make call to endpoint ("+e+") when unauthorized."));a=this.adapters.getCryptoAdapter().generateAuthorizationHeaders(o.getMethod(),o.getPath(),this.session).then(function(e){return o.addHeaders(e)})}this.options.applicationId&&o.addHeader(X.DEVICE_ID_HEADER,this.options.applicationId),this.options.subscriptionKey&&o.addHeader(X.SUBSCRIPTION_KEY_HEADER,this.options.subscriptionKey),"graphql"===e&&(o.addHeader("apollographql-client-name",this.options.applicationId?this.options.applicationId+" (via @pageproof/sdk)":"@pageproof/sdk"),o.addHeader("apollographql-client-version",me.default),this.clientId&&o.addHeader("spider-client-id",this.clientId));var s=this.getRequestLocalEncodedMetadata();s&&o.addHeader(X.LOCAL_ENCODED_METADATA_HEADER,s);var u={request:o};return a.then(function(){var e=o.build();return r.events.emit("experimental.request.before",u,!0).then(function(){return e})}).then(function(e){return i.send(e,n)}).then(p.default.parse).then(function(o){if(u.response=o,r.events.emit("experimental.request.after",u),o.code===$.default.ERROR_THROTTLED){var i=r.events.emit("error.throttled",u);if(i.some(Boolean))return Promise.all(i).then(function(){return r.events.emit("experimental.request.retry",u),r.request(e,t,n)})}if(o.code===$.default.ERROR_UNAUTHORISED){var a=r.session?r.session.token:null;return r.events.emit("error.unauthorized",u,!0).then(function(){return r.session&&r.session.token!==a?r.request(e,t,n):o})}if(o.deprecated){var s="The "+e+" API has been deprecated. "+(o.deprecated||"");r.events.emit("error.deprecated",{name:e,message:s})}return o}).then(function(t){try{if(t.error){r.events.emit("error.response",u);var n=new Error(t.message+" ["+e+"]");return n.response=t,n.request=o,Promise.reject(n)}return r.events.emit("experimental.request.resolve",u),Promise.resolve(t)}finally{r.events.emit("experimental.request.finally",u)}})},e.prototype.graphql=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{throwOnError:!0,minifyDocument:!0},r=!n||!1!==n.throwOnError,o=!0===n.minifyDocument,i=o?e.replace(/\s+/g," ").replace(/ { /g,"{").replace(/ } /g,"}").trim():e;return this.request("graphql",{query:i,variables:t}).then(function(e){var t=e.data;if(t.errors&&t.errors.length&&r){throw new ee.AggregateError("One or more GraphQL errors occurred.",t.errors.map(function(e){return new te.GraphQLError(e.message,e.locations,e.path)}))}return t})},e.prototype.admin=function(){return this.session?this.session.user.isAdmin?(this._admin||(this._admin=Promise.resolve(this.__admin)),this._admin):Promise.reject(new Error("The current user must be an administrator of a team or enterprise account.")):Promise.reject(new Error("You must be logged in to use the Admin API."))},e.prototype.brian=function(){return this.session&&this.session.userId===X.BRIAN_USER_ID?(this._brian||(this._brian=Promise.resolve(new z.default(this))),this._brian):Promise.reject(new Error("You do not have permission to use this API."))},e.prototype.crypto=function(){return this.adapters.getCryptoAdapter()},e.prototype.protobuf=function(){return this.adapters.getProtobufAdapter()},e.prototype.on=function(e,t){return this.events.on(e,t)},e}();t.default=be},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(51),a=r(i),s=n(52),u=r(s),c=n(53),l=r(c),f=n(54),p=r(f),d=function(){function e(t){o(this,e),this.adapters=[].concat(t)}return e.prototype.getAdapterInstanceOf=function(e){return this.getAnyAdaptersInstanceOf(e)[0]||null},e.prototype.getAnyAdaptersInstanceOf=function(e){for(var t=[],n=e.__adapter__,r=0;r<this.adapters.length;r+=1)for(var o=this.adapters[r],i=o;null!==i;){if(i.constructor&&i.constructor.__adapter__===n){t.push(o);break}i=Object.getPrototypeOf(i)}return t},e.prototype.getCryptoAdapter=function(){var e=this.getAdapterInstanceOf(a.default);if(!e)throw new Error("ICryptoAdapter not found. This adapter is required for the SDK to function correctly.");return e},e.prototype.getRequestAdapter=function(){var e=this.getAdapterInstanceOf(u.default);if(!e)throw new Error("IRequestAdapter not found. This adapter is required for the SDK to function correctly.");return e},e.prototype.getCacheAdapter=function(){return this.getAdapterInstanceOf(l.default)},e.prototype.getEnhancementAdapters=function(){return this.getAnyAdaptersInstanceOf(p.default)},e.prototype.getProtobufAdapter=function(){return this.getAdapterInstanceOf({__adapter__:"ProtobufAdapter"})},e}();t.default=d},function(e,t,n){"use strict";function r(){}t.__esModule=!0,r.__adapter__="ICryptoAdapter",t.default=r},function(e,t,n){"use strict";function r(){}t.__esModule=!0,r.__adapter__="IRequestAdapter",t.default=r},function(e,t,n){"use strict";function r(){}t.__esModule=!0,r.__adapter__="ICacheAdapter",t.default=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,n){var r=e[t];e[t]=function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];var i=r.bind.apply(r,[this].concat(t));return n(i,this,t).apply(this,t)}}function i(e){function t(o){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=Object.getOwnPropertyNames(o).filter(function(t){return o[t].client===e}),s=Object.getPrototypeOf(o),u=Object.keys(s).filter(function(e){return"function"==typeof s[e]&&0!==e.indexOf("_")});if(i.length||n){var c=i.join(".");0===c.indexOf("__")&&(c=c.substring(2)),u.forEach(function(e){r.push({namespace:c,name:e,api:o})})}a.forEach(function(e){t(o[e],i.concat(e))})}var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[];return t(e),r}t.__esModule=!0;var a,s,u=(s=a=function(){function e(){r(this,e)}return e.prototype.onClientReady=function(e){var t=this;i(e).forEach(function(e){var n={api:e.api,namespace:e.namespace,name:e.name,displayName:e.namespace+"."+e.name};t.onMethodEnhance(n),o(e.api,e.name,function(e){return t.onMethodBefore(n),function(){var r=void 0;try{r=e()}catch(e){throw n.error=e,t.onMethodThrown(n),e}finally{n.value=r,t.onMethodAfter(n),r&&"function"==typeof r.then&&r.then(function(e){n.resolved=e,t.onMethodResolve(n)},function(e){n.rejected=e,t.onMethodReject(n)}).then(function(){t.onMethodFinally(n)})}return r}})}),e.on("experimental.request.before",function(e){return t.onRequestBefore(e.data)}),e.on("experimental.request.after",function(e){return t.onRequestAfter(e.data)}),e.on("error.response",function(e){return t.onRequestReject(e.data)}),e.on("error.throttled",function(e){return t.onRequestThrottled(e.data)}),e.on("experimental.request.retry",function(e){return t.onRequestRetry(e.data)}),e.on("error.unauthorized",function(e){return t.onRequestUnauthorized(e.data)}),e.on("error.deprecated",function(e){return t.onRequestDeprecated(e.data)}),e.on("experimental.request.resolve",function(e){return t.onRequestResolve(e.data)}),e.on("experimental.request.finally",function(e){return t.onRequestFinally(e.data)})},e.prototype.onMethodEnhance=function(e){},e.prototype.onMethodBefore=function(e){},e.prototype.onMethodAfter=function(e){},e.prototype.onMethodReject=function(e){},e.prototype.onMethodResolve=function(e){},e.prototype.onMethodFinally=function(e){},e.prototype.onMethodThrown=function(e){},e.prototype.onRequestBefore=function(e){},e.prototype.onRequestAfter=function(e){},e.prototype.onRequestReject=function(e){},e.prototype.onRequestThrottled=function(e){},e.prototype.onRequestRetry=function(e){},e.prototype.onRequestUnauthorized=function(e){},e.prototype.onRequestDeprecated=function(e){},e.prototype.onRequestResolve=function(e){},e.prototype.onRequestFinally=function(e){},e}(),a.__adapter__="IEnhancementAdapter",s);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=function(){function e(t){r(this,e),this.client=t}return e.prototype.auto=function(e,t){var n=this.client.adapters.getCacheAdapter(),r=function(){};return n?(r=function(t){void 0!==t&&n.set(e,t)},n.get(e).catch(function(){return Promise.resolve(t(r)).then(function(e){return r(e),e})})):Promise.resolve(t(r))},e}();t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(57),s=r(a),u=n(13),c=r(u),l=n(14),f=r(l),p=n(3),d=function(){function e(t,n,r){if(o(this,e),this.host=t,this.name=n,this.endpoint=s.default[n],!this.endpoint)throw new Error('Unknown request endpoint "'+n+'".');this.params={},this.addParams(r),this.headers={}}return e.prototype.addHeaders=function(e){return this.headers=i({},this.headers,e),this},e.prototype.addHeader=function(e,t){return this.headers[e]=t,this},e.prototype.addParams=function(e){return this.params=i({},this.params,e),this},e.prototype.addParam=function(e,t){this.params[e]=t},e.prototype.getPath=function(){var e=this,t=this.endpoint,n=t.path,r=t.chain,o=t.trailing,i=n;return r&&r.forEach(function(t){"/"!==i[i.length-1]&&(i+="/"),i+=e.params[t]}),o&&"/"!==i[i.length-1]&&(i+="/"),i},e.prototype.getQuery=function(){var e=this,t=this.endpoint.query;if(t){var n=[];if("string"==typeof t){var r=this.params[t];(0,c.default)(r)&&Object.keys(r).forEach(function(e){void 0!==r[e]&&n.push(e+"="+encodeURIComponent(r[e]))})}else t.forEach(function(t){void 0!==e.params[t]&&n.push(t+"="+encodeURIComponent(e.params[t]))});if(n.length)return"?"+n.filter(Boolean).join("&")}return""},e.prototype.getHeaders=function(){var e,t=i({},this.headers,(e={},e[p.SDK_VERSION_HEADER]=f.default,e));if("POST"===this.endpoint.method||"PATCH"===this.endpoint.method||"PUT"===this.endpoint.method)switch(this.endpoint.version){case 2:t["Content-Type"]="application/json";break;case 1:default:t["Content-Type"]="application/x-www-form-urlencoded"}return t},e.prototype.getBody=function(){var e=this,t=this.endpoint;if(t.body){if("string"==typeof t.body){var n=this.params[t.body];return n=(0,c.default)(n)?JSON.stringify(n):String(n)}var r=!0===t.body?Object.keys(this.params):t.body,o={};switch(r.forEach(function(t){var n=e.params[t];void 0!==n&&(o[t]=n)}),t.version){case 2:return JSON.stringify(o);case 1:default:return Object.keys(o).map(function(t){return t+"="+encodeURIComponent(e.params[t])}).join("&")}}return null},e.prototype.getMethod=function(){return(this.endpoint.method||"GET").toUpperCase()},e.prototype.isWithCredentials=function(){return!0===this.endpoint.credentials},e.prototype.build=function(){return{host:this.host,method:this.getMethod(),path:this.getPath(),query:this.getQuery(),body:this.getBody(),headers:this.getHeaders(),credentials:this.isWithCredentials()}},e}();t.default=d},function(e,t){e.exports={"accounts.register":{method:"POST",path:"/api/users/register",body:["email","password","privateKey","publicKey","referrer"],anonymous:!0},"accounts.login":{method:"POST",path:"/api/users/login",body:["email","password","totp"],anonymous:!0},"accounts.generate-activation-code":{method:"GET",path:"/api/users/auth/generate",chain:["userId"],trailing:!0},"accounts.activate":{method:"POST",path:"/api/users/auth/activate",body:["userId","authCode"],trailing:!0},"accounts.forgot-password":{method:"POST",path:"/api/users/resetpasswordrequest",body:["email"],anonymous:!0},"accounts.set-password-request":{method:"POST",path:"/api/users/setpasswordrequest",body:["email"],anonymous:!0},"accounts.reset-password":{method:"POST",path:"/api/users/resetpassword",body:["email","secret","newPassword","newPrivateKey","newPublicKey"],anonymous:!0},"accounts.set-password":{method:"POST",path:"/api/users/setpassword",body:["email","secret","newPassword","newPrivateKey","newPublicKey"],anonymous:!0},"accounts.logout":{method:"GET",path:"/api/users/logout"},"profile.upload-avatar":{method:"POST",path:"/api/media/file/avatar",body:["uploadedImage"]},"profile.delete-avatar":{method:"POST",path:"/api/media/file/avatar/delete"},"profile.change-password":{method:"POST",path:"/api/users/changepassword",body:["oldPassword","newPassword","newPrivateKey"],trailing:!0},"profile.status":{method:"GET",path:"/api/users/status"},"profile.set-status":{version:2,method:"POST",path:"/api/users/status/set",body:["emoji","message","away"]},"profile.clear-status":{method:"POST",path:"/api/users/status/clear"},"preferences.all":{method:"GET",path:"/api/users/preferences/all"},"preferences.get":{method:"GET",path:"/api/users/preferences/get",query:["preferences"]},"preferences.update":{version:2,method:"POST",path:"/api/users/preferences/update",body:!0},"preferences.reset":{version:2,method:"POST",path:"/api/users/preferences/reset",body:["preferences"]},"dashboard.inbox":{method:"GET",path:"/api/proofs/dashboard/proofin",trailing:!0},"dashboard.sent":{method:"GET",path:"/api/proofs/dashboard/proofout",trailing:!0},"dashboard.outbox":{method:"GET",path:"/api/proofs/dashboard/proofoutbox",trailing:!0},"dashboard.briefs":{method:"GET",path:"/api/briefs/dashboard",trailing:!0},"dashboard.search":{method:"POST",path:"/api/proofs/search",body:["query","all","filterBy"]},"dashboard.groups.filter-by":{method:"GET",path:"/api/proofs/dashboard/groups",chain:["filterBy"],trailing:!0},"team.dashboard.inbox":{method:"GET",path:"/api/admin/dashboard/proofin",chain:["page"],trailing:!0},"team.dashboard.sent":{method:"GET",path:"/api/admin/dashboard/proofsent",chain:["page"],trailing:!0},"team.dashboard.outbox":{method:"GET",path:"/api/admin/dashboard/proofout",chain:["page"],trailing:!0},"team.dashboard.search":{method:"POST",path:"/api/admin/search",body:["query","all","filterBy","page"]},"admin.team.dashboard.groups.category":{method:"GET",path:"/api/admin/dashboard/groups",chain:["category"]},"admin.team.proofs.groups.load":{method:"GET",path:"/api/admin/group",chain:["groupId"]},"users.by-id":{method:"GET",path:"/api/users",chain:["userId"]},"users.by-email":{method:"POST",path:"/api/users/email",body:["email"],trailing:!0},"users.invite":{method:"POST",path:"/api/users/create",body:["email"]},"proofs.create":{version:2,method:"POST",path:"/api/v2/proofs/create",body:"proof"},"proofs.normalize-workflow":{method:"POST",path:"/api/proofs/permission/check",body:["proofId","workflowId"]},"proofs.get-workflow-metrics":{method:"GET",path:"/api/workflows/metrics",query:["proofId"]},"proofs.set-workflow":{method:"POST",path:"/api/proofs/update",body:["proofId","workflowId"]},"proofs.set-tags":{method:"POST",path:"/api/tags/create",body:["relatedId","tag"]},"proofs.set-file":{method:"POST",path:"/api/proofs/update",body:["proofId","fileId"]},"proofs.distribute-file":{method:"GET",path:"/api/proofs/distribute",chain:["proofId"],trailing:!0},"proofs.archive":{version:2,method:"POST",path:"/api/proofs/close",body:["proofIds"]},"proofs.unarchive":{method:"GET",path:"/api/proofs/reopen",chain:["proofId"],trailing:!0},"proofs.delete":{method:"GET",path:"/api/proofs/delete",chain:["proofId"],trailing:!0},"proofs.start":{method:"POST",path:"/api/proofs/startworkflow",body:["proofId"],trailing:!0},"proofs.manual-approval":{method:"POST",path:"/api/proofs/manualapproval",body:["proofId","message"],trailing:!0},"proofs.withdraw-approval":{method:"POST",path:"/api/proofs/revertapproval",body:["proofId","messageToSender"],trailing:!0},"proofs.editors.add":{version:2,method:"POST",path:"/api/proofs/editor/add",body:["proofId","editors","editorMessage"]},"proofs.editors.add-bulk":{version:2,method:"POST",path:"/api/proofs/editor/add/bulk",body:["proofsWithEditors"]},"proofs.bulk-update":{version:2,method:"POST",path:"/api/proofs/update/bulk",body:["proofs"]},"proofs.editors.remove":{version:2,method:"POST",path:"/api/proofs/editor/remove",body:["proofId","editors"]},"proofs.editors.replace":{version:2,method:"POST",path:"/api/proofs/editor/replace",body:["proofId","oldEditors","newEditors"]},"proofs.editors.set":{version:2,method:"POST",path:"/api/proofs/editor/set",body:["proofId","editors"]},"briefs.start":{method:"POST",path:"/api/briefs/start",body:["briefId"]},"proofs.return":{version:2,method:"POST",path:"/api/v2/proofs/return",body:["proofIds"]},"proofs.groups.create":{method:"POST",path:"/api/proofs/groups/create",body:["name","ownedByTeam"]},"proofs.groups.update":{version:2,method:"POST",path:"/api/proofs/groups/update",body:["groupId","name","ownedByTeam","folderName"]},"proofs.groups.delete":{method:"POST",path:"/api/groups/delete",body:["groupId"]},"proofs.groups.load":{method:"GET",path:"/api/proofs/group",chain:["groupId"]},"proofs.groups.ready":{method:"POST",path:"/api/proofs/groups/ready",body:["groupId"]},"proofs.groups.archive":{version:2,method:"POST",path:"/api/groups/archive",body:["groupIds","archiveProofs"]},"proofs.groups.reopen":{version:2,method:"POST",path:"/api/groups/reopen",body:["groupIds"]},"proofs.groups.remove-proof":{method:"POST",path:"/api/groups/proof/remove",body:["proofId"]},"proofs.groups.add-proof":{method:"POST",path:"/api/groups/proof/add",body:["proofId","groupId"]},"proofs.groups.owners.add":{version:2,method:"POST",path:"/api/v2/proofs/owners/groups/add",body:["groupId","owners"]},"proofs.groups.workflows.add-reviewers":{version:2,method:"POST",path:"/api/v2/workflows/groups/reviewers/add",body:["groupId","reviewers"]},"proofs.groups.replace-approver":{version:2,method:"POST",path:"/api/groups/approver/replace",body:["groupId","user"]},"proofs.versions.attach":{method:"POST",path:"/api/proofs/versions/create",body:["proofId","versionId"]},"proofs.versions.list":{method:"GET",path:"/api/proofs/versions",chain:["proofId"],trailing:!0},"proofs.load":{method:"GET",path:"/api/proofs/",chain:["proofId"],trailing:!0},"proofs.next":{method:"POST",path:"/api/proofs/next",body:["proofId"]},"proofs.request-access":{method:"GET",path:"/api/proofs/requestaccess",chain:["proofId"]},"proofs.lock":{method:"GET",path:"/api/proofs/lock/",chain:["proofId"],trailing:!0},"proofs.unlock":{method:"GET",path:"/api/proofs/unlock/",chain:["proofId"],trailing:!0},"proofs.request-unlock":{method:"GET",path:"/api/proofs/unlockemail/",chain:["proofId"],trailing:!0},"proofs.images":{method:"GET",path:"/api/proofs/graph/thumbnails/",chain:["proofId"]},"proofs.video-credentials":{method:"GET",path:"/api/proofs/assets/video-credentials/",chain:["proofId"]},"proofs.finish":{method:"POST",path:"/api/proofs/finished",body:["proofId","decision"]},"proofs.update-decision":{method:"POST",path:"/api/proofs/update/decision",body:["proofId","decision"]},"proofs.decisions.load":{method:"GET",path:"/api/decisions/proofs",chain:["proofId"]},"proofs.decisions.get-options":{method:"GET",path:"/api/decisions/proofs",chain:["proofId","type"]},"proofs.decisions.leave-decision":{version:2,method:"POST",path:"/api/decisions/proofs",body:["decisionId"],chain:["proofId"]},"proofs.assets.extracted-text":{version:2,method:"GET",path:"/api/proofs/assets/extracted-text",chain:["proofId"]},"proofs.assets.color-separations":{version:2,method:"GET",path:"/api/proofs/assets/color-separations",chain:["proofId"]},"files.legacy.generate-token":{method:"GET",path:"/api/media/getfiletoken",query:["relatedId","fileType"]},"files.legacy.upload-block":{method:"POST",path:"/api/media/file",query:["block","part","token"],body:"data"},"files.legacy.upload-complete":{method:"POST",path:"/api/media/file",query:["block","blockCount","part","token","extn","pages","filename","storeoriginal","adobeExportData"],body:"envelope"},"files.details":{method:"GET",path:"/api/media/file/details",chain:["fileId"]},"files.download-block":{method:"GET",path:"/api/media/getfilechunk",chain:["proofId","fileId","block"],query:["s"]},"files.thumbnail":{method:"GET",path:"/api/media/getimage/thumb",chain:["fileId"]},"files.preview":{method:"GET",path:"/api/media/getimage",chain:["fileId","quality","pageNumber"],trailing:!0},"files.import.generic":{method:"POST",path:"/api/media/filedropbox",body:["extn","filename","url","envelope","storeOriginal"]},"files.import.drive":{method:"POST",path:"/api/media/filedrive",body:["extn","filename","url","envelope","storeOriginal","accessToken"]},"files.import.onedrive":{method:"POST",path:"/api/media/fileonedrive",body:["extn","filename","url","envelope","storeOriginal","accessToken"]},"files.import.box":{method:"POST",path:"/api/media/filebox",body:["extn","filename","url","envelope","storeOriginal","accessToken"]},"files.import.dropbox":{method:"POST",path:"/api/media/filedropbox",body:["extn","filename","url","envelope","storeOriginal","accessToken"]},"files.import.canva":{method:"POST",path:"/api/media/filecanva",body:["extn","filename","url","envelope","storeOriginal","accessToken"]},"files.v2.generate-credentials":{version:2,method:"POST",path:"/api/media/file/upload",body:["files","supports"]},"files.v2.upload-complete":{version:2,method:"POST",path:"/api/media/file/queue",body:["files"]},"files.can-download.update":{method:"POST",path:"/api/media/downloadoption",body:["fileId","downloadOriginal"]},"files.import.web.validate":{method:"POST",path:"/api/media/import/url/validate",body:["url"]},"files.import.web":{method:"POST",path:"/api/media/import/url",body:["url","envelope"]},"files.create-email":{version:2,method:"POST",path:"/api/email-upload/files/create"},"files.duplicate":{version:2,method:"POST",path:"/api/files/v2/duplicate",body:["id"]},"workflows.create":{version:2,method:"POST",path:"/api/v2/workflows/create",body:["title","ownedByTeam"]},"workflows.favorite":{method:"POST",path:"/api/workflows/favorite",body:["workflowId"]},"workflows.unfavorite":{method:"POST",path:"/api/workflows/unfavorite",body:["workflowId"]},"workflows.update":{method:"POST",path:"/api/workflows/update",body:["workflowId","title","ownedByTeam"]},"workflows.load":{version:2,method:"GET",path:"/api/v2/workflows/detail",chain:["workflowId"]},"workflows.nudge-message":{method:"GET",path:"/api/workflows/nudgemessage",query:["workflowId","userId"]},"workflows.steps.add":{version:2,method:"POST",path:"/api/v2/workflows/steps/add",body:["workflowId","title","position","dueDate","mandatoryDecisionThreshold"]},"workflows.steps.update":{version:2,method:"POST",path:"/api/v2/workflows/steps/update",body:["stepId","title","dueDate","mandatoryDecisionThreshold"]},"workflows.steps.move-before":{method:"POST",path:"/api/workflows/step/movebefore",body:["stepId","beforeStepId"]},"workflows.steps.move-after":{method:"POST",path:"/api/workflows/step/moveafter",body:["stepId","afterStepId"]},"workflows.steps.swap":{method:"POST",path:"/api/workflows/step/swap",body:["stepId","swapStepId"]},"workflows.users.set":{version:2,method:"POST",path:"/api/v2/workflows/users/set",body:["workflowId","stepId","position","users"]},"workflows.users.update":{version:2,method:"POST",path:"/api/v2/workflows/users/update",body:["workflowId","stepId","userId","role","permissions"]},"workflows.users.add":{version:2,method:"POST",path:"/api/v2/workflows/users/add",body:["workflowId","stepId","users"]},"workflows.users.skip-all":{method:"POST",path:"/api/workflows/skipall",body:["workflowId"]},"workflows.user.nudge":{version:2,method:"POST",path:"/api/workflows/user/nudge",body:["workflowId","userId","message"]},"workflows.nudge-all":{version:2,method:"POST",path:"/api/v2/workflows/nudgeall",body:["workflowIds","message"]},"workflows.delete":{method:"POST",path:"/api/workflows/delete",body:["workflowId"]},"workflows.duplicate":{method:"POST",path:"/api/workflows/duplicateonly",body:["workflowId","noOwners","includeOwnedByTeam","excludeStepDueDates","includeSharedUsers"]},"workflows.set-starting-step":{method:"POST",path:"/api/workflows/startfrom",body:["workflowId","stepId"]},"workflows.owned":{method:"GET",path:"/api/workflows",trailing:!0},"workflows.shared":{method:"GET",path:"/api/workflows/share/user",trailing:!0},"workflows.owned.email-list":{method:"GET",path:"/api/workflows/emaillist",trailing:!0},"workflows.shared.email-list":{method:"GET",path:"/api/workflows/share/emaillist",trailing:!0},"workflows.replace-approver":{version:2,method:"POST",path:"/api/v2/workflows/approver/replace/bulk",body:["workflowIds","user"]},"workflows.proof-owners.add":{version:2,method:"POST",path:"/api/workflows/permission/add",body:!0},"comments.load-all":{method:"POST",path:"/api/proofs/recent",body:["proofId","timestamp"]},"comments.load-page":{method:"POST",path:"/api/proofs/comment/recent",body:["proofId","timestamp","page"]},"comments.state.update":{method:"POST",path:"/api/proofs/comment/updatestatus",body:["commentId","change","done"]},"comments.state.multiple-update":{version:2,method:"POST",path:"/api/comments/update/status/batch",body:["proofId","commentIds","change","done"]},"comments.create":{version:2,method:"POST",path:"/api/proofs/comment/create",body:["proofId","page","envelope","encryptedComment","xy","parent","mentions","metadata","sourceMetadata","creationToken","change","done","boxFillImage","boxFillType","autoState","private"]},"comments.delete":{method:"POST",path:"/api/proofs/comment/delete",body:["commentId"]},"comments.import.create-task":{version:2,method:"POST",path:"/api/proofs/comments/import/tasks",body:"options"},"comments.import.action-task":{version:2,method:"POST",path:"/api/proofs/comments/import/tasks",chain:["id","action"],body:"options"},"comments.import.get-task":{method:"GET",path:"/api/proofs/comments/import/tasks",chain:["id"]},"comments.load-context":{method:"GET",path:"/api/comments/context",chain:["commentId"]},"proofs-owners.add":{version:2,method:"POST",path:"/api/v2/proofs/owners/add",body:["proofIds","users"]},"proofs-reviewers.add":{version:2,method:"POST",path:"/api/proofs/reviewers/add",body:["proofIds","reviewers"]},"proofs-workflow.add-bulk":{version:2,method:"POST",path:"/api/proofs/workflow/add/bulk",body:["proofIds","workflowTemplateId"]},"proofs-owners.remove":{version:2,method:"POST",path:"/api/v2/proofs/owners/remove",body:["proofId","users"]},"proofs.tag-delete":{method:"POST",path:"/api/tags/delete",body:["relatedId","tag"]},"proofs.return-todos":{version:2,method:"POST",path:"/api/proofs/returntodos",body:["proofIds","messageToOwners","markCommentAsTodo"]},"proofs.set-message-to-reviewers":{version:2,method:"POST",path:"/api/proofs/messagetoreviewers/update/bulk",body:["proofIds","messageToReviewers"]},"proofs.remove-editor":{method:"GET",path:"/api/proofs/deleteeditor",chain:["proofId"],trailing:!0},"proofs.update":{version:2,method:"POST",path:"/api/v2/proofs/update",body:"proof"},"briefs.create":{method:"POST",path:"/api/briefs/create",body:["title","messageToRecipient","dueDate","tag","isPublic"]},"briefs.update":{method:"POST",path:"/api/briefs/update",body:["briefId","title","messageToRecipient","dueDate","tag","recipient","editorId","editorMessage","isPublic"]},"admin.team.users.enabled":{method:"GET",path:"/api/admin/getusers/active",trailing:!0},"admin.team.users.disabled":{method:"GET",path:"/api/admin/getusers/inactive",trailing:!0},"admin.team.users.set-enabled":{method:"POST",path:"/api/admin/setenabled",body:["email","enabled"]},"admin.team.users.invite":{version:2,method:"POST",path:"/api/admin/member/invite",body:["emails"]},"admin.team.users.remove-from-team":{version:2,method:"POST",path:"/api/admin/member/remove",body:["users"]},"admin.team.users.upload-avatar":{method:"POST",path:"/api/admin/member/avatar",body:["userId","uploadedImage"]},"admin.team.users.delete-avatar":{method:"POST",path:"/api/admin/member/avatar/delete",body:["userId"]},"admin.team.users.invitations":{method:"GET",path:"/api/admin/team/users/invitations"},"admin.team.users.revoke-invitation":{version:2,method:"POST",path:"/api/admin/team/users/revoke-invitation",body:["email","invitationId"]},"admin.team.features.load":{method:"GET",path:"/api/admin/settings",trailing:!0},"admin.team.features.update":{version:2,method:"POST",path:"/api/admin/settings",body:["displayComments","generalComments","privateComments","enableWebhooks","editComments","ownerCanDeleteComments","proofReference","proofReferenceRequired","displayTeamName","emailTitleTextColor","emailLinkTextColor","emailButtonBackgroundColor","emailButtonTextColor","disableReplyingToCommentsInStatuses","publicProofs","defaultProofIsPublic","messageToOwners","allowedDecisions","enableChecklists","suggestionsIncludeTeamMembers","enableUserGroups","enableCommentVisibility","defaultCommentVisibility","usePreviousVersionDueDate","enableViewOnlyReviewers","enableIntelligence","enableIntelligenceSmartTags","enableProofMagicAccess","enableIntelligenceSmartCheckCr","defaultGifOutput"]},"admin.team.features.sender-email.set":{version:2,method:"POST",path:"/api/admin/sender-email/set",body:["senderEmail"]},"integrations.get-setup-url":{method:"GET",path:"/api/integrations/setup_url",query:"params"},"integrations.get-proof-setup":{method:"GET",path:"/api/integrations/proof_setup",query:["integration_key","id"]},"integrations.get-configurations":{method:"GET",path:"/api/integrations/configuration",query:["level","integration_keys"]},"integrations.disable":{method:"POST",path:"/api/integrations/disable",query:["level","integration_key"]},"integrations.update-configuration":{version:2,method:"POST",path:"/api/integrations/configuration/update",body:["level","integrationKey","key","value"]},"integrations.get-available-reference-integrations":{method:"GET",path:"/api/integrations/reference/available_integrations"},"integrations.get-available-reference-options":{method:"GET",path:"/api/integrations/reference/options",query:"params"},"integrations.load-reference-additional-information":{method:"GET",path:"/api/integrations/reference/additional_information",query:"params"},"integrations.proof-integration-references.add":{version:2,method:"POST",path:"/api/integrations/reference/proof_integration_references",body:["proofId","integrationReference"]},"integrations.proof-integration-references.remove":{version:2,method:"POST",path:"/api/integrations/reference/proof_integration_references/remove",body:["proofId","referenceId"]},"admin.team.preferences.notifications.load":{method:"GET",path:"/api/admin/preferences/notifications",trailing:!0},"admin.team.preferences.notifications.set":{method:"POST",path:"/api/admin/preferences/notifications/set",body:["ownerAddedByAdmin"]},"admin.team.workflows.owned":{method:"GET",path:"/api/admin/workflows/templates"},"admin.team.workflows.owned.email-list":{method:"GET",path:"/api/admin/workflows/templates/emaillist"},"admin.team.custom-tools.load":{method:"GET",path:"/api/custom-tools/admin/team"},"admin.team.custom-tools.update":{version:2,method:"PATCH",path:"/api/custom-tools/admin/team",body:"updates"},"sessions.check":{method:"GET",path:"/api/sessions/check"},"sso.get-public-key":{method:"GET",path:"/sso/public_key",anonymous:!0},"sso.get-session":{version:2,method:"POST",path:"/sso/session",body:["nonce"],anonymous:!0,credentials:!0},"sso.get-login-options":{version:2,method:"POST",path:"/sso/login_options",body:["email"],anonymous:!0},"sso.initiate-login":{version:2,method:"POST",path:"/sso/initiate_login",body:["email"],anonymous:!0},"mfa.setup":{method:"POST",path:"/api/users/mfa/setup"},"mfa.enable":{method:"POST",path:"/api/users/mfa/enable",body:["totp"]},"mfa.remove":{method:"POST",path:"/api/users/mfa/remove",body:["password"]},"reminders.add":{version:2,method:"POST",path:"/api/reminders/add",body:["entityId","reminders"]},"reminders.update":{version:2,method:"POST",path:"/api/reminders/update",body:["reminderId","relativeDate"]},"reminders.delete":{version:2,method:"POST",path:"/api/reminders/delete",body:["reminderIds"]},"reminders.all":{version:2,method:"GET",path:"/api/reminders/list",chain:["entityId"]},"reminders.set":{version:2,method:"POST",path:"/api/reminders/list",chain:["entityId","reminders"]},"proofs.audit.summary":{version:2,method:"GET",path:"/api/proofs/audit/summary",chain:["proofId"]},"brian.rekey-users-proofs":{version:2,method:"GET",path:"/api/brian/rekey/proofs",chain:["userId"]},"live.generate-access-token":{version:2,method:"GET",path:"/api/users/live/token"},"reports.create":{version:2,method:"POST",path:"/api/reports",body:!0},"reports.configurations":{version:2,method:"GET",path:"/api/reports/configurations"},"printing.create":{version:2,method:"POST",body:!0,path:"/api/print"},"printing.options":{version:2,method:"GET",query:["proofId"],path:"/api/print/options"},"teams.invitations.info":{version:2,method:"GET",path:"/api/teams/invitations/info",chain:["invitationId"]},"teams.invitations.accept":{version:2,method:"POST",path:"/api/teams/invitations/accept",chain:["invitationId"]},"teams.invitations.decline":{version:2,method:"POST",path:"/api/teams/invitations/decline",chain:["invitationId"]},"scim.admin.settings":{method:"GET",path:"/api/scim/admin/settings"},"scim.admin.enable":{method:"POST",path:"/api/scim/admin/enable"},"scim.admin.disable":{method:"POST",path:"/api/scim/admin/disable"},"scim.admin.regenerate-access-token":{version:2,method:"POST",path:"/api/scim/admin/regenerate-access-token",body:["type"]},"proofs.custom-tools.load":{method:"GET",path:"/api/custom-tools/proof",chain:["proofId"]},"proofs.custom-tools.update":{version:2,method:"PATCH",path:"/api/custom-tools/proof",chain:["proofId"],body:"updates"},"proofs.custom-tools.validate":{version:2,method:"POST",path:"/api/custom-tools/validate",body:"schema"},"email.proofs.generate":{version:2,method:"POST",path:"/api/email-upload/email-address",body:!0},"proofs.link-check.results":{version:2,method:"GET",chain:["proofId"],path:"/api/link-check/results"},"proofs.link-check.recheck":{version:2,method:"POST",body:["proofId"],path:"/api/link-check/recheck"},"free-trial.request-team":{version:2,method:"POST",path:"/api/free-trial/request/team",body:!0},"proofs.send-share-link":{version:2,method:"POST",path:"/api/public-proofs/proof/send-share-link",body:["proofId","message","emailAddresses"]},graphql:{version:2,method:"POST",path:"/spider/graphql",body:!0}}},function(e,t,n){"use strict";t.__esModule=!0;var r=Object.prototype.toString;t.default=function(e){return r.call(e)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(15),a=r(i),s=n(60),u=n(3),c=n(6),l=r(c),f=function(){function e(){o(this,e),this.error=!1,this.code=-1,this.data=null,this.message=null,this.deprecated=null}return e.parse=function(t){var n=t.status,r=t.headers,o=void 0===r?{}:r,i=t.body,c=new e;if(n===s.TOO_MANY_REQUESTS_STATUS)return c.error=!0,c.message="Too many requests. Unable to process request due to high volume of requests from your application.",c.code=a.default.ERROR_THROTTLED,c.data={timeout:1e3*(parseFloat(o[u.RETRY_AFTER_HEADER])||60)},c;if((0,l.default)(o,"deprecated")&&(c.deprecated=o.deprecated),n===s.OK_STATUS&&!i)return c.code=a.default.OK,c;try{var f=JSON.parse(i);"string"==typeof f||(f&&"ResponseCode"in f?(c.code=f.ResponseCode,c.code!==a.default.OK&&(c.error=!0)):f.Message&&1===Object.keys(f).length?(c.error=!0,c.code=a.default.ERROR_CRITICAL):"boolean"==typeof f.success&&f.message&&(c.error=!1===f.success,c.code=n,c.message=f.message)),c.error&&(c.message=c.message||"Response returned with the response code: "+c.code+". Please check SDK error documentation for details."),c.data=f}catch(e){c.error=!0}return c},e}();t.default=f},function(e,t,n){"use strict";t.__esModule=!0;t.TOO_MANY_REQUESTS_STATUS=429,t.OK_STATUS=200},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(7),l=r(c),f=n(62),p=r(f),d=n(63),h=r(d),m=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.sso=new p.default(n),r.mfa=new h.default(n),r}return a(t,e),t.prototype._generateCredentials=function(e){var t=this;return this.client.crypto().generatePasswordHash(e).then(function(e){return Promise.all([e,t.client.crypto().generateKeyPair()])}).then(function(n){var r=n[0],o=n[1];return Promise.all([r,o,t.client.crypto().encryptPrivateKey(o.privateKeyPEM,e)])})},t.prototype.register=function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return"string"==typeof r&&(console.warn("Warning: Passing the user's activation code during account creation has been moved into an options object. For compatibility reasons, the legacy behaviour still functions as expected, but please update your code as this will be changed in a future version."),r={activationCode:r}),this._generateCredentials(t).then(function(t){var o=t[0],i=t[1],a=t[2];return Promise.all([i,n.client.request("accounts.register",{email:e,password:o,privateKey:a,publicKey:i.publicKeyPEM,referrer:r.referrer})])}).then(function(r){var o=r[0];return Promise.all([o,n.login(e,t,void 0,!1)])}).then(function(e){var t=e[0],o=e[1];return Promise.all([t,o,r.activationCode?n.activate(r.activationCode).catch(function(){return n.generateActivationCode()}):n.generateActivationCode()])}).then(function(e){var t=e[0],n=e[1];return n.privateKeyPEM=t.privateKeyPEM,n})},t.prototype.generateActivationCode=function(){return this.client.request("accounts.generate-activation-code",{userId:this.client.session.userId})},t.prototype.activate=function(e){var t=this;return this.client.request("accounts.activate",{userId:this.client.session.userId,authCode:e}).then(function(){t.client.session.user.hasActivated=!0})},t.prototype.login=function(e,t,n){var r=this,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return this.client.crypto().generatePasswordHash(t).then(function(t){return r.client.request("accounts.login",{email:e,password:t,totp:n})}).then(function(t){var n=(new l.default).fromSession(t.data);return n.user.email=e,n}).then(function(e){return o?r.client.crypto().decryptPrivateKey(e.privateKeyPEM$,t).then(function(t){return e.privateKeyPEM=t,e}):e}).then(function(e){return r.client.setSession(e),e})},t.prototype.resetPassword=function(e){var t=this,n=e.email,r=e.code,o=e.password;return this._generateCredentials(o).then(function(e){var o=e[0],i=e[1],a=e[2];return Promise.all([i,t.client.request("accounts.reset-password",{email:n,secret:r,newPassword:o,newPrivateKey:a,newPublicKey:i.publicKeyPEM})])}).then(function(e){var r=e[0];return Promise.all([r,t.login(n,o,void 0,!1)])}).then(function(e){var t=e[0],n=e[1];return n.privateKeyPEM=t.privateKeyPEM,n})},t.prototype.forgotPassword=function(e){return this.client.request("accounts.forgot-password",{email:e})},t.prototype.setPasswordRequest=function(e){return this.client.request("accounts.set-password-request",{email:e})},t.prototype.setPassword=function(e){var t=this,n=e.email,r=e.code,o=e.password;return this._generateCredentials(o).then(function(e){var o=e[0],i=e[1],a=e[2];return Promise.all([i,t.client.request("accounts.set-password",{email:n,secret:r,newPassword:o,newPrivateKey:a,newPublicKey:i.publicKeyPEM})])}).then(function(e){var r=e[0];return Promise.all([r,t.login(n,o,void 0,!1)])}).then(function(e){var t=e[0],n=e[1];return n.privateKeyPEM=t.privateKeyPEM,n})},t.prototype.logout=function(){var e=this;return this.client.request("accounts.logout").catch(function(t){return e.client.setSession(null),Promise.reject(t)}).then(function(){e.client.setSession(null)})},t}(u.default);t.default=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(7),l=r(c),f=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.getSession=function(){var e=this;return this.client.request("sso.get-public-key").then(function(e){return e.data.ServerPublicKey}).then(function(t){return e.client.crypto().generateWrappedSymmetricKey(t)}).then(function(t){var n=t.key,r=t.key$;return Promise.all([n,e.client.request("sso.get-session",{nonce:r})])}).then(function(t){var n=t[0],r=t[1],o=(new l.default).fromSession(r.data);return Promise.all([o,e.client.crypto().decryptManagedPrivateKey(o.privateKeyPEM$,n)])}).then(function(e){var t=e[0],n=e[1];return t.privateKeyPEM=n,t})},t.prototype.getLoginOptions=function(e){return this.client.request("sso.get-login-options",{email:e}).then(function(e){return e.data})},t.prototype.initiateLogin=function(e){return this.client.request("sso.initiate-login",{email:e}).then(function(e){return e.data})},t}(u.default);t.default=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.setup=function(){return this.client.request("mfa.setup").then(function(e){return{secret:e.data.SetupSecret,qrCodeImage:e.data.SetupQrCode}})},t.prototype.enable=function(e){return this.client.request("mfa.enable",{totp:e})},t.prototype.remove=function(e){var t=this;return this.client.crypto().generatePasswordHash(e).then(function(e){return t.client.request("mfa.remove",{password:e})})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t={};return Object.keys(v).forEach(function(n){t[n]=e[v[n]]}),t}function u(e){return(e||[]).map(function(e){return(new p.default).fromProof(e)})}t.__esModule=!0;var c=n(0),l=r(c),f=n(5),p=r(f),d=n(8),h=r(d),m=n(69),y=r(m),v={inbox:"ProofIn",sent:"ProofOut",outbox:"ProofOutBox",briefs:"AllBriefs"},_=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.groups=new y.default(n),r}return a(t,e),t.prototype.inbox=function(){return this._loadSingleTabProofs("inbox")},t.prototype.sent=function(){return this._loadSingleTabProofs("sent")},t.prototype.outbox=function(){return this._loadSingleTabProofs("outbox")},t.prototype.briefs=function(){return this._loadSingleTabProofs("briefs")},t.prototype._loadSingleTabProofs=function(e){return this.client.request("dashboard."+e).then(function(e){return s(e.data)}).then(function(t){return t[e]}).then(u)},t.prototype.search=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.status,r=t.everything;return this._loadSearchProofs({query:e,filterBy:void 0===n?void 0:[].concat(n).join(","),all:r?1:0})},t.prototype.everything=function(){return this.search(void 0,{everything:!0})},t.prototype.approved=function(){return this.search(void 0,{status:h.default.APPROVED})},t.prototype.archived=function(){return this.search(void 0,{status:h.default.ARCHIVED})},t.prototype._loadSearchProofs=function(e){return this.client.request("dashboard.search",e).then(function(e){return u(e.data.Proofs)})},t}(l.default);t.default=_},function(e,t,n){"use strict";function r(e,t,n){return(1-(t+n))*e+t}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={count:(0,o.number)("Count"),decision:(0,o.number)("Decision"),users:(0,o.each)("Users",function(e){return{id:e.UserId,name:e.Name,email:e.Email,nudgedDate:(0,o.date)("NudgedInStep")(e)}})},s=function(){function e(){r(this,e)}return e.prototype.fromDecisionSummary=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={referenceId:"ReferenceId",referenceUrl:"ReferenceUrl",referenceType:"ReferenceType",referenceLabel:"ReferenceLabel",metadata:"Metadata"},s=function(){function e(){r(this,e)}return e.prototype.fromProofIntegrationReference=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={id:"Id",templateId:"TemplateId",name:"Name",description:"Description",isRequiredForFinalApproval:"IsRequiredForFinalApproval",shouldOpenOnProofLoad:"ShouldOpenOnProofLoad"},s=function(){function e(){r(this,e)}return e.prototype.fromProofChecklist=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return(e||[]).map(function(e){return(new f.default).fromProofGroup(e)})}t.__esModule=!0;var u=n(0),c=r(u),l=n(10),f=r(l),p=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype._loadGroups=function(e){return this.client.request("dashboard.groups.filter-by",{filterBy:e}).then(function(e){return s(e.data)})},t.prototype.current=function(){return this._loadGroups("current")},t.prototype.archived=function(){return this._loadGroups("archived")},t}(c.default);t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return e.data.length>0?(new p.default).fromUser(e.data[0]):(new p.default).fromUser(e.data)}function u(e){return e.data.length?(new p.default).fromUser(e.data[0]):null}t.__esModule=!0;var c=n(0),l=r(c),f=n(4),p=r(f),d=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.byEmail=function(e){return this.client.request("users.by-email",{email:e}).then(u)},t.prototype.byId=function(e){return this.client.request("users.by-id",{userId:e}).then(s)},t.prototype.invite=function(e){return this.client.request("users.invite",{email:e}).then(s)},t}(l.default);t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t=[].concat(e);return t.forEach(function(e){e.proofId=e.id,delete e.id}),t}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=n(0),l=r(c),f=n(72),p=r(f),d=n(73),h=r(d),m=n(74),y=r(m),v=n(75),_=r(v),b=n(76),w=r(b),g=n(79),E=r(g),O=n(80),T=r(O),P=n(89),k=r(P),I=n(90),C=r(I),S=n(91),R=r(S),D=n(92),A=r(D),M=n(5),j=r(M),x=n(93),q=r(x),F=n(11),B=r(F),N=n(3),U=n(2),G=r(U),z=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.owners=new p.default(n),r.editors=new h.default(n),r.reviewers=new y.default(n),r.versions=new _.default(n),r.groups=new w.default(n),r.reminders=new q.default(n),r.audit=new E.default(n),r.assets=new T.default(n),r.customTools=new k.default(n),r.integrationReferences=new C.default(n),r.linkCheck=new R.default(n),r.decisions=new A.default(n),r}return a(t,e),t.prototype.setWorkflow=function(e,t){var n=this;return this.client.request("proofs.normalize-workflow",{proofId:e,workflowId:t}).then(function(){return n.client.request("proofs.set-workflow",{proofId:e,workflowId:t})})},t.prototype.setTags=function(e,t){return this.client.request("proofs.set-tags",{relatedId:e,tag:t.join(",")})},t.prototype.deleteTag=function(e,t){return this.client.request("proofs.tag-delete",{relatedId:e,tag:t})},t.prototype.setFile=function(e,t){var n=this;return this.client.request("proofs.set-file",{proofId:e,fileId:t}).then(function(){return n.client.request("proofs.distribute-file",{proofId:e})})},t.prototype.create=function(e){var t=this,n=e.name,r=e.tags,o=void 0===r?[]:r,i=e.dueDate,a=void 0===i?new Date(Date.now()+3*N.DAY_IN_MS):i,s=e.messageToReviewers,u=e.workflow,c=e.workflowTemplate,l=e.proofTemplate,f=e.checklist,p=e.file,d=e.group,h=e.previousProof,m=e.team,y=e.reference,v=e.customTools,_=e.integrationReferences,b=e.reminders,w=void 0===b?[]:b,g=e.owners,E=e.canDownload,O=e.isPublic,T=e.start,P=void 0===T||T,k=e.commentVisibility,I=void 0===k?null:k,C=e.priority;return this.client.request("proofs.create",{proof:{name:n,tags:o,dueDate:a.toISOString?a.toISOString():String(a),messageToReviewers:s,workflowId:u&&u.id||void 0,workflowTemplateId:c&&c.id||void 0,proofTemplateId:l&&l.id||void 0,checklist:f,fileId:p&&p.id||void 0,groupId:d&&d.id||void 0,previousProofId:h&&h.id||void 0,teamSlug:m&&m.slug||void 0,reference:y,integrationReferences:_,reminders:[].concat(w),owners:g,canDownload:E,isPublic:O,start:P,commentVisibility:I,priority:C}}).then(function(e){var n=(new j.default).fromProof(e.data);return n.calculateState(),v&&!h?t.customTools.update(n.id,v).then(function(){return n}):n})},t.prototype.archive=function(e){return this.client.request("proofs.archive",{proofIds:e})},t.prototype.unarchive=function(e){return this.client.request("proofs.unarchive",{proofId:e})},t.prototype.delete=function(e){return this.client.request("proofs.delete",{proofId:e})},t.prototype.finish=function(e,t){return this.client.request("proofs.finish",{proofId:e,decision:t})},t.prototype.approve=function(e,t){return this.client.request("proofs.manual-approval",{proofId:e,message:t})},t.prototype.withdrawApproval=function(e,t){return this.client.request("proofs.withdraw-approval",{proofId:e,messageToSender:t})},t.prototype.generateEmail=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.client.request("email.proofs.generate",u({proofId:e},t)).then(function(e){return e.data})},t.prototype.return=function(e){return this.client.request("proofs.return",{proofIds:[].concat(e)}).then(function(e){return{proofIds:e.data.ProofIds,errors:e.data.Errors.map(function(e){return{proofId:e.ProofId,errorCode:e.ErrorCode,errorMessage:e.ErrorMessage}})}})},t.prototype.start=function(e){return this.client.request("proofs.start",{proofId:e})},t.prototype.removeEditor=function(e){return this.client.request("proofs.remove-editor",{proofId:e})},t.prototype.load=function(e){return this.client.request("proofs.load",{proofId:e}).then(function(e){return(new j.default).fromProof(e.data)})},t.prototype.lock=function(e){return this.client.request("proofs.lock",{proofId:e})},t.prototype.unlock=function(e){return this.client.request("proofs.unlock",{proofId:e})},t.prototype.requestUnlock=function(e){return this.client.request("proofs.request-unlock",{proofId:e})},t.prototype.requestAccess=function(e){return this.client.request("proofs.request-access",{proofId:e})},t.prototype.images=function(e){return this.client.request("proofs.images",{proofId:e}).then(function(e){return e.data.proof.file})},t.prototype.videoCredentials=function(e){var t=this;return this.client.cache.auto(N.VIDEO_CREDENTIALS_CACHE_PREFIX+e,function(){return t._videoCredentials(e)})},t.prototype._videoCredentials=function(e){var t=this,n=new G.default;return this.client.request("proofs.video-credentials",{proofId:e}).then(function(e){return Promise.all([e.data.envelope.envelope,t.client.rawRequest({method:"GET",url:new B.default(e.data.videoCredentials.url)}).then(function(e){return e.body})])}).then(function(e){var n=e[0],r=e[1];return t.client.crypto().decryptImage(n+"-"+r,t.client.keyPairs.getPrivateKeyPEMs())}).then(function(e){return n.createBase64(e).then(function(e){return n.read(e)})}).then(function(e){try{return JSON.parse(e)}catch(o){var t=e.split("|"),n=t[0],r=t[1];return{streamingUrl:n.replace("http://","https://")+"/manifest(format=m3u8-aapl,encryption=cbc)",accessToken:r,manifestUrl:n.replace("http://","https://")+"/manifest",bearerToken:r}}})},t.prototype._getProofSetup=function(e,t){return this.client.request("integrations.get-proof-setup",{integration_key:e,id:t}).then(function(e){return{payload:e.data.payload}})},t.prototype.setMessageToReviewers=function(e,t){return this.client.request("proofs.set-message-to-reviewers",{proofIds:[].concat(e),messageToReviewers:t})},t.prototype.returnTodos=function(e,t){var n=t.messageToOwners,r=t.markCommentsAsTodo,o=void 0!==r&&r;return this.client.request("proofs.return-todos",{proofIds:[].concat(e),messageToOwners:n,markCommentAsTodo:o})},t.prototype.updateDecision=function(e,t){return this.client.request("proofs.update-decision",{proofId:e,decision:t})},t.prototype.update=function(e){if(1===e.length||void 0===e.length){var t=[].concat(e)[0],n=t.id,r=t.name,o=t.tags,i=t.dueDate,a=t.messageToReviewers,u=t.workflow,c=t.checklist,l=t.group,f=t.proofTemplate,p=t.file,d=t.reference,h=t.integrationReferences,m=t.reminders,y=t.owners,v=t.canDownload,_=t.isPublic,b=t.start,w=t.commentVisibility,g=t.priority;return this.client.request("proofs.update",{proof:{id:n,name:r,tags:o,dueDate:i?i.toISOString():void 0,messageToReviewers:a,workflowId:u&&u.id||void 0,proofTemplateId:f&&f.id||void 0,checklist:c,fileId:p&&p.id||void 0,groupId:l&&l.id||void 0,reference:d,integrationReferences:h,reminders:m?[].concat(m):void 0,owners:y,canDownload:v,isPublic:_,start:b,commentVisibility:w,priority:g}}).then(function(e){var t=(new j.default).fromProof(e.data);return t.calculateState(),t})}return this.client.request("proofs.bulk-update",{proofs:s(e)})},t.prototype.next=function(e){return this.client.request("proofs.next",{proofId:e}).then(function(e){return(new j.default).fromProof(e.data)})},t.prototype.addWorkflow=function(e,t){return this.client.request("proofs-workflow.add-bulk",{proofIds:[].concat(e),workflowTemplateId:t})},t.prototype.sendShareLink=function(e){var t=e.proofId,n=e.message,r=e.emailAddresses;return this.client.request("proofs.send-share-link",{proofId:t,message:n,emailAddresses:r})},t.prototype.getWorkflowMetrics=function(e){return this.client.request("proofs.get-workflow-metrics",{proofId:e}).then(function(e){return e.data?e.data.workflowMetrics:null})},t}(l.default);t.default=z},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.add=function(e,t){return this.client.request("proofs-owners.add",{proofIds:[].concat(e),users:[].concat(t)})},t.prototype.remove=function(e,t){return this.client.request("proofs-owners.remove",{proofId:e,users:[].concat(t)})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){var t=[].concat(e);return t.forEach(function(e){e.editorMessage=e.messageToEditors,delete e.messageToEditors}),t}t.__esModule=!0;var s=n(0),u=function(e){return e&&e.__esModule?e:{default:e}}(s),c=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.add=function(e,t,n){var r={proofId:e,editors:[].concat(t),editorMessage:null===n?"":n};return this.client.request("proofs.editors.add",r)},t.prototype.addBulk=function(e){return this.client.request("proofs.editors.add-bulk",{proofsWithEditors:a(e)})},t.prototype.remove=function(e,t){return this.client.request("proofs.editors.remove",{proofId:e,editors:[].concat(t)})},t.prototype.replace=function(e,t,n){return this.client.request("proofs.editors.replace",{proofId:e,oldEditors:[].concat(t),newEditors:[].concat(n)})},t.prototype.set=function(e,t){return this.client.request("proofs.editors.set",{proofId:e,editors:[].concat(t)})},t}(u.default);t.default=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.add=function(e,t){return this.client.request("proofs-reviewers.add",{proofIds:[].concat(e),reviewers:[].concat(t)})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(27),l=r(c),f=n(28),p=(0,f.sortObjectsByKey)("version"),d=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.attach=function(e,t){return this.client.request("proofs.versions.attach",{proofId:e,versionId:t})},t.prototype.list=function(e){return this.client.request("proofs.versions.list",{proofId:e}).then(function(e){return e.data.map(function(e){return(new l.default).fromProofVersion(e)}).sort(p)})},t}(u.default);t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return(new p.default).fromProofGroup(e.data)}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=n(0),l=r(c),f=n(10),p=r(f),d=n(77),h=r(d),m=n(78),y=r(m),v=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.owners=new h.default(n),r.workflows=new y.default(n),r}return a(t,e),t.prototype.create=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=e.isOwnedByTeam;return this.client.request("proofs.groups.create",{name:t,ownedByTeam:n}).then(s)},t.prototype.load=function(e){return this.client.request("proofs.groups.load",{groupId:e}).then(s)},t.prototype.ready=function(e){return this.client.request("proofs.groups.ready",{groupId:e})},t.prototype.update=function(e,t){var n=t.name,r=t.isOwnedByTeam,o=t.folder;return this.client.request("proofs.groups.update",{groupId:e,name:n,ownedByTeam:r,folderName:o&&o.name}).then(s)},t.prototype.removeProof=function(e){return this.client.request("proofs.groups.remove-proof",{proofId:e})},t.prototype.addProof=function(e,t){return this.client.request("proofs.groups.add-proof",{groupId:e,proofId:t})},t.prototype.delete=function(e){return this.client.request("proofs.groups.delete",{groupId:e})},t.prototype.archive=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(function(e){return"string"==typeof e}))return this.client.request("proofs.groups.archive",{groupIds:t});var r={archiveProofs:!1},o=t[0],i=t[1],a=void 0===i?r:i,s=[].concat(o);return this.client.request("proofs.groups.archive",u({groupIds:s},a))},t.prototype.reopen=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.client.request("proofs.groups.reopen",{groupIds:t})},t}(l.default);t.default=v},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.add=function(e,t){return this.client.request("proofs.groups.owners.add",{groupId:e,owners:[].concat(t)})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.addReviewers=function(e,t){return this.client.request("proofs.groups.workflows.add-reviewers",{groupId:e,reviewers:[].concat(t)})},t.prototype.replaceApprover=function(e,t){return this.client.request("proofs.groups.replace-approver",{groupId:e,user:t})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.summary=function(e){return this.client.request("proofs.audit.summary",{proofId:e}).then(function(e){return e.data.summary})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(81),l=r(c),f=n(88),p=r(f),d=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.extractedText=new p.default(n),r.colorSeparations=new l.default(n),r}return a(t,e),t}(u.default);t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(11),l=r(c),f=n(2),p=r(f),d=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.resources=function(e){return this.client.request("proofs.assets.color-separations",{proofId:e}).then(function(e){return e.data.result}).catch(function(e){if(!e||!e.response||400!==e.response.code)throw e})},t.prototype.download=function(e,t,n){var r=this,o=e.pages.filter(function(e){return e.number===t});if(!o.length)return Promise.reject(new Error("Page does not have any color separation plates."));var i=o[0].plates.filter(function(e){return e.name===n});if(!i.length)return Promise.reject(new Error("Page "+t+' does not have a plate named "'+n+'".'));var a=new l.default(i[0].url),s=e.envelope,u=new p.default;return this.client.rawRequest({method:"GET",url:a},{bluffer:!0}).then(function(e){return e.body}).then(function(e){return u.readBase64(e)}).then(function(e){return r.client.crypto().decryptBytes(e,s,r.client.keyPairs.getPrivateKeyPEMs(),[],[])}).then(function(e){return u.createBase64(e)})},t}(u.default);t.default=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(17),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a=function(){function e(){r(this,e)}return e.prototype.create=function(e){return Promise.resolve(new Blob([(0,i.default)(e)]))},e.prototype.createBase64=function(e){return this.create(atob(e))},e.prototype.createArrayBuffer=function(e){return Promise.resolve(new Blob([e]))},e.prototype.combine=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Promise.resolve(new Blob(t))},e.prototype.slice=function(e,t,n){return Promise.resolve(e.slice(t,n))},e.prototype.read=function(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=function(){n(r.error)},r.readAsText(e)})},e.prototype.readBase64=function(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(){var e=r.result;t(e.substring(e.indexOf(",")+1))},r.onerror=function(){n(r.error)},r.readAsDataURL(e)})},e.prototype.readArrayBuffer=function(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=function(){n(r.error)},r.readAsArrayBuffer(e)})},e.prototype.size=function(e){return e.size},e}();t.default=a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=function(){function e(){r(this,e)}return e.prototype.create=function(e){return Promise.resolve(Buffer.from(e))},e.prototype.createBase64=function(e){return Promise.resolve(Buffer.from(e,"base64"))},e.prototype.createArrayBuffer=function(e){for(var t=Buffer.alloc(e.byteLength),n=new Uint8Array(e),r=0;r<t.length;r++)t[r]=n[r];return Promise.resolve(t)},e.prototype.combine=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Promise.resolve(Buffer.concat(t))},e.prototype.slice=function(e,t,n){return Promise.resolve(e.slice(t,n))},e.prototype.read=function(e){return Promise.resolve(e.toString())},e.prototype.readBase64=function(e){return Promise.resolve(e.toString("base64"))},e.prototype.readArrayBuffer=function(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r<e.length;r++)n[r]=e[r];return Promise.resolve(t)},e.prototype.size=function(e){return Buffer.byteLength(e)},e}();t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){for(var t=e.length,n=e.length-1;n>=0;n--){var r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}t.__esModule=!0;var a=n(85),s=n(29),u=r(s),c=n(17),l=r(c),f=function(){function e(){o(this,e)}return e.prototype.create=function(e){return Promise.resolve(e)},e.prototype.createBase64=function(e){return Promise.resolve((0,a.atob)(e))},e.prototype.createArrayBuffer=function(e){return Promise.resolve((0,u.default)(e))},e.prototype.combine=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Promise.resolve(t.join(""))},e.prototype.slice=function(e,t,n){return Promise.resolve(e.slice(t,n))},e.prototype.read=function(e){return Promise.resolve(e)},e.prototype.readBase64=function(e){return Promise.resolve((0,a.btoa)(e))},e.prototype.readArrayBuffer=function(e){return Promise.resolve((0,l.default)(e))},e.prototype.size=function(e){return i(e)},e}();t.default=f},function(e,t,n){!function(){function e(e){this.message=e}var n=t,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.prototype=new Error,e.prototype.name="InvalidCharacterError",n.btoa||(n.btoa=function(t){for(var n,o,i=String(t),a=0,s=r,u="";i.charAt(0|a)||(s="=",a%1);u+=s.charAt(63&n>>8-a%1*8)){if((o=i.charCodeAt(a+=.75))>255)throw new e("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");n=n<<8|o}return u}),n.atob||(n.atob=function(t){var n=String(t).replace(/[=]+$/,"");if(n.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,i,a=0,s=0,u="";i=n.charAt(s++);~i&&(o=a%4?64*o+i:i,a++%4)?u+=String.fromCharCode(255&o>>(-2*a&6)):0)i=r.indexOf(i);return u})}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return e.byteLength!==e.buffer.byteLength?e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength):e.buffer}function a(e){return new Uint8Array(e)}function s(e){return(0,d.default)(i(e))}function u(e){return a((0,m.default)(e))}function c(e){for(var t=new Uint8Array(e.reduce(function(e,t){return e+t.byteLength},0)),n=0,r=0;n<e.length;n++)t.set(e[n],r),r+=e[n].byteLength;return t}t.__esModule=!0;var l=n(87),f=r(l),p=n(29),d=r(p),h=n(17),m=r(h),y=function(){function e(){o(this,e)}return e.prototype.create=function(e){return Promise.resolve(u(e))},e.prototype.createBase64=function(e){return Promise.resolve(f.default.toByteArray(e))},e.prototype.createArrayBuffer=function(e){return Promise.resolve(a(e))},e.prototype.combine=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Promise.resolve(c(t))},e.prototype.slice=function(e,t,n){return Promise.resolve(e.slice(t,n))},e.prototype.read=function(e){return Promise.resolve(s(e))},e.prototype.readBase64=function(e){return Promise.resolve(f.default.fromByteArray(e))},e.prototype.readArrayBuffer=function(e){return Promise.resolve(i(e))},e.prototype.size=function(e){return e.byteLength},e}();t.default=y},function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function o(e){var t=r(e),n=t[0],o=t[1];return 3*(n+o)/4-o}function i(e,t,n){return 3*(t+n)/4-n}function a(e){var t,n,o=r(e),a=o[0],s=o[1],u=new p(i(e,a,s)),c=0,l=s>0?a-4:a;for(n=0;n<l;n+=4)t=f[e.charCodeAt(n)]<<18|f[e.charCodeAt(n+1)]<<12|f[e.charCodeAt(n+2)]<<6|f[e.charCodeAt(n+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===s&&(t=f[e.charCodeAt(n)]<<2|f[e.charCodeAt(n+1)]>>4,u[c++]=255&t),1===s&&(t=f[e.charCodeAt(n)]<<10|f[e.charCodeAt(n+1)]<<4|f[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u}function s(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function u(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(s(r));return o.join("")}function c(e){for(var t,n=e.length,r=n%3,o=[],i=0,a=n-r;i<a;i+=16383)o.push(u(e,i,i+16383>a?a:i+16383));return 1===r?(t=e[n-1],o.push(l[t>>2]+l[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(l[t>>10]+l[t>>4&63]+l[t<<2&63]+"=")),o.join("")}t.byteLength=o,t.toByteArray=a,t.fromByteArray=c;for(var l=[],f=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,m=d.length;h<m;++h)l[h]=d[h],f[d.charCodeAt(h)]=h;f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(11),l=r(c),f=n(2),p=r(f),d=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.resources=function(e){return this.client.request("proofs.assets.extracted-text",{proofId:e}).then(function(e){return e.data.result}).catch(function(e){if(!e||!e.response||400!==e.response.code)throw e})},t.prototype.download=function(e,t){var n=this,r=e.pages.filter(function(e){return e.number===t});if(!r||!r.length)return Promise.reject(new Error("Page does not contain any text."));var o=e.envelope,i=new l.default(r[0].chunks[0].url),a=new p.default;return this.client.rawRequest({method:"GET",url:i},{bluffer:!0}).then(function(e){return e.body}).then(function(e){return a.readBase64(e)}).then(function(e){return n.client.crypto().decryptBytes(e,o,n.client.keyPairs.getPrivateKeyPEMs(),[],["unzip"])}).then(function(e){return a.createBase64(e)}).then(function(e){return a.readArrayBuffer(e)}).then(function(e){return n.client.protobuf().ExtractedText(e)})},t}(u.default);t.default=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.validate=function(e){return this.client.request("proofs.custom-tools.validate",{schema:e}).then(function(){})},t.prototype.load=function(e){return this.client.request("proofs.custom-tools.load",{proofId:e}).then(function(e){return e.data.tools})},t.prototype.update=function(e,t){return this.client.request("proofs.custom-tools.update",{proofId:e,updates:t}).then(function(e){return e.data.tools})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(0),u=function(e){return e&&e.__esModule?e:{default:e}}(s),c=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.availableIntegrations=function(){return this.client.request("integrations.get-available-reference-integrations").then(function(e){return e.data.integrations})},t.prototype.options=function(e,t){return this.client.request("integrations.get-available-reference-options",{params:a({},t,{integration_key:e})}).then(function(e){return e.data.optionTypes})},t.prototype.add=function(e,t){return this.client.request("integrations.proof-integration-references.add",{proofId:e,integrationReference:t})},t.prototype.remove=function(e,t){return this.client.request("integrations.proof-integration-references.remove",{proofId:e,referenceId:t})},t.prototype.loadReferenceAdditionalInformation=function(e,t,n){return this.client.request("integrations.load-reference-additional-information",{params:a({},n,{reference_type:e,reference_id:t})}).then(function(e){return e.data.information})},t}(u.default);t.default=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.results=function(e){return this.client.request("proofs.link-check.results",{proofId:e})},t.prototype.recheck=function(e){return this.client.request("proofs.link-check.recheck",{proofId:e})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.load=function(e){return this.client.request("proofs.decisions.load",{proofId:e}).then(function(e){return e.data.decisions})},t.prototype.getOptions=function(e){return this.client.request("proofs.decisions.get-options",{proofId:e,type:"options"}).then(function(e){return{currentDecision:e.data.currentDecision,options:e.data.options}})},t.prototype.leaveDecision=function(e,t){return this.client.request("proofs.decisions.leave-decision",{proofId:e,decisionId:t})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return e.map(function(e){return(new f.default).fromReminder(e)})}t.__esModule=!0;var u=n(0),c=r(u),l=n(94),f=r(l),p=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.add=function(e,t){return this.client.request("reminders.add",{entityId:e,reminders:[{action:t.action,relativeTo:t.relativeTo,relativeDate:t.relativeDate,absoluteDate:t.absoluteDate}]}).then(function(e){return s(e.data)})},t.prototype.set=function(e,t){return this.client.request("reminders.set",{entityId:e,reminders:t.map(function(e){return[{action:e.action,relativeTo:e.relativeTo,relativeDate:e.relativeDate,absoluteDate:e.absoluteDate}]})}).then(function(e){return s(e.data)})},t.prototype.update=function(e,t){return this.client.request("reminders.update",{reminderId:e,relativeDate:t})},t.prototype.delete=function(e){return this.client.request("reminders.delete",{reminderIds:[].concat(e)})},t.prototype.all=function(e){return this.client.request("reminders.all",{entityId:e}).then(function(e){return s(e.data)})},t}(c.default);t.default=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={id:"ReminderId",action:"Action",absoluteDate:(0,o.date)("TriggerDate"),relativeTo:"RelativeTo",relativeDate:"RelativeDate"},s=function(){function e(){r(this,e)}return e.prototype.fromReminder=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(5),l=r(c),f=n(9),p=r(f),d=n(3),h=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.setTags=function(e,t){return this.client.request("proofs.set-tags",{relatedId:e,tag:t.join(",")})},t.prototype.deleteTag=function(e,t){return this.client.request("proofs.tag-delete",{relatedId:e,tag:t})},t.prototype.setFile=function(e,t){var n=this;return this.client.request("proofs.set-file",{proofId:e,fileId:t}).then(function(){return n.client.request("proofs.distribute-file",{proofId:e})})},t.prototype.create=function(e){var t=this,n=e.name,r=e.file,o=e.isPublic,i=e.tags,a=void 0===i?[]:i,s=e.dueDate,u=void 0===s?new Date(Date.now()+3*d.DAY_IN_MS):s;return this.client.request("briefs.create",{title:n,isPublic:o,messageToRecipient:"",dueDate:u.toISOString(),tag:a.join(",")}).then(function(e){var n=(new l.default).fromProof(e.data.Brief);return Promise.all([n,r&&t.setFile(n.id,r.id)])}).then(function(e){var t=e[0];return r&&(t.fileId=r.id,t.fileStatus=p.default.UPLOADING),t.calculateState(),t})},t.prototype.update=function(e){var t=this,n=e.briefId,r=e.data,o=e.start,i=void 0!==o&&o;return this.client.request("briefs.update",{briefId:n,title:r.title,messageToRecipient:r.messageToRecipient,dueDate:r.dueDate?r.dueDate.toISOString():"",tag:r.tags?r.tags.join(","):"",recipient:r.recipient,editorId:r.editorId,editorMessage:r.editorMessage,isPublic:r.isPublic}).then(function(e){return(new l.default).fromProof(e.data.Brief)}).then(function(e){return Promise.resolve(i&&t.start(e.id)).then(function(){return e})})},t.prototype.delete=function(e){return this.client.request("proofs.delete",{proofId:e})},t.prototype.start=function(e){return this.client.request("briefs.start",{briefId:e})},t}(u.default);t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){var t=e.lastIndexOf(".");return{name:e.substring(0,t),extension:e.substring(t+1)}}function c(e,t,n){return(1-(t+n))*e+t}t.__esModule=!0;var l=n(0),f=r(l),p=n(18),d=r(p),h=n(9),m=r(h),y=n(30),v=r(y),_=n(97),b=r(_),w=n(2),g=r(w),E=n(3),O=n(31),T=r(O),P=n(98),k=r(P),I=n(32),C=r(I),S=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.generateToken=function(e,t){return e&&!t?Promise.reject(Error('The "assignedType" option is required when specifying the "assignedTo" option.')):!e&&t?Promise.reject(Error('The "assignedTo" option is required when specifying the "assignedType" option.')):this.client.request("files.legacy.generate-token",{relatedId:e,fileType:t}).then(function(e){return e.data.Token})},t.prototype.setCanDownload=function(e,t){return this.client.request("files.can-download.update",{fileId:e,downloadOriginal:t?1:0})},t.prototype._waitFileProcessed=function(e){var t=this;return new Promise(function(n,r){var o=null,i=null;!function a(){t.details(e).then(function(t){switch(o=null,t.status){case m.default.OK:n(t);break;case m.default.ERROR:r(new Error("File "+e+" encountered a processing error: "+t.message));break;default:o=setTimeout(a,5e3)}o&&t.status!==m.default.RIPPING||clearTimeout(i)}).catch(r)}(),i=setTimeout(function(){clearTimeout(o),r(new Error("File did not finish processing within specified duration."))},3e4)})},t.prototype._createWebsiteFile=function(e){var t=this;return this._generateKeyIVEnvelope().then(function(n){var r=n.envelope;return t.client.request("files.import.web",{url:e,envelope:r})}).then(function(e){return e.data})},t.prototype._importFileFromUrl=function(e){var t=this,n=e.name,r=e.url,o=e.provider,i=e.auth,a=e.download,s=o;o===v.default.NONE&&(s="generic");var c=u(n),l=c.name,f=c.extension;return this._generateKeyIVEnvelope().then(function(e){var n=e.envelope;return t.client.request("files.import."+s,{extn:f,filename:l,url:r,envelope:n,accessToken:i,storeOriginal:a})}).then(function(e){return e.data})},t.prototype.import=function(e){var t=this,n=e.name,r=e.url,o=e.provider,i=void 0===o?v.default.NONE:o,a=e.auth,s=e.download,u=void 0!==s&&s,c=e.process,l=void 0!==c&&c;return Object.keys(v.default).some(function(e){return v.default[e]===i})?(i===v.default.WEBSITE?this._createWebsiteFile(r):this._importFileFromUrl({name:n,url:r,provider:i,auth:a,download:u})).then(function(e){if(l)return t._waitFileProcessed(e);var n=new d.default;return n.id=e,n}):Promise.reject(new Error('Unsupported provider "'+i+'"'))},t.prototype.email=function(){return this.client.request("files.create-email").then(function(e){return e.data})},t.prototype._generateKeyIVEnvelope=function(){var e=this;return this.client.crypto().generateKeyIV().then(function(t){return Promise.all([t,e.client.crypto().envelopeSeal(t.keyIV,e.client.keyPairs.getPublicKeyPEMs())])}).then(function(e){return{keyIV:e[0],envelope:e[1]}})},t.prototype.upload=function(){return this.upload__v2.apply(this,arguments)},t.prototype.upload__v2=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.concurrent,i=void 0===r?6:r,a=o(n,["concurrent"]),s=(0,k.default)(i),c=(0,k.default)(1),l=[],f=Array.isArray(e),p=f?e:[e],h=function(e){return l.push(e),c(function(){if(l.length){var e=l.slice();return l.length=0,t.client.request("files.v2.upload-complete",{files:e})}return null})},m=new g.default;return this.client.request("files.v2.generate-credentials",{supports:{providers:["abs","custom"]},files:p.map(function(e){var t=void 0,n=void 0;if(e.extension){var r=[e.name,e.extension];t=r[0],n=r[1]}else{var o=u(e.name),i=[o.name,o.extension];t=i[0],n=i[1]}var a=m.size(e.contents),s=Math.ceil(a/E.BYTES_PER_BLOCK);return e.onProgress&&e.onProgress(0),{name:t,extension:n,chunks:s,size:a,fileTypeOverride:e.fileTypeOverride,hash:null,adobeExportData:e.adobeExportData?JSON.stringify(e.adobeExportData):null,assignedTo:e.assignedTo,assignedType:e.assignedType,canDownload:void 0===e.download||!!e.download}})}).then(function(e){return Promise.all(p.map(function(n,r){var o=e.data[r];n.onProgress&&n.onProgress(1);var i=new d.default;return i.id=o.FileId,n.onFileDetails&&n.onFileDetails(i),t._upload__v2(n,o,a,s,h).then(function(){return i})}))}).then(function(e){return f?e:e[0]})},t.prototype._upload__v2=function(e,t,n,r,o){var i=this;return this._generateKeyIVEnvelope().then(function(a){var s=a.keyIV,u=a.envelope;return new Promise(function(a,l){function f(e,t){var n=A(e,t);return w.push(n),n}function p(){y||r(function(){return _().then(function(e){if(e)return p(),f(e,v++);if(!y){y=!0;var t=Promise.all(w).then(M);a(t)}})})}var d=t.FileId,h=t.UploadCredentials,m=new g.default,y=!1,v=0,_=(0,b.default)(e.contents,function(e){return m.readBase64(e)}),w=[],O=Math.ceil(m.size(e.contents)/E.BYTES_PER_BLOCK),T=new Array(O),P=1,k=function(){},I=e.onProgress;I&&(k=function(e,t){T[e]=Math.max(t,T[e]||0);var r=100*c(T.reduce(function(e,t){return e+(t||0)},0)/O/100,.01,.01);void 0!==n.progressDecimalPlaces&&(r=+r.toFixed(n.progressDecimalPlaces)),P!==r&&(I(r),P=r)});var S=function(e,t){return i.client.rawRequest({method:"PUT",host:h.url,path:"/"+d+"/"+t,query:h.sas,body:e,headers:{"x-ms-blob-type":"BlockBlob"}},{onUploadProgress:k.bind(null,t)})},R=function(e,t){var n={"file.id":d,"chunk.index":t},r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e};return e.replace(/\{([\w\.]+)\}/g,function(e,r){return t(n[r])})},o={};return Object.keys(h.headers).forEach(function(e){var t=r(h.headers[e]);o[r(e)]=t}),i.client.rawRequest({method:h.method,host:r(h.host),path:r(h.path,encodeURIComponent),query:r(h.query,encodeURIComponent),body:e,headers:o},{onUploadProgress:k.bind(null,t)})},D={abs:S,custom:R}[h.type],A=function(e,t){return i.client.crypto().encryptFileBlock(s,e,!0).then(function(e){return m.createBase64(e)}).then(function(e){return m.readArrayBuffer(e)}).then(function(e){function r(){return D(e,t).then(function(e){if(-1===[200,201].indexOf(e.status)){if(o<i)return o++,n.chunkRetryDelay?(0,C.default)(n.chunkRetryDelay).then(r):r();var a=new Error("Failed to upload block #"+t+" (retried "+o+" times).");throw l(a),y=!0,a}return e})}var o=0,i=void 0!==n.chunkRetryLimit?n.chunkRetryLimit:3;return r()})},M=function(){return o({fileId:d,envelope:u}).then(function(){I&&I(100)})};p(),!1!==e.async&&a()})})},t.prototype.upload__legacy=function(e){var t=this,n=e.name,r=e.contents,o=e.adobeExportData,i=e.assignedTo,a=e.assignedType,s=e.download,u=void 0!==s&&s,c=e.async,l=void 0===c||c,f=e.onProgress,p=e.onError;return this.generateToken(i,a).then(function(e){return Promise.all([e,t._generateKeyIVEnvelope()])}).then(function(e){var i=e[0],a=e[1],s=a.keyIV,c=a.envelope,d=t._upload__legacy({name:n,contents:r,adobeExportData:o,download:u,token:i,keyIV:s,envelope:c,onProgress:f,onError:p});return l&&(d=Promise.resolve()),d.then(function(){return i})}).then(function(e){var t=new d.default;return t.id=e,t})},t.prototype._upload__legacy=function(e){var t=this,n=e.name,r=e.contents,o=e.adobeExportData,i=e.download,a=e.token,s=e.keyIV,c=e.envelope,l=e.onProgress;return new Promise(function(e){function f(){y().then(function(t){if(!w)if(null===t)w=!0,e(v.then(C));else{var n=I(t,_++);v=v.then(function(){return n}),n.then(f)}})}var p=4,d=u(n),h=d.name,m=d.extension,y=(0,b.default)(r),v=Promise.resolve(),_=0,w=!1,O=new g.default,T=Math.ceil(O.size(r)/E.BYTES_PER_BLOCK),P=new Array(T),k=function(){};l&&(k=function(e,t){P[e]=Math.max(t,P[e]||0),l(P.reduce(function(e,t){return e+(t||0)},0)/T*.99)});for(var I=function(e,n){return t.client.crypto().encryptFileBlock(s,e).then(function(e){return t.client.request("files.legacy.upload-block",{block:n,part:1,token:a,data:e},{onUploadProgress:k.bind(null,n)})})},C=function(){return t.client.request("files.legacy.upload-complete",{block:0,blockCount:_,part:0,token:a,extn:m,pages:1,filename:h,storeoriginal:i?1:0,adobeExportData:o?JSON.stringify(o):null,envelope:c}).then(function(){return l&&l(100)})};p--;)f()})},t.prototype.download=function(e){var t=this,n="string"==typeof e?{fileId:e}:e,r=n.fileId,o=n.onFileDetails;return this.details(r).then(function(e){if(!n.silent){if(!e.downloadable)throw new Error("File "+r+" is not downloadable.");if(e.status!==m.default.OK)throw new Error("File "+r+" cannot be download. The file may still be uploading, processing or has errored.");if(!e.blocks)throw new Error("File "+r+" is empty.")}return o&&o(e),t._downloadFile(e,n)})},t.prototype._downloadFile=function(e,t){var n=this;return new Promise(function(r){function o(){if(!m)if(h<u.length){var e=h++,t=d(e);c=c.then(function(){return t.then(function(t){return l(t,e,s)})}),t.then(o)}else m=!0,r(c.then(y))}var i=4,a=new g.default,s=e.blocks,u=new Array(s),c=Promise.resolve(),l=t.onData||function(e,t){u[t]=e},f=function(){};if(t.onProgress){var p=new Array(s);f=function(e,n){p[e]=Math.max(n,p[e]||0),t.onProgress(p.reduce(function(e,t){return e+(t||0)},0)/s*.99)}}for(var d=function(r){return n.client.request("files.download-block",{proofId:e.assignedTo,fileId:e.id,block:r+1,s:t.silent?1:void 0},{onDownloadProgress:f.bind(null,r)}).then(function(e){return n.client.crypto().decryptFileBlock(e.data,n.client.keyPairs.getPrivateKeyPEMs()).then(function(e){return a.createBase64(e)})})},h=0,m=!1,y=function(){return t.onProgress&&t.onProgress(100),t.onData?null:a.combine.apply(a,u)};i--;)o()})},t.prototype.details=function(e){return this.client.request("files.details",{fileId:e}).then(function(e){return(new d.default).fromFile(e.data)})},t.prototype.thumbnail=function(e){var t=this;return this.client.cache.auto(E.THUMBNAIL_CACHE_PREFIX+e,function(){return t._thumbnail(e)})},t.prototype._thumbnail=function(e){var t=this;return this.client.request("files.thumbnail",{fileId:e}).then(function(e){return t.client.crypto().decryptImage(e.data,t.client.keyPairs.getPrivateKeyPEMs())}).then(function(e){return(new g.default).createBase64(e)})},t.prototype.preview=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"low";return this.client.cache.auto(E.PREVIEW_CACHE_PREFIX+e+n+r,function(){return t._preview(e,n,r)})},t.prototype._preview=function(e,t,n){var r=this;return this.client.request("files.preview",{fileId:e,pageNumber:t,quality:{low:"lo",high:"hi"}[n]||n}).then(function(e){return r.client.crypto().decryptImage(e.data,r.client.keyPairs.getPrivateKeyPEMs())}).then(function(e){return(new g.default).createBase64(e)})},t.prototype.thumbnails=function(e,t){var n=this,r=t.async,o=void 0!==r&&r,i=t.onLoadThumbnail,a=t.onLoadThumbnails,s=t.onLoadThumbnailsThrottleMs,u=void 0===s?1e3:s,c=t.onLoadError,l=[],f={},p=a?(0,T.default)(function(){Object.keys(f).length&&(a(f),f={})},u):function(){};return Promise.all(e.map(function(e){return n.client.cache.auto(E.THUMBNAIL_CACHE_PREFIX+e,function(t){l.push({fileId:e,resolve:t})}).then(function(t){var n;return t&&(n={},n[e]=t,n)})})).then(function(e){var t=Promise.all(l.map(function(e){var t=e.fileId,r=e.resolve;return n._thumbnail(t).then(function(e){var n;if(r(e),i){var o;i((o={},o[t]=e,o))}return f[t]=e,p(),n={},n[t]=e,n}).catch(function(e){return c&&c(e,t),o?{}:Promise.reject(e)})}));return o?e:t.then(function(t){return[].concat(e,t)})}).then(function(e){return Object.assign.apply(Object,[{}].concat(e))})},t.prototype.duplicate=function(e){return this.client.request("files.duplicate",{id:e}).then(function(e){return e.data.file})},t}(f.default);t.default=S},function(e,t,n){"use strict";function r(e){return(new s.default).readBase64(e).then(function(e){return"data:;base64,"+e})}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,n=new s.default,o=0,a=Promise.resolve(),u=n.size(e);return function(){var r=o++*i.BYTES_PER_BLOCK,s=r+i.BYTES_PER_BLOCK;return a=a.then(function(){return r>u?null:n.slice(e,r,s).then(t)})}}t.__esModule=!0;var i=n(3),a=n(2),s=function(e){return e&&e.__esModule?e:{default:e}}(a);t.default=o},function(e,t,n){"use strict";function r(e){function t(){if(n<e&&r.length){var o=r.shift(),i=o.handler,a=o.callback;return n+=1,Promise.resolve(i()).then(function(){return a(null)},function(e){return a(e)}).then(function(){return n-=1,t()})}return Promise.resolve()}var n=0,r=[];return function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise(function(o,i){var a={handler:e,callback:function(e){e?i(e):o()}};n?r.splice(0,0,a):r.push(a),t()})}}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(100),l=r(c),f=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.team=new l.default(n),r}return a(t,e),t}(u.default);t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(101),l=r(c),f=n(102),p=r(f),d=n(104),h=r(d),m=n(115),y=r(m),v=n(118),_=r(v),b=n(119),w=r(b),g=n(35),E=r(g),O=n(120),T=r(O),P=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.users=new l.default(n),r.dashboard=new p.default(n),r.features=new h.default(n),r.preferences=new y.default(n),r.scim=new _.default(n),r.workflows=new w.default(n),r.integrations=new E.default(n,"team"),r.customTools=new T.default(n),r}return a(t,e),t}(u.default);t.default=P},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return e.data.map(function(e){return(new d.default).fromUser(e)})}t.__esModule=!0;var u=n(0),c=r(u),l=n(2),f=r(l),p=n(4),d=r(p),h=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.enabled=function(){return this.client.request("admin.team.users.enabled").then(s)},t.prototype.disabled=function(){return this.client.request("admin.team.users.disabled").then(s)},t.prototype.getInvitations=function(){return this.client.request("admin.team.users.invitations").then(function(e){return e.data})},t.prototype._setEnabled=function(e,t){return this.client.request("admin.team.users.set-enabled",{email:e,enabled:t})},t.prototype.enable=function(e){return this._setEnabled(e,!0)},t.prototype.disable=function(e){return this._setEnabled(e,!1)},t.prototype.invite=function(e){return this.client.request("admin.team.users.invite",{emails:[].concat(e)})},t.prototype.revokeInvitation=function(e){var t=e.email,n=e.invitationId;return this.client.request("admin.team.users.revoke-invitation",{email:t,invitationId:n})},t.prototype.remove=function(e){return this.client.request("admin.team.users.remove-from-team",{users:[].concat(e)})},t.prototype.uploadAvatar=function(e,t){var n=this;return(new f.default).readBase64(t).then(function(t){return n.client.request("admin.team.users.upload-avatar",{userId:e,uploadedImage:"data:image/png;base64,"+t})})},t.prototype.deleteAvatar=function(e){return this.client.request("admin.team.users.delete-avatar",{userId:e})},t}(c.default);t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){var n={};return n.proofs=u(e[v[t]]),n.total=e.ProofsNumber,n}function u(e){return(e||[]).map(function(e){return(new p.default).fromProof(e)})}t.__esModule=!0;var c=n(0),l=r(c),f=n(5),p=r(f),d=n(8),h=r(d),m=n(103),y=r(m),v={inbox:"ProofIn",sent:"ProofSent",outbox:"ProofOut",search:"Proofs"},_=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.groups=new y.default(n),r}return a(t,e),t.prototype.inbox=function(e){return this._loadSingleTeamTabProofs("inbox",{page:e})},t.prototype.sent=function(e){return this._loadSingleTeamTabProofs("sent",{page:e})},t.prototype.outbox=function(e){return this._loadSingleTeamTabProofs("outbox",{page:e})},t.prototype._loadSingleTeamTabProofs=function(e,t){return this.client.request("team.dashboard."+e,t).then(function(t){return s(t.data,e)}).then(function(e){return e})},t.prototype.everything=function(e){return this.search(void 0,{everything:!0,page:e})},t.prototype.approved=function(e){return this.search(void 0,{status:h.default.APPROVED,page:e})},t.prototype.archived=function(e){return this.search(void 0,{status:h.default.ARCHIVED,page:e})},t.prototype.search=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.status,r=t.everything,o=t.page;return this._loadTeamSearchProofs({query:e,filterBy:void 0===n?void 0:[].concat(n).join(","),all:r?1:0,page:o})},t.prototype._loadTeamSearchProofs=function(e){return this.client.request("team.dashboard.search",e).then(function(e){return s(e.data,"search")})},t}(l.default);t.default=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return(e||[]).map(function(e){return(new p.default).fromProofGroup(e)})}function u(e){return(new p.default).fromProofGroup(e.data)}t.__esModule=!0;var c=n(0),l=r(c),f=n(10),p=r(f),d=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype._loadGroups=function(e){return this.client.request("admin.team.dashboard.groups.category",{category:e}).then(function(e){return s(e.data)})},t.prototype.load=function(e){return this.client.request("admin.team.proofs.groups.load",{groupId:e}).then(u)},t.prototype.current=function(){return this._loadGroups("current")},t.prototype.archived=function(){return this._loadGroups("archived")},t}(l.default);t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(105),l=r(c),f=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.load=function(){return this.client.request("admin.team.features.load").then(function(e){return e.data?(new l.default).fromTeamFeatures(e.data):null})},t.prototype.update=function(e){var t=e.emails,n=e.comments,r=e.proofs,o=e.workflows,i=e.addressBook,a=e.userGroups,s=e.webhooks,u=e.intelligence,c=t&&t.displayComments,l=t&&t.displayTeamName,f=n&&n.generalComments,p=n&&n.privateComments,d=n&&n.enableCommentVisibility,h=n&&n.defaultCommentVisibility,m=o&&o.enableViewOnlyReviewers,y=t&&t.titleTextColor,v=t&&t.linkTextColor,_=t&&t.buttonBackgroundColor,b=t&&t.buttonTextColor,w=n&&n.editComments,g=n&&n.ownerCanDeleteComments,E=n&&n.disableReplyingToCommentsInStatuses&&[].concat(n.disableReplyingToCommentsInStatuses),O=r&&r.reference,T=r&&r.referenceRequired,P=r&&r.publicProofs,k=r&&r.usePreviousVersionDueDate,I=r&&r.defaultIsPublic,C=r&&r.messageToOwners,S=r&&r.allowedDecisions,R=r&&r.enableChecklists,D=r&&r.enableProofMagicAccess,A=r&&r.defaultGifOutput,M=i&&i.suggestionsIncludeTeamMembers,j=a&&a.enableUserGroups,x=s&&s.enabled,q=u&&u.enableIntelligence,F=u&&u.enableSmartTags,B=u&&u.enableSmartCheckCr;return this.client.request("admin.team.features.update",{displayComments:c,displayTeamName:l,generalComments:f,privateComments:p,enableWebhooks:x,enableCommentVisibility:d,defaultCommentVisibility:h,enableViewOnlyReviewers:m,emailTitleTextColor:y,emailLinkTextColor:v,emailButtonBackgroundColor:_,emailButtonTextColor:b,editComments:w,ownerCanDeleteComments:g,disableReplyingToCommentsInStatuses:E,proofReference:O,proofReferenceRequired:T,publicProofs:P,defaultProofIsPublic:I,messageToOwners:C,allowedDecisions:S,enableChecklists:R,enableProofMagicAccess:D,defaultGifOutput:A,enableIntelligence:q,enableIntelligenceSmartTags:F,enableIntelligenceSmartCheckCr:B,suggestionsIncludeTeamMembers:M,enableUserGroups:j,usePreviousVersionDueDate:k})},t.prototype.setSenderEmail=function(e){return this.client.request("admin.team.features.sender-email.set",{senderEmail:e}).then(function(e){return{success:e.data.Success,domain:e.data.Domain,email:e.data.Email,records:e.data.Records&&e.data.Records.map(function(e){return{version:e.Version,current:e.Current,new:e.New}})}})},t}(u.default);t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(1),a=r(i),s=n(106),u=r(s),c=n(107),l=r(c),f=n(108),p=r(f),d=n(109),h=r(d),m=n(110),y=r(m),v=n(111),_=r(v),b=n(112),w=r(b),g=n(113),E=r(g),O=n(114),T=r(O),P={emails:function(e){return(new u.default).fromTeamEmailFeatures(e)},comments:function(e){return(new l.default).fromTeamCommentFeatures(e)},proofs:function(e){return(new p.default).fromTeamProofFeatures(e)},workflows:function(e){return(new h.default).fromTeamWorkflowFeatures(e)},addressBook:function(e){return(new y.default).fromTeamAddressBookFeatures(e)},accounts:function(e){return(new _.default).fromTeamAccountFeatures(e)},webhooks:function(e){return(new w.default).fromTeamWebhookFeatures(e)},userGroups:function(e){return(new T.default).fromTeamUserGroupsFeatures(e)},intelligence:function(e){return(new E.default).fromTeamIntelligenceFeatures(e)}},k=function(){function e(){o(this,e)}return e.prototype.fromTeamFeatures=function(e){return(0,a.default)(this,P,e),this},e}();t.default=k},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={displayComments:"DisplayComments",displayTeamName:"DisplayTeamName",customStyles:"EmailCustomStyles",titleTextColor:"EmailTitleTextColor",linkTextColor:"EmailLinkTextColor",buttonBackgroundColor:"EmailButtonBackgroundColor",buttonTextColor:"EmailButtonTextColor",senderEmail:"SenderEmail"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamEmailFeatures=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={editComments:"EditComments",ownerCanDeleteComments:"OwnerCanDeleteComments",disableReplyingToCommentsInStatuses:"DisableReplyingToCommentsInStatuses",generalComments:"GeneralComments",configurePrivateComments:"LicensePrivateComments",privateComments:"PrivateComments",configureCommentVisibility:"LicenseCommentVisibility",enableCommentVisibility:"EnableCommentVisibility",defaultCommentVisibility:"DefaultCommentVisibility"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamCommentFeatures=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={reference:"ProofReference",referenceRequired:"ProofReferenceRequired",publicProofs:"PublicProofs",usePreviousVersionDueDate:"UsePreviousVersionDueDate",defaultIsPublic:"DefaultProofIsPublic",messageToOwners:"MessageToOwners",allowedDecisions:"AllowedDecisions",enableChecklists:"EnableChecklists",defaultGifOutput:"DefaultGifOutput",enableProofMagicAccess:"EnableProofMagicAccess"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamProofFeatures=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={configureViewOnlyReviewers:"LicenseViewOnlyReviewers",enableViewOnlyReviewers:"EnableViewOnlyReviewers"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamWorkflowFeatures=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={suggestionsIncludeTeamMembers:"SuggestionsIncludeTeamMembers",configureSuggestionsIncludeTeamMembers:"LicenseSuggestionsIncludeTeamMembers"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamAddressBookFeatures=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={teamId:"Id",teamName:"Name",teamType:"Type",teamIsPlus:"IsPlus",teamIsTrial:"IsTrial"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamAccountFeatures=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={configurable:"LicenseWebhooks",enabled:"EnableWebhooks"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamWebhookFeatures=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={enableIntelligence:"EnableIntelligence",enableSmartTags:"EnableIntelligenceSmartTags",enableSmartCheckCr:"EnableIntelligenceSmartCheckCr"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamIntelligenceFeatures=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={licenseUserGroups:"LicenseUserGroups",enableUserGroups:"EnableUserGroups"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamUserGroupsFeatures=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(116),l=r(c),f=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.notifications=new l.default(n),r}return a(t,e),t}(u.default);t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(117),l=r(c),f=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.load=function(){return this.client.request("admin.team.preferences.notifications.load").then(function(e){return e.data?(new l.default).fromTeamNotifications(e.data):null})},t.prototype.set=function(e){var t=e.ownerAddedByAdmin;return this.client.request("admin.team.preferences.notifications.set",{ownerAddedByAdmin:t})},t}(u.default);t.default=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={teamId:"TeamId",ownerAddedByAdmin:"OwnerAddedByAdmin"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamNotifications=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.settings=function(){return this.client.request("scim.admin.settings").then(function(e){return e.data.settings})},t.prototype.enable=function(){return this.client.request("scim.admin.enable").then(function(e){return e.data.settings})},t.prototype.disable=function(){return this.client.request("scim.admin.disable").then(function(){})},t.prototype.regenerateAccessToken=function(e){return this.client.request("scim.admin.regenerate-access-token",{type:e}).then(function(e){return e.data.settings})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return(e||[]).map(function(e){return(new f.default).fromWorkflow(e)})}t.__esModule=!0;var u=n(0),c=r(u),l=n(19),f=r(l),p=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.owned=function(){return this.client.request("admin.team.workflows.owned").then(function(e){return s(e.data)})},t.prototype._getOwnedEmailList=function(){return this.client.request("admin.team.workflows.owned.email-list").then(function(e){return e.data.map(function(e){return{id:e.WorkflowId,emails:e.Emails}})})},t}(c.default);t.default=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.load=function(){return this.client.request("admin.team.custom-tools.load").then(function(e){return e.data.tools})},t.prototype.update=function(e){return this.client.request("admin.team.custom-tools.update",{updates:e}).then(function(e){return e.data.tools})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return e&&((0,v.isUserId)(e.id)||e.email)}function u(e){return(e||[]).map(function(e){return(new p.default).fromWorkflow(e)})}t.__esModule=!0;var c=n(0),l=r(c),f=n(19),p=r(f),d=n(12),h=r(d),m=n(20),y=r(m),v=n(26),_=n(122),b=r(_),w=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.steps=new b.default(n),r}return a(t,e),t.prototype.create=function(e){var t=this,n=e.save,r=void 0!==n&&n,o=e.name,i=e.steps,a=void 0===i?[]:i,u=e.reviewers,c=e.approver,l=e.owners,f=e.isOwnedByTeam,p=void 0!==f&&f,d=Array.isArray(c)?c:[c];if(!d.every(s))return Promise.reject(Error("Please provide an id or email address for every approver."));if(r&&!o)return Promise.reject(Error("A workflow must have a name when saving it as a workflow template."));var h=a;u&&u.length&&h.splice(0,0,{users:u}),c&&h.push({position:1e3,users:d,start:c.start});for(var m=0,y=0;y<h.length;y++){var v=h[y];v.users=v.users||[],(!v.position||v.position<m)&&(v.position=m+1),m=Math.max(m,v.position);for(var _=0;_<v.users.length;_++){if(!s(v.users[_]))return Promise.reject(Error("A user id or email address must be provided for a workflow user."))}}var b=void 0;return this._createWorkflow(o,p).then(function(e){return b=e.id,Promise.all([e,Promise.all(h.map(function(n){var r=e.getStepByPosition(n.position),o={};return n.dueDate&&(o.dueDate=n.dueDate),void 0!==n.mandatoryDecisionThreshold&&(o.mandatoryDecisionThreshold=n.mandatoryDecisionThreshold),n.name&&(o.title=n.name),r?Promise.resolve(Object.keys(o).length&&t.steps.update(r.id,o).then(function(e){r.dueDate=e.dueDate})).then(function(){return t._setWorkflowStepUsersMutate(e.id,r,n.users,n.start)}):t._addWorkflowStepAndUsers(e.id,n,n.start)})),l&&Promise.all(l.map(function(e){return t._addProofOwnerToWorkflowTemplate(b,e)}))])}).then(function(e){var t=e[0],n=e[1];return t.steps=n,t}).then(function(e){return r?t._duplicateWorkflow(b):e}).catch(function(e){return Promise.resolve(b&&t._deleteWorkflow(b)).then(function(){return Promise.reject(e)})})},t.prototype.load=function(e){return this.client.request("workflows.load",{workflowId:e}).then(function(e){return(new p.default).fromWorkflow(e.data)})},t.prototype.use=function(e,t){return this.duplicate(e,t)},t.prototype.duplicate=function(e,t){return this._duplicateWorkflow(e,t)},t.prototype.delete=function(e){return this._deleteWorkflow(e)},t.prototype.all=function(){return Promise.all([this.owned(),this.shared()]).then(function(e){return[].concat(e[0],e[1])})},t.prototype.owned=function(){return this.client.request("workflows.owned").then(function(e){return u(e.data)})},t.prototype.shared=function(){return this.client.request("workflows.shared").then(function(e){return u(e.data)})},t.prototype.setApprover=function(e,t){return this.client.request("workflows.users.set",{workflowId:e,position:1e3,users:[t]})},t.prototype.skipAll=function(e){return this.client.request("workflows.users.skip-all",{workflowId:e})},t.prototype.nudgeUser=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return this.client.request("workflows.user.nudge",{workflowId:e,userId:t,message:n})},t.prototype.nudgeAll=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.client.request("workflows.nudge-all",{workflowIds:[].concat(e),message:t}).then(function(e){return{nudgedWorkflows:e.data.NudgedWorkflows.map(function(e){return{workflowId:e.WorkflowId,users:e.Users.map(function(e){return{userId:e.UserId,role:e.Role,stepId:e.StepId,position:Number(e.Position)}})}}),errors:e.data.Errors.map(function(e){return{workflowId:e.WorkflowId,errorCode:e.ErrorCode,errorMessage:e.ErrorMessage}})}})},t.prototype.setStartingStep=function(e,t){return this.client.request("workflows.set-starting-step",{workflowId:e,stepId:t})},t.prototype.replaceApprover=function(e,t){return this.client.request("workflows.replace-approver",{workflowIds:[].concat(e),user:t})},t.prototype.update=function(e,t){var n=t.name,r=t.isOwnedByTeam;return this.client.request("workflows.update",{workflowId:e,title:n,ownedByTeam:r}).then(function(e){return(new p.default).fromWorkflow(e.data)})},t.prototype.getNudgeAllMessage=function(e){return this.client.request("workflows.nudge-message",{workflowId:e}).then(function(e){return e.data.Message})},t.prototype.getNudgeMessage=function(e,t){return this.client.request("workflows.nudge-message",{workflowId:e,userId:t}).then(function(e){return e.data.Message})},t.prototype.favorite=function(e){return this.client.request("workflows.favorite",{workflowId:e})},t.prototype.unfavorite=function(e){return this.client.request("workflows.unfavorite",{workflowId:e})},t.prototype._duplicateWorkflow=function(e,t){var n=this;return this.client.request("workflows.duplicate",{workflowId:e,noOwners:!(!t||!1!==t.includeOwners)||void 0,excludeStepDueDates:!(!t||!1!==t.includeStepDueDates)||void 0,includeOwnedByTeam:t&&!0===t.includeOwnedByTeam||void 0,includeSharedUsers:t&&!0===t.includeSharedUsers||void 0}).then(function(e){var t=e.data.WorkflowId;return n.load(t)})},t.prototype._deleteWorkflow=function(e){return this.client.request("workflows.delete",{workflowId:e})},t.prototype._createWorkflow=function(e,t){return this.client.request("workflows.create",{title:e,ownedByTeam:t}).then(function(e){return(new p.default).fromWorkflow(e.data)})},t.prototype._addWorkflowStepAndUsers=function(e,t,n){var r=this;return this.client.request("workflows.steps.add",{workflowId:e,title:t.name,position:t.position,dueDate:t.dueDate,mandatoryDecisionThreshold:t.mandatoryDecisionThreshold}).then(function(o){var i=(new h.default).fromWorkflowStep(o.data);return r._setWorkflowStepUsersMutate(e,i,t.users,n)})},t.prototype._setWorkflowStepUsersMutate=function(e,t,n,r){var o=this;return this.client.request("workflows.users.set",{workflowId:e,stepId:t.id,users:n.map(function(e){return{email:e.email,userId:e.id,role:e.role,permissions:e.permissions&&{inviter:!!e.permissions.inviter}}})}).then(function(e){var n=e.data.map(function(e){return(new y.default).fromWorkflowUser(e)});t.users=n}).then(function(){return!0===r?o.setStartingStep(e,t.id).then(function(){return t}):t})},t.prototype._addProofOwnerToWorkflowTemplate=function(e,t){return this.client.request("workflows.proof-owners.add",{relatedId:e,workflowCopyToProof:1,userId:t.id,email:t.email})},t.prototype._getOwnedEmailList=function(){return this.client.request("workflows.owned.email-list").then(function(e){return e.data.map(function(e){return{id:e.WorkflowId,emails:e.Emails}})})},t.prototype._getSharedEmailList=function(){return this.client.request("workflows.shared.email-list").then(function(e){return e.data.map(function(e){return{id:e.WorkflowId,emails:e.Emails}})})},t}(l.default);t.default=w},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(12),u=r(s),c=n(0),l=r(c),f=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.moveBefore=function(e,t){return this.client.request("workflows.steps.move-before",{stepId:e,beforeStepId:t})},t.prototype.moveAfter=function(e,t){return this.client.request("workflows.steps.move-after",{stepId:e,afterStepId:t})},t.prototype.swap=function(e,t){return this.client.request("workflows.steps.swap",{stepId:e,swapStepId:t})},t.prototype.update=function(e,t){var n=t.title,r=t.dueDate,o=t.mandatoryDecisionThreshold;return this.client.request("workflows.steps.update",{stepId:e,title:n,dueDate:r,mandatoryDecisionThreshold:o}).then(function(e){return(new u.default).fromWorkflowStep(e.data)})},t}(l.default);t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return(new p.default).fromPreference(e)}function u(e,t){var n=new Array(e.length);return t.forEach(function(t){n[e.indexOf(t.name)]=t}),n}t.__esModule=!0;var c=n(0),l=r(c),f=n(124),p=r(f),d=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.all=function(){return this.client.request("preferences.all")},t.prototype.get=function(e){var t=[].concat(e);return this.client.request("preferences.get",{preferences:t}).then(function(e){return e.data.map(s)}).then(function(n){return"string"==typeof e?n[0]:u(t,n)})},t.prototype.update=function(e,t){var n,r=void 0!==t?(n={},n[e]=t,n):e;return this.client.request("preferences.update",r)},t.prototype.reset=function(e){return this.client.request("preferences.reset",{preferences:[].concat(e)})},t}(l.default);t.default=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={name:"Name",defaultValue:"DefaultValue",value:"Value"},s=function(){function e(){r(this,e)}return e.prototype.getValueOrDefault=function(){return null===this.value?this.defaultValue:this.value},e.prototype.fromPreference=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t=[];return Object.keys(e).forEach(function(n){e[n].Comments.forEach(function(e){t.push(e)})}),t}function u(e){var t=[],n=[];e.forEach(function(e){var r=(new p.default).fromComment(e);r.parentCommentId?n.push(r):t.push(r)}),t.sort(x);var r=t.map(function(e){return e.id}),o=(0,y.sortObjectsBy)(function(e){return r.indexOf(e.parentCommentId)},!0);return n.sort((0,y.combineSort)(q,o)),t.concat(n)}t.__esModule=!0;var c=n(0),l=r(c),f=n(36),p=r(f),d=n(23),h=r(d),m=n(3),y=n(28),v=n(22),_=n(40),b=r(_),w=n(21),g=r(w),E=n(127),O=n(31),T=r(O),P=n(37),k=r(P),I=n(42),C=n(128),S=r(C),R=n(2),D=r(R),A=(0,y.sortObjectsByKey)("pageNumber"),M=(0,y.sortObjectsByKey)("createdDate",!0),j=(0,y.sortObjectsByKey)("createdDate",!1),x=(0,y.combineSort)(A,M),q=(0,y.combineSort)(A,j),F=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.import=new S.default(n),r}return a(t,e),t.prototype._mark=function(e,t,n){if(-1===Object.keys(h.default).map(function(e){return h.default[e]}).indexOf(t))throw new Error('Cannot mark comment state "'+t+'".');var r=h.default.TODO,o=h.default.DONE,i=h.default.UNMARKED,a={commentId:e};switch(t){case i:a.change=0,a.done=0;break;case r:a.change=n?1:0,a.done=0;break;case o:a.done=n?1:0}return this.client.request("comments.state.update",a).then(function(e){return(0,k.default)(e.data)})},t.prototype._markAll=function(e,t,n,r){if(-1===Object.keys(h.default).map(function(e){return h.default[e]}).indexOf(n))throw new Error('Cannot mark comment state "'+n+'".');var o=h.default.TODO,i=h.default.DONE,a=h.default.UNMARKED,s={proofId:e,commentIds:t};switch(n){case a:s.change=0,s.done=0;break;case o:s.change=r?1:0,s.done=0;break;case i:s.done=r?1:0}return this.client.request("comments.state.multiple-update",s).then(function(e){return e.data.map(function(e){return{commentId:e.CommentId,commentState:(0,k.default)(e)}})})},t.prototype.mark=function(e,t){return this._mark(e,t,!0)},t.prototype.unmark=function(e,t){return this._mark(e,t,!1)},t.prototype.markAll=function(e,t,n){return this._markAll(e,t,n,!0)},t.prototype.unmarkAll=function(e,t,n){return this._markAll(e,t,n,!1)},t.prototype.delete=function(e){return this.client.request("comments.delete",{commentId:e})},t.prototype.load=function(e){var t=this,n="string"==typeof e?{proofId:e}:e,r=n.proofId,o=n.pageNumber,i=void 0===o?null:o,a=n.sinceDate,c=void 0===a?null:a,l=n.async,f=void 0!==l&&l,p=n.decrypt,d=void 0===p||p,h=n.onDecryptComment,y=n.onDecryptComments,v=n.onDecryptCommentsThrottleMs,_=void 0===v?1e3:v,b=n.onDecryptError,w=c?c.toISOString().match(m.ISO_REGEX)[0]:m.DEFAULT_ISO_DATE,g={proofId:r,page:i,timestamp:w};return this.client.request(null!==i?"comments.load-page":"comments.load-all",g).then(function(e){var n=u(e.data.Pages?s(e.data.Pages):e.data),r=Promise.resolve();if(d){var o=[],i=[],a=y?(0,T.default)(function(){i.length&&(y(i),i=[])},_):function(){},c=Promise.all(n.map(function(e){return t.client.cache.auto(m.COMMENT_CACHE_PREFIX+e.comment$,function(t){o.push({comment:e,resolve:t})}).then(function(t){return t&&e.fromRawComment(t),e})}));r=r.then(function(){return c}),r=r.then(function(){var e=o.map(function(e){var n=e.comment,r=e.resolve;return t.client.crypto().decryptComment(n.comment$,n.envelope,t.client.keyPairs.getPrivateKeyPEMs()).then(function(e){n.fromRawComment(e),r(e),h&&h(n),i.push(n),a()}).catch(function(e){if(b&&b(e,n),!f)return Promise.reject(e)})});return f?null:Promise.all(e)})}return r.then(function(){return n})})},t.prototype.create=function(e){var t=this,n=e.raw,r=e.tokens,o=e.proofId,i=e.pageNumber,a=void 0===i?1:i,s=e.pin,u=e.pins,c=e.mediaTime,l=e.mediaDuration,f=e.parentCommentId,d=e.metadata,m=e.sourceMetadata,y=e.state,_=e.autoState,w=e.isPrivate,O=e.creationToken,T=[],P=n||(0,v.serialize)(r),k=r||(0,g.default)(n);T.push.apply(T,(0,b.default)(k));var C=[],S=void 0;u?C=C.concat(u):s&&C.push(s);var R=C[0];R&&(R.fill&&(S=R.fill),c&&(R.time=c),l&&(R.duration=l));var D=O||(0,E.generateCreationToken)();return this.client.crypto().encryptComment(P,this.client.keyPairs.getPublicKeyPEMs()).then(function(e){var t=e.envelope,n=e.comment$;return{proofId:o,page:f?void 0:a,envelope:t,encryptedComment:n,xy:(0,I.serializePins)(C),boxFillImage:S?S.image:void 0,boxFillType:S?S.type:void 0,parent:f||void 0,mentions:T,metadata:d?JSON.stringify(d):"{}",sourceMetadata:m,creationToken:D,change:y===h.default.TODO?"1":void 0,done:y===h.default.DONE?"1":void 0,autoState:_,private:void 0!==w?w?"1":"0":void 0}}).then(function(e){return t.client.request("comments.create",e).then(function(e){return(new p.default).fromComment(e.data).fromRawComment(P)})}).catch(function(e){return e&&(e.creationToken=D),Promise.reject(e)})},t.prototype.loadContext=function(e){var t=this;return this.client.request("comments.load-context",{commentId:e}).then(function(e){return t.client.crypto().decryptImage(e.data,t.client.keyPairs.getPrivateKeyPEMs())}).then(function(e){return(new D.default).createBase64(e)})},t}(l.default);t.default=F},function(e,t,n){"use strict";function r(e){for(var t=[],n=e.split(/\n/g),r=0;r<n.length;r++){var i=n[r],a=[];if(0===r){var s=i.match(o.COMMENT_LABEL_REGEX);s&&a.push({type:"label",index:0,length:s[0].length,metadata:{label:s[1].toLowerCase()}})}for(var u=void 0;null!==(u=o.MENTION_REGEX.exec(i));){var c=u,l=c[0],f=c[1],p=c[2];a.push({type:"mention",index:u.index,length:p.length,metadata:{id:f}}),i=i.substring(0,u.index)+p+i.substring(u.index+l.length)}t.push({type:"text",value:i,styles:[],entities:a})}return{version:2,blocks:t}}t.__esModule=!0,t.parse=void 0;var o=n(3);t.parse=r},function(e,t,n){"use strict";function r(){var e=(new Date).getTime();return(0,i.default)(s,a)+"-"+e}t.__esModule=!0,t.generateCreationToken=void 0;var o=n(41),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a=32,s=o.lower+o.upper+o.numbers+o.symbols;t.generateCreationToken=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=n(0),l=r(c),f=n(11),p=r(f),d=n(2),h=r(d),m=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype._createTask=function(e){var t=this;return this.client.crypto().generateCommentImportKey(this.client.session.serverPublicKeyPEM).then(function(n){var r=n.key,o=n.key$;return t.client.request("comments.import.create-task",{options:u({},e,{key:o})}).then(function(e){return[e.data,r]})})},t.prototype._startTask=function(e,t){return this.client.request("comments.import.action-task",{id:e,options:t,action:"start"}).then(function(e){return e.data.task})},t.prototype.fromFile=function(e,t,n){var r=this,i=t.proofId,a=t.fileName,s=o(t,["proofId","fileName"]);return this._createTask({type:"pdf",proofId:i,fileName:a}).then(function(t){var o=t[0],i=o.task,a=o.uploadRequest,s=t[1],u=new h.default;return u.readBase64(e).then(function(e){return r.client.crypto().encryptCommentImportFile(s,e)}).then(function(e){return u.createBase64(e)}).then(function(e){return r.client.rawRequest({url:new p.default(a.url),method:a.method,headers:a.headers,body:e},{onUploadProgress:n})}).then(function(){return i})}).then(function(e){return r._startTask(e.id,s)})},t.prototype.info=function(e){return this.client.request("comments.import.get-task",{id:e}).then(function(e){return e.data.task})},t.prototype.cancel=function(e){return this.client.request("comments.import.action-task",{id:e,action:"cancel",options:{}}).then(function(e){return e.data.task})},t}(l.default);t.default=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(2),l=r(c),f=n(35),p=r(f),d=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.integrations=new p.default(n,"user"),r}return a(t,e),t.prototype.uploadAvatar=function(e){var t=this;return(new l.default).readBase64(e).then(function(e){return t.client.request("profile.upload-avatar",{uploadedImage:"data:image/png;base64,"+e})})},t.prototype.deleteAvatar=function(){return this.client.request("profile.delete-avatar")},t.prototype.changePassword=function(e,t){var n=this,r=this.client.crypto();return Promise.all([r.generatePasswordHash(e),r.generatePasswordHash(t),r.encryptPrivateKey(this.client.session.privateKeyPEM,t)]).then(function(e){var t=e[0],r=e[1],o=e[2];return n.client.request("profile.change-password",{oldPassword:t,newPassword:r,newPrivateKey:o})})},t.prototype.getStatus=function(){return this.client.request("profile.status").then(function(e){return e.data.status})},t.prototype.setStatus=function(e){return this.client.request("profile.set-status",e)},t.prototype.clearStatus=function(){return this.client.request("profile.clear-status")},t}(u.default);t.default=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.check=function(){return this.client.request("sessions.check").then(function(){return null})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(2),l=r(c),f=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.decrypt=function(e){var t=this,n=e.version,r=e.data,o=e.envelope,i=new l.default;return("string"==typeof r?i.create(r):Promise.resolve(r)).then(function(e){return i.read(e).then(function(e){return t.client.crypto().decryptData(n,e,o,t.client.keyPairs.getPrivateKeyPEMs()).then(function(e){return i.create(e)})})})},t}(u.default);t.default=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.generateAccessToken=function(){return this.client.request("live.generate-access-token").then(function(e){return e.data.AccessToken})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.rekeyUsersProofs=function(e){return this.client.request("brian.rekey-users-proofs",{userId:e.userId})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=n(6),a=function(e){return e&&e.__esModule?e:{default:e}}(i),s=n(16)("EventEmitter"),u=function(){function e(){r(this,e),this.handlers={}}return e.prototype.getHandlers=function(e){var t=this,n=[],r=[e];if(-1!==e.indexOf("."))for(var o=e;(o=o.substring(0,o.lastIndexOf("."))).length;)r.push(o+".*");return r.push("*"),r.forEach(function(e){(0,a.default)(t.handlers,e)&&n.push.apply(n,t.handlers[e])}),n},e.prototype.on=function(e,t){if("function"!=typeof t)return void s("Handler is not a function, got "+(void 0===t?"undefined":o(t)));(0,a.default)(this.handlers,e)||(this.handlers[e]=[]),this.handlers[e].push(t)},e.prototype.off=function(e,t){if((0,a.default)(this.handlers,e)){var n=this.handlers[e];n.splice(n.indexOf(t),1)}},e.prototype.addEventListener=function(e,t){return this.on(e,t)},e.prototype.removeEventListener=function(e,t){return this.off(e,t)},e.prototype.emit=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.getHandlers(e),o=new Array(r.length);s("Emitting"+(n?" async":"")+' "'+e+'" event ('+(t?"with":"without")+" data) to "+r.length+" handler(s)");var i=Object.freeze({type:e,data:t,timestamp:Date.now()});return r.forEach(function(e,t){try{o[t]=e(i)}catch(e){o[t]=e}}),n?Promise.all(o):o},e}();t.default=u},function(e,t,n){"use strict";function r(){try{o||(o=Intl.DateTimeFormat().resolvedOptions().timeZone||null)}catch(e){}return o}t.__esModule=!0;var o=null;t.default=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;t.AggregateError="undefined"!=typeof globalThis&&globalThis.AggregateError||"undefined"!=typeof global&&global.AggregateError||"undefined"!=typeof window&&window.AggregateError||function(e){function t(n,i){r(this,t);var a=o(this,e.call(this,n));return a.name="AggregateError",a.errors=i,a}return i(t,e),t}(Error)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;t.GraphQLError=function(e){function t(n,i,a){r(this,t);var s=o(this,e.call(this,n));return s.name="GraphQLError",i&&(s.locations=i),a&&(s.path=a),s}return i(t,e),t}(Error)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(0),u=function(e){return e&&e.__esModule?e:{default:e}}(s),c=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.listConfigurations=function(){return this.client.request("reports.configurations")},t.prototype.create=function(e,t){return this.client.request("reports.create",a({report:e},t))},t}(u.default);t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(140),l=r(c),f=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.invitations=new l.default(n),r}return a(t,e),t}(u.default);t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),u=r(s),c=n(141),l=r(c),f=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.info=function(e){return this.client.request("teams.invitations.info",{invitationId:e}).then(function(e){return(new l.default).fromTeamInvitation(e.data)})},t.prototype.accept=function(e){return this.client.request("teams.invitations.accept",{invitationId:e}).then(function(){return null})},t.prototype.decline=function(e){return this.client.request("teams.invitations.decline",{invitationId:e}).then(function(){return null})},t}(u.default);t.default=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a={name:"Name",logo:"Logo",teamId:"TeamId"},s=function(){function e(){r(this,e)}return e.prototype.fromTeamInvitation=function(e){return(0,i.default)(this,a,e),this},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.options=function(e){return this.client.request("printing.options",{proofId:e})},t.prototype.create=function(e){return this.client.request("printing.create",e)},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.requestTeam=function(e){return this.client.request("free-trial.request-team",e).then(function(e){return e.data})},t}(s.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=function(){function e(t){r(this,e),this.keyPairs=[],this.client=t}return e.prototype.addKeyPair=function(e){var t=this;return this.keyPairs.push(e),function(){return t.removeKeyPair(e)}},e.prototype.removeKeyPair=function(e){this.keyPairs.splice(this.keyPairs.indexOf(e),1)},e.prototype.getPrivateKeyPEMs=function(){return[this.client.session&&this.client.session.privateKeyPEM].concat(this.keyPairs.map(function(e){return e.privateKeyPEM})).filter(Boolean)},e.prototype.getPublicKeyPEMs=function(){return[this.client.session&&this.client.session.serverPublicKeyPEM,this.client.session&&this.client.session.publicKeyPEM].concat(this.keyPairs.map(function(e){return e.publicKeyPEM})).filter(Boolean)},e}();t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){return e.raw=t,e}t.__esModule=!0;var u=s(["\n fragment ChecklistTemplate on ChecklistTemplate {\n id\n state\n name\n description\n defaultIsRequiredForFinalApproval\n defaultShouldOpenOnProofLoad\n }\n"],["\n fragment ChecklistTemplate on ChecklistTemplate {\n id\n state\n name\n description\n defaultIsRequiredForFinalApproval\n defaultShouldOpenOnProofLoad\n }\n"]),c=s(["\n mutation sdk_ChecklistTemplates_create($input: CreateChecklistTemplateInput!) {\n createChecklistTemplate(input: $input) {\n ...ChecklistTemplate\n }\n }\n ","\n"],["\n mutation sdk_ChecklistTemplates_create($input: CreateChecklistTemplateInput!) {\n createChecklistTemplate(input: $input) {\n ...ChecklistTemplate\n }\n }\n ","\n"]),l=s(["\n mutation sdk_ChecklistTemplates_update($id: ID!, $input: UpdateChecklistTemplateInput!) {\n updateChecklistTemplate(id: $id, input: $input) {\n ...ChecklistTemplate\n }\n }\n ","\n"],["\n mutation sdk_ChecklistTemplates_update($id: ID!, $input: UpdateChecklistTemplateInput!) {\n updateChecklistTemplate(id: $id, input: $input) {\n ...ChecklistTemplate\n }\n }\n ","\n"]),f=s(["\n query sdk_ChecklistTemplates_list($states: [ChecklistTemplateState!]) {\n checklistTemplates(states: $states) {\n ...ChecklistTemplate\n }\n }\n ","\n"],["\n query sdk_ChecklistTemplates_list($states: [ChecklistTemplateState!]) {\n checklistTemplates(states: $states) {\n ...ChecklistTemplate\n }\n }\n ","\n"]),p=s(["\n query sdk_ChecklistTemplates_load($id: ID!) {\n checklistTemplate(id: $id) {\n ...ChecklistTemplate\n }\n }\n ","\n"],["\n query sdk_ChecklistTemplates_load($id: ID!) {\n checklistTemplate(id: $id) {\n ...ChecklistTemplate\n }\n }\n ","\n"]),d=n(0),h=r(d),m=n(43),y=n(146),v=r(y),_=(0,m.gql)(u),b=(0,m.gql)(c,_),w=(0,m.gql)(l,_),g=(0,m.gql)(f,_),E=(0,m.gql)(p,_),O=function(e){function t(n){o(this,t);var r=i(this,e.call(this,n));return r.entities=new v.default(n),r}return a(t,e),t.prototype.create=function(e){return this.client.graphql(b,{input:e}).then(function(e){return e.data.createChecklistTemplate})},t.prototype.update=function(e,t){return this.client.graphql(w,{id:e,input:t}).then(function(e){return e.data.updateChecklistTemplate})},t.prototype.list=function(e){return this.client.graphql(g,e).then(function(e){return e.data.checklistTemplates})},t.prototype.load=function(e){return this.client.graphql(E,{id:e}).then(function(e){return e.data.checklistTemplate})},t}(h.default);t.default=O},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){return e.raw=t,e}t.__esModule=!0;var s=a(["\n fragment ChecklistTemplateEntity on ChecklistTemplateEntity {\n id\n name\n type\n description\n }\n"],["\n fragment ChecklistTemplateEntity on ChecklistTemplateEntity {\n id\n name\n type\n description\n }\n"]),u=a(["\n query sdk_ChecklistTemplatesEntities_list($checklistId: ID!) {\n checklistTemplate(id: $checklistId) {\n entities {\n ...ChecklistTemplateEntity\n ...on ChecklistTemplateEntityGroup {\n entities {\n ...ChecklistTemplateEntity\n ...on ChecklistTemplateEntityGroup {\n entities {\n ...ChecklistTemplateEntity\n ...on ChecklistTemplateEntityGroup {\n entities {\n ...ChecklistTemplateEntity\n ...on ChecklistTemplateEntityGroup {\n entities {\n ...ChecklistTemplateEntity\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n ","\n"],["\n query sdk_ChecklistTemplatesEntities_list($checklistId: ID!) {\n checklistTemplate(id: $checklistId) {\n entities {\n ...ChecklistTemplateEntity\n ...on ChecklistTemplateEntityGroup {\n entities {\n ...ChecklistTemplateEntity\n ...on ChecklistTemplateEntityGroup {\n entities {\n ...ChecklistTemplateEntity\n ...on ChecklistTemplateEntityGroup {\n entities {\n ...ChecklistTemplateEntity\n ...on ChecklistTemplateEntityGroup {\n entities {\n ...ChecklistTemplateEntity\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n ","\n"]),c=n(0),l=function(e){return e&&e.__esModule?e:{default:e}}(c),f=n(43),p=(0,f.gql)(s),d=(0,f.gql)(u,p),h=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.list=function(e){return this.client.graphql(d,{checklistId:e}).then(function(e){return e.data.checklistTemplate.entities})},t}(l.default);t.default=h},function(e,t,n){"use strict";function r(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,r)}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.ProofRole=t.Decision=t.Preference=t.FileCategory=t.ProofType=t.ReminderRelativeTo=t.ReminderAction=t.WorkflowUserState=t.WorkflowUserRole=t.WorkflowStepState=t.ResponseStatus=t.ProofStatus=t.ProofState=t.ImportProvider=t.FileStatus=t.FileAssignee=t.CommentState=void 0;var o=n(23),i=r(o),a=n(149),s=r(a),u=n(9),c=r(u),l=n(30),f=r(l),p=n(24),d=r(p),h=n(8),m=r(h),y=n(15),v=r(y),_=n(34),b=r(_),w=n(150),g=r(w),E=n(33),O=r(E),T=n(151),P=r(T),k=n(152),I=r(k),C=n(25),S=r(C),R=n(153),D=r(R),A=n(154),M=r(A),j=n(155),x=r(j),q=n(156),F=r(q);t.CommentState=i.default,t.FileAssignee=s.default,t.FileStatus=c.default,t.ImportProvider=f.default,t.ProofState=d.default,t.ProofStatus=m.default,t.ResponseStatus=v.default,t.WorkflowStepState=b.default,t.WorkflowUserRole=g.default,t.WorkflowUserState=O.default,t.ReminderAction=P.default,t.ReminderRelativeTo=I.default,t.ProofType=S.default,t.FileCategory=D.default,t.Preference=M.default,t.Decision=x.default,t.ProofRole=F.default},function(e,t,n){"use strict";t.__esModule=!0;var r={PROOF:"proof",ATTACHMENT:"attachment",SNAPSHOT:"snapshot"};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={VIEW_ONLY:"view-only",REVIEWER:"reviewer",MANDATORY:"mandatory",GATEKEEPER:"gatekeeper",APPROVER:"approver"};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={WORKFLOW_NUDGE_ALL:"nudge_all"};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={PROOF_DUE_DATE:"due_date"};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={STATIC:"static",VIDEO:"video",AUDIO:"audio",WEB:"web"};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={DEFAULT_DUE_DATE:"dueDate",DEFAULT_DUE_TIME:"dueTime",DEFAULT_MESSAGE_TO_REVIEWERS:"messageToReviewers",COLORS:"colors",DEFAULT_REMINDER:"proofReminders"};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={NO_DECISION:0,APPROVED:1,SEND_CHANGES:2,APPROVED_WITH_CHANGES:3};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r={UNLISTED_REVIEWER:"unlisted-reviewer"};t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.WorkflowUser=t.WorkflowStep=t.Workflow=t.User=t.Session=t.ProofVersion=t.ProofGroup=t.Proof=t.File=t.Comment=void 0;var o=n(36),i=r(o),a=n(18),s=r(a),u=n(5),c=r(u),l=n(10),f=r(l),p=n(27),d=r(p),h=n(7),m=r(h),y=n(4),v=r(y),_=n(19),b=r(_),w=n(12),g=r(w),E=n(20),O=r(E);t.Comment=i.default,t.File=s.default,t.Proof=c.default,t.ProofGroup=f.default,t.ProofVersion=d.default,t.Session=m.default,t.User=v.default,t.Workflow=b.default,t.WorkflowStep=g.default,t.WorkflowUser=O.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return"string"==typeof e&&(e=(0,a.default)(e)),(0,c.default)(e)}t.__esModule=!0,t.pins=t.comments=void 0;var i=n(21),a=r(i),s=n(22),u=n(40),c=r(u),l=n(159),f=r(l),p=n(160),d=r(p),h=n(38),m=n(42);t.comments={parse:a.default,serialize:s.serialize,mentions:o,text:f.default,html:d.default},t.pins={parse:h.parsePins,serialize:m.serializePins}},function(e,t,n){"use strict";function r(e){return e.blocks.map(function(e){return e.value}).map(i.default).join("\n")}t.__esModule=!0;var o=n(44),i=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return{trusted:!0,value:e}}function i(e){return[].concat(e)}function a(e){return Object.keys(e).map(function(t){return t+": "+e[t]}).join("; ")}function s(e){var t=(0,h.default)(e);return u((0,l.default)(t,O))}function u(e){function t(e){e.forEach(function(e){e&&("string"==typeof e?n.push((0,y.default)(e)):!0===e.trusted?n.push(e.value):e.length&&t(e))})}var n=[];return t(e),n.join("")}t.__esModule=!0;var c=n(161),l=r(c),f=n(176),p=r(f),d=n(184),h=r(d),m=n(44),y=r(m),v={BOLD:{"font-weight":"bold"},ITALIC:{"font-style":"italic"},UNDERLINE:{"text-decoration":"underline"},STRIKETHROUGH:{"text-decoration":"line-through"},SUPERSCRIPT:{"font-size":"0.8em","vertical-align":"super"},SUBSCRIPT:{"font-size":"0.8em","vertical-align":"sub"}},_=function(e){var t=e.style,n=e.children;return[o('<span style="'+a(t)+'">'),i(n),o("</span>")]},b=function(e){return function(t){return[o("<"+e+">")].concat(t.map(function(e){return[o("<li>"),i(e),o("</li>")]}),[o("</"+e+">")])}},w={unstyled:function(e){return e.map(function(e){return[o("<div>"),i(e),o("<br /></div>")]})},"unordered-list-item":b("ul"),"ordered-list-item":b("ol")},g={mention:function(e,t){return[o('<span data-mention-user-id="'+t.mention.link+'">'),i(e),o("</span>")]}},E=[{strategy:p.default,component:function(e){var t=e.children;return[o('<a href="'+e.decoratedText+'" target="_blank" rel="noopener noreferrer">'),i(t),o("</a>")]}}],O={styles:(0,c.createStylesRenderer)(_,v),blocks:w,entities:g,decorators:E};t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeDecorator=t.renderNode=t.RawParser=t.createBlockRenderer=t.createStylesRenderer=void 0;var o=n(45),i=r(o),a=n(164),s=r(a),u=n(165),c=n(47),l=r(c),f=n(175),p=r(f);t.createStylesRenderer=s.default,t.createBlockRenderer=p.default,t.RawParser=i.default,t.renderNode=u.renderNode,t.CompositeDecorator=l.default,t.default=u.render},function(e,t,n){"use strict";function r(e){return Array.isArray(e)?e:Array.from(e)}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(163),u=function(e){return e&&e.__esModule?e:{default:e}}(s),c=function(){function e(t){i(this,e),this.content=t.content||[],this.start=void 0!==t.start?t.start:null,this.end=void 0!==t.end?t.end:null,this.entity=void 0!==t.entity?t.entity:null,this.decorator=void 0!==t.decorator?t.decorator:null,this.decoratorProps=t.decoratorProps||null,this.decoratedText=void 0!==t.decoratedText?t.decoratedText:null,this.contentState=t.contentState,this.style=t.style||null,this.styles=t.styles||null,this.block=t.block||{}}return a(e,[{key:"getCurrentContent",value:function(){return this.content[this.content.length-1]}},{key:"addToCurrentContent",value:function(e){this.content[this.content.length-1]=this.content[this.content.length-1]+e}},{key:"handleFlatPush",value:function(t,n){var r=this.getCurrentContent();if(r instanceof e&&(0,u.default)(n,r.styles))return void r.addToCurrentContent(t);var i=new e({styles:[].concat(o(n)),content:[t]});this.content.push(i)}},{key:"pushContent",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!n||n.length<1)return"string"==typeof t&&"string"==typeof this.getCurrentContent()?this.addToCurrentContent(t):this.content.push(t),this;if(o)return this.handleFlatPush(t,n),this;var i=r(n),a=i[0],s=i.slice(1),u=this.getCurrentContent();if(u instanceof e&&u.style===a)u.pushContent(t,s,o);else{var c=new e({style:a});c.pushContent(t,s,o),this.content.push(c)}return this}}]),e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return e.map(function(e){return t[e]}).reduce(function(e,t){var n={};if(void 0!==t){var r="text-decoration"in t?"text-decoration":"textDecoration";t[r]!==e[r]&&(n[r]=[e[r],t[r]].join(" ").trim())}return Object.assign(e,t,n)},{})},o=function(e,t){return function(n,o,i){var a=r(o,t);return e(Object.assign({},{children:n},i,{style:a}))}};t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.render=t.renderNode=void 0;var o=n(45),i=r(o),a=n(166),s=r(a),u=n(167),c=r(u),l=n(168),f=r(l),p=n(169),d=r(p),h=n(170),m=r(h),y=n(171),v=r(y),_=n(172),b=r(_),w=t.renderNode=function e(t,n,r,o,i,a,s){if(t.styles&&o)return o((0,d.default)(t.content,a),t.styles,{key:s()});var u=[],c=0;if(t.content.forEach(function(t){"string"==typeof t?u=(0,m.default)(t,u,c):(c+=1,u[c]=e(t,n,r,o,i,a,s),c+=1)}),t.style&&n[t.style])return n[t.style]((0,d.default)(u,a),{key:s()});if(null!==t.entity){var l=i[t.entity];if(l&&r[l.type])return r[l.type]((0,d.default)(u,a),l.data,{key:t.entity})}if(null!==t.decorator){var f=[t.block.key,t.start,0].join(".");return t.decorator(Object.assign({children:(0,d.default)(u,a),decoratedText:t.decoratedText,contentState:t.contentState,entityKey:t.entity,offsetKey:f,key:f},t.decoratorProps))}return u},g=function(e){var t=[],n=[],r=0,o=function(e){var o=r-e;for(n.length<o&&(o=n.length),o;o>0;o-=1){var i=t;t=n.pop(),t[t.length-1].children=i}};return e.forEach(function(e){r<e.depth?(n.push(t),t=[]):r>e.depth&&o(e.depth),r=e.depth,t.push(e)}),0!==r&&o(0),t},E=function(e,t,n,r,o){var i=r.prevType,a=r.prevDepth,s=r.prevKeys,u=r.prevData;if(0!==e.length){var c=t[i]||t[o.blockFallback];if(c){var l={depth:a,keys:s};return u&&u.some(function(e){return!!e})&&(l.data=u),void n.push(c(e,l))}n.push(e)}},O=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments[4],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},l=Object.assign({},v.default,u),p=[],h=[],m=null,y=0,_=[],b=[],g=!1,O=new i.default({flat:!!a});return t.forEach(function(t){if((0,c.default)(t,m,l))return void(!0===l.cleanup.split&&(g=!0));var i=O.parse(t),u=w(i,n,o,a,s,l,(0,f.default)());if((m&&m!==t.type||g)&&(E(h,r,p,{prevType:m,prevDepth:y,prevKeys:_,prevData:b},l),b=[],_=[],h=[],g=!1),t.children){var d=e(t.children,n,r,o,a,s,l);u.push(d)}h.push(u),m=t.type,y=t.depth,_.push(t.key),b.push(t.data)}),E(h,r,p,{prevType:m,prevDepth:y,prevKeys:_,prevData:b},l),(0,d.default)(p,l)};t.render=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||!Array.isArray(e.blocks))return(0,s.default)("invalid raw object"),null;if(!e.blocks.length)return null;var r=t.inline,o=t.blocks,i=t.entities,a=t.styles,u=t.decorators,c=u?(0,b.default)(e,u,n):e.blocks,l=g(c);return O(l,r,o,i,a,e.entityMap,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return!!(t.trim?e.trim():e)},o=function(e,t){return!!r(e.text,t)||(!(!e.data||!Object.keys(e.data).length)||!(!e.entityRanges||!e.entityRanges.length))},i=function(e,t,n){var r=n.cleanup;return!(!r||o(e,r))&&((!r.after||"all"===r.after||-1!==r.after.indexOf(t))&&(!(!r.except||-1!==r.except.indexOf(e.type))||!(!r.types||"all"!==r.types&&-1===r.types.indexOf(e.type))))};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){var e=0;return function(){var t=e;return e+=1,t}};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Array.isArray(e)&&t.joinOutput?e.join(""):e};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){var r=t;return t[n]?r[n]+=e:r[n]=e,r};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={joinOutput:!1,cleanup:{after:["atomic"],types:["unstyled"],trim:!1,split:!0},blockFallback:"unstyled"};t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(46),a=r(i),s=n(47),u=r(s),c=n(173),l=r(c),f=n(174),p=r(f),d=function(e,t){return e.forEach(function(e){var n=t.text.substring(0,e.offset),r=t.text.substring(e.offset,e.offset+e.length);e.offset=a.default.ucs2.decode(n).length,e.length=a.default.ucs2.decode(r).length}),e},h=function(e){return"function"==typeof e.getDecorations&&"function"==typeof e.getComponentForKey&&"function"==typeof e.getPropsForKey},m=function(e){var t=new u.default(e.filter(function(e){return!h(e)})),n=e.filter(function(e){return h(e)}),r=[].concat(o(n),[t]);return new l.default(r)},y=function(e,t,n,r){var o=r.createContentBlock,i=[],a=m(t),s=o?o(e):(0,p.default)(e),u=a.getDecorations(s,n),c=0;return u.forEach(function(e,t){if(!e)return void(c+=1);var r=t+1,o=u[r];o&&o===e||(i.push({offset:c,length:r-c,component:a.getComponentForKey(e),decoratorProps:a.getPropsForKey(e)||{},contentState:n}),c=r)}),Object.assign({},e,{decoratorRanges:d(i,e)})},v=function(e,t,n){var r=n.convertFromRaw&&n.convertFromRaw(e);return e.blocks.map(function(e){return y(e,t,r,n||{})})};t.default=v},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t){r(this,e),this.decorators=t}return o(e,[{key:"getDecorations",value:function(e,t){var n=new Array(e.getText().length).fill(null);return this.decorators.forEach(function(r,o){r.getDecorations(e,t).forEach(function(e,t){e&&(n[t]=o+"-"+e)})}),n}},{key:"getComponentForKey",value:function(t){return this.getDecoratorForKey(t).getComponentForKey(e.getInnerKey(t))}},{key:"getPropsForKey",value:function(t){return this.getDecoratorForKey(t).getPropsForKey(e.getInnerKey(t))}},{key:"getDecoratorForKey",value:function(e){var t=e.split("-"),n=Number(t[0]);return this.decorators[n]}}],[{key:"getInnerKey",value:function(e){return e.split("-").slice(1).join("-")}}]),e}();t.default=i},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t){r(this,e),Object.assign(this,t)}return o(e,[{key:"get",value:function(e){return this[e]}},{key:"getText",value:function(){return this.text}},{key:"getType",value:function(){return this.type}},{key:"getKey",value:function(){return this.key}},{key:"getLength",value:function(){return this.text.length}},{key:"getDepth",value:function(){return this.depth}},{key:"getData",value:function(){return this.data}}]),e}(),a=function(e){return new i(e)};t.default=a},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e,t){var n=e.keys;if(t)return t;if(n)return n.join(",")},i=function(e,t){return function(n,i,a){var s=Object.assign({},i),u=o(s,a);return delete s.depth,delete s.keys,t.apply(void 0,[e,Object.assign({},s,{key:u})].concat(r(n)))}},a=function(e,t,n){var r=n.children,o=n.props,a=n.key,s=i(t.wrapper,e),u=i(t.element,e);return s(r.map(function(e,t){return u(e,{depth:o.depth},o.keys&&o.keys[t])}),o,a)},s=function(e,t){var n={};return Object.keys(t).forEach(function(r){var o=t[r];if(o.wrapper)return void(n[r]=function(t,n,r){return a(e,o,{children:t,props:n,key:r})});n[r]=i(o.element,e)}),n};t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=n(177),i=r(o),a=n(183),s=r(a),u=(0,i.default)();u.tlds(s.default).set({fuzzyEmail:!1});var c=function(e,t){var n=u.match(e.get("text"));if(void 0!==n&&null!==n)for(var r=0;r<n.length;r+=1)t(n[r].index,n[r].lastIndex)};t.default=c},function(e,t,n){"use strict";function r(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function o(e){return Object.prototype.toString.call(e)}function i(e){return"[object String]"===o(e)}function a(e){return"[object Object]"===o(e)}function s(e){return"[object RegExp]"===o(e)}function u(e){return"[object Function]"===o(e)}function c(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function l(e){return Object.keys(e||{}).reduce(function(e,t){return e||_.hasOwnProperty(t)},!1)}function f(e){e.__index__=-1,e.__text_cache__=""}function p(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function d(){return function(e,t){t.normalize(e)}}function h(e){function t(e){return e.replace("%TLDS%",o.src_tlds)}function r(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}var o=e.re=n(178)(e.__opts__),l=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||l.push(w),l.push(o.src_xn),o.src_tlds=l.join("|"),o.email_fuzzy=RegExp(t(o.tpl_email_fuzzy),"i"),o.link_fuzzy=RegExp(t(o.tpl_link_fuzzy),"i"),o.link_no_ip_fuzzy=RegExp(t(o.tpl_link_no_ip_fuzzy),"i"),o.host_fuzzy_test=RegExp(t(o.tpl_host_fuzzy_test),"i");var h=[];e.__compiled__={},Object.keys(e.__schemas__).forEach(function(t){var n=e.__schemas__[t];if(null!==n){var o={validate:null,link:null};return e.__compiled__[t]=o,a(n)?(s(n.validate)?o.validate=p(n.validate):u(n.validate)?o.validate=n.validate:r(t,n),void(u(n.normalize)?o.normalize=n.normalize:n.normalize?r(t,n):o.normalize=d())):i(n)?void h.push(t):void r(t,n)}}),h.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[""]={validate:null,normalize:d()};var m=Object.keys(e.__compiled__).filter(function(t){return t.length>0&&e.__compiled__[t]}).map(c).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+o.src_ZPCc+"))("+m+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+o.src_ZPCc+"))("+m+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),f(e)}function m(e,t){var n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function y(e,t){var n=new m(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function v(e,t){if(!(this instanceof v))return new v(e,t);t||l(e)&&(t=e,e={}),this.__opts__=r({},_,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},b,e),this.__compiled__={},this.__tlds__=g,this.__tlds_replaced__=!1,this.re={},h(this)}var _={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},b={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]?0:t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},w="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",g="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");v.prototype.add=function(e,t){return this.__schemas__[e]=t,h(this),this},v.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},v.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,o,i,a,s,u;if(this.re.schema_test.test(e))for(s=this.re.schema_search,s.lastIndex=0;null!==(t=s.exec(e));)if(o=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||u<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=n.index+n[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(i=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=a)),this.__index__>=0},v.prototype.pretest=function(e){return this.re.pretest.test(e)},v.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},v.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(y(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(y(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},v.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse(),h(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,h(this),this)},v.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},v.prototype.onCompile=function(){},e.exports=v},function(e,t,n){"use strict";e.exports=function(e){var t={};t.src_Any=n(179).source,t.src_Cc=n(180).source,t.src_Z=n(181).source,t.src_P=n(182).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-(?!-)|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|[><|]|\\(|"+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E49\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t){e.exports=["aaa","aarp","abarth","abb","abbott","abbvie","abc","able","abogado","abudhabi","ac","academy","accenture","accountant","accountants","aco","active","actor","ad","adac","ads","adult","ae","aeg","aero","aetna","af","afamilycompany","afl","africa","ag","agakhan","agency","ai","aig","aigo","airbus","airforce","airtel","akdn","al","alfaromeo","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","am","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","ao","aol","apartments","app","apple","aq","aquarelle","ar","arab","aramco","archi","army","arpa","art","arte","as","asda","asia","associates","at","athleta","attorney","au","auction","audi","audible","audio","auspost","author","auto","autos","avianca","aw","aws","ax","axa","az","azure","ba","baby","baidu","banamex","bananarepublic","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bb","bbc","bbt","bbva","bcg","bcn","bd","be","beats","beauty","beer","bentley","berlin","best","bestbuy","bet","bf","bg","bh","bharti","bi","bible","bid","bike","bing","bingo","bio","biz","bj","black","blackfriday","blanco","blockbuster","blog","bloomberg","blue","bm","bms","bmw","bn","bnl","bnpparibas","bo","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","br","bradesco","bridgestone","broadway","broker","brother","brussels","bs","bt","budapest","bugatti","build","builders","business","buy","buzz","bv","bw","by","bz","bzh","ca","cab","cafe","cal","call","calvinklein","cam","camera","camp","cancerresearch","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","cartier","casa","case","caseih","cash","casino","cat","catering","catholic","cba","cbn","cbre","cbs","cc","cd","ceb","center","ceo","cern","cf","cfa","cfd","cg","ch","chanel","channel","chase","chat","cheap","chintai","christmas","chrome","chrysler","church","ci","cipriani","circle","cisco","citadel","citi","citic","city","cityeats","ck","cl","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","cm","cn","co","coach","codes","coffee","college","cologne","com","comcast","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cookingchannel","cool","coop","corsica","country","coupon","coupons","courses","cr","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","csc","cu","cuisinella","cv","cw","cx","cy","cymru","cyou","cz","dabur","dad","dance","data","date","dating","datsun","day","dclk","dds","de","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dj","dk","dm","dnp","do","docs","doctor","dodge","dog","doha","domains","dot","download","drive","dtv","dubai","duck","dunlop","duns","dupont","durban","dvag","dvr","dz","earth","eat","ec","eco","edeka","edu","education","ee","eg","email","emerck","energy","engineer","engineering","enterprises","epost","epson","equipment","er","ericsson","erni","es","esq","estate","esurance","et","etisalat","eu","eurovision","eus","events","everbank","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fi","fiat","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","fj","fk","flickr","flights","flir","florist","flowers","fly","fm","fo","foo","food","foodnetwork","football","ford","forex","forsale","forum","foundation","fox","fr","free","fresenius","frl","frogans","frontdoor","frontier","ftr","fujitsu","fujixerox","fun","fund","furniture","futbol","fyi","ga","gal","gallery","gallo","gallup","game","games","gap","garden","gb","gbiz","gd","gdn","ge","gea","gent","genting","george","gf","gg","ggee","gh","gi","gift","gifts","gives","giving","gl","glade","glass","gle","global","globo","gm","gmail","gmbh","gmo","gmx","gn","godaddy","gold","goldpoint","golf","goo","goodhands","goodyear","goog","google","gop","got","gov","gp","gq","gr","grainger","graphics","gratis","green","gripe","grocery","group","gs","gt","gu","guardian","gucci","guge","guide","guitars","guru","gw","gy","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hgtv","hiphop","hisamitsu","hitachi","hiv","hk","hkt","hm","hn","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","honeywell","horse","hospital","host","hosting","hot","hoteles","hotels","hotmail","house","how","hr","hsbc","ht","hu","hughes","hyatt","hyundai","ibm","icbc","ice","icu","id","ie","ieee","ifm","ikano","il","im","imamat","imdb","immo","immobilien","in","industries","infiniti","info","ing","ink","institute","insurance","insure","int","intel","international","intuit","investments","io","ipiranga","iq","ir","irish","is","iselect","ismaili","ist","istanbul","it","itau","itv","iveco","iwc","jaguar","java","jcb","jcp","je","jeep","jetzt","jewelry","jio","jlc","jll","jm","jmp","jnj","jo","jobs","joburg","jot","joy","jp","jpmorgan","jprs","juegos","juniper","kaufen","kddi","ke","kerryhotels","kerrylogistics","kerryproperties","kfh","kg","kh","ki","kia","kim","kinder","kindle","kitchen","kiwi","km","kn","koeln","komatsu","kosher","kp","kpmg","kpn","kr","krd","kred","kuokgroup","kw","ky","kyoto","kz","la","lacaixa","ladbrokes","lamborghini","lamer","lancaster","lancia","lancome","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lb","lc","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","li","liaison","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","linde","link","lipsy","live","living","lixil","lk","llc","loan","loans","locker","locus","loft","lol","london","lotte","lotto","love","lpl","lplfinancial","lr","ls","lt","ltd","ltda","lu","lundbeck","lupin","luxe","luxury","lv","ly","ma","macys","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","maserati","mattel","mba","mc","mckinsey","md","me","med","media","meet","melbourne","meme","memorial","men","menu","meo","merckmsd","metlife","mg","mh","miami","microsoft","mil","mini","mint","mit","mitsubishi","mk","ml","mlb","mls","mm","mma","mn","mo","mobi","mobile","mobily","moda","moe","moi","mom","monash","money","monster","mopar","mormon","mortgage","moscow","moto","motorcycles","mov","movie","movistar","mp","mq","mr","ms","msd","mt","mtn","mtr","mu","museum","mutual","mv","mw","mx","my","mz","na","nab","nadex","nagoya","name","nationwide","natura","navy","nba","nc","ne","nec","net","netbank","netflix","network","neustar","new","newholland","news","next","nextdirect","nexus","nf","nfl","ng","ngo","nhk","ni","nico","nike","nikon","ninja","nissan","nissay","nl","no","nokia","northwesternmutual","norton","now","nowruz","nowtv","np","nr","nra","nrw","ntt","nu","nyc","nz","obi","observer","off","office","okinawa","olayan","olayangroup","oldnavy","ollo","om","omega","one","ong","onl","online","onyourside","ooo","open","oracle","orange","org","organic","origins","osaka","otsuka","ott","ovh","pa","page","panasonic","panerai","paris","pars","partners","parts","party","passagens","pay","pccw","pe","pet","pf","pfizer","pg","ph","pharmacy","phd","philips","phone","photo","photography","photos","physio","piaget","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","pk","pl","place","play","playstation","plumbing","plus","pm","pn","pnc","pohl","poker","politie","porn","post","pr","pramerica","praxi","press","prime","pro","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","ps","pt","pub","pw","pwc","py","qa","qpon","quebec","quest","qvc","racing","radio","raid","re","read","realestate","realtor","realty","recipes","red","redstone","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","rightathome","ril","rio","rip","rmit","ro","rocher","rocks","rodeo","rogers","room","rs","rsvp","ru","rugby","ruhr","run","rw","rwe","ryukyu","sa","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sapo","sarl","sas","save","saxo","sb","sbi","sbs","sc","sca","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scjohnson","scor","scot","sd","se","search","seat","secure","security","seek","select","sener","services","ses","seven","sew","sex","sexy","sfr","sg","sh","shangrila","sharp","shaw","shell","shia","shiksha","shoes","shop","shopping","shouji","show","showtime","shriram","si","silk","sina","singles","site","sj","sk","ski","skin","sky","skype","sl","sling","sm","smart","smile","sn","sncf","so","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","space","spiegel","sport","spot","spreadbetting","sr","srl","srt","st","stada","staples","star","starhub","statebank","statefarm","statoil","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","su","sucks","supplies","supply","support","surf","surgery","suzuki","sv","swatch","swiftcover","swiss","sx","sy","sydney","symantec","systems","sz","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tc","tci","td","tdk","team","tech","technology","tel","telecity","telefonica","temasek","tennis","teva","tf","tg","th","thd","theater","theatre","tiaa","tickets","tienda","tiffany","tips","tires","tirol","tj","tjmaxx","tjx","tk","tkmaxx","tl","tm","tmall","tn","to","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","tr","trade","trading","training","travel","travelchannel","travelers","travelersinsurance","trust","trv","tt","tube","tui","tunes","tushu","tv","tvs","tw","tz","ua","ubank","ubs","uconnect","ug","uk","unicom","university","uno","uol","ups","us","uy","uz","va","vacations","vana","vanguard","vc","ve","vegas","ventures","verisign","versicherung","vet","vg","vi","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","vista","vistaprint","viva","vivo","vlaanderen","vn","vodka","volkswagen","volvo","vote","voting","voto","voyage","vu","vuelos","wales","walmart","walter","wang","wanggou","warman","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","wf","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","ws","wtc","wtf","xbox","xerox","xfinity","xihuan","xin","कॉम","セール","佛山","ಭಾರತ","慈善","集团","在线","한국","ଭାରତ","大众汽车","点看","คอม","ভাৰত","ভারত","八卦","موقع","বাংলা","公益","公司","香格里拉","网站","移动","我爱你","москва","қаз","католик","онлайн","сайт","联通","срб","бг","бел","קום","时尚","微博","淡马锡","ファッション","орг","नेट","ストア","삼성","சிங்கப்பூர்","商标","商店","商城","дети","мкд","ею","ポイント","新闻","工行","家電","كوم","中文网","中信","中国","中國","娱乐","谷歌","భారత్","ලංකා","電訊盈科","购物","クラウド","ભારત","通販","भारतम्","भारत","भारोत","网店","संगठन","餐厅","网络","ком","укр","香港","诺基亚","食品","飞利浦","台湾","台灣","手表","手机","мон","الجزائر","عمان","ارامكو","ایران","العليان","اتصالات","امارات","بازار","پاکستان","الاردن","موبايلي","بارت","بھارت","المغرب","ابوظبي","السعودية","ڀارت","كاثوليك","سودان","همراه","عراق","مليسيا","澳門","닷컴","政府","شبكة","بيتك","عرب","გე","机构","组织机构","健康","ไทย","سورية","招聘","рус","рф","珠宝","تونس","大拿","みんな","グーグル","ελ","世界","書籍","ഭാരതം","ਭਾਰਤ","网址","닷넷","コム","天主教","游戏","vermögensberater","vermögensberatung","企业","信息","嘉里大酒店","嘉里","مصر","قطر","广东","இலங்கை","இந்தியா","հայ","新加坡","فلسطين","政务","xperia","xxx","xyz","yachts","yahoo","yamaxun","yandex","ye","yodobashi","yoga","yokohama","you","youtube","yt","yun","za","zappos","zara","zero","zip","zippo","zm","zone","zuerich","zw"]},function(e,t,n){"use strict";function r(){return(0,s.default)(a.lower+a.upper+a.numbers,6)}function o(e){var t=0,n={},o=[];return e.blocks.forEach(function(e){var i=[],a=[];e.entities.forEach(function(r){var o=t++,i=e.value.substr(r.index,r.length);switch(r.type){case"mention":n[o]={type:"mention",mutability:"IMMUTABLE",data:{mention:{link:r.metadata.id,name:i}}};break;default:return}a.push({key:o,offset:r.index,length:r.length})}),e.styles.forEach(function(e){var t=u[e.type];t&&i.push({style:t,offset:e.index,length:e.length})}),o.push({key:r(),type:"text"===e.type?"unstyled":e.type,text:e.value,inlineStyleRanges:i,entityRanges:a,data:{},depth:0})}),{blocks:o,entityMap:n}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(41),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(){return Object.keys({italic:!0,bold:!0,underline:!0,strikethrough:!0,superscript:!0,subscript:!0}).reduce(function(e,t){var n;return i({},e,(n={},n[t]=t.toUpperCase(),n[t.toUpperCase()]=t,n))},{})}();t.default=o}])});
|
|
2
2
|
//# sourceMappingURL=pageproof.js.map
|