directus-sdk-javascript
Advanced tools
Comparing version 2.11.1 to 2.12.0
@@ -1,1 +0,1 @@ | ||
var RemoteInstance=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=10)}([function(e,t,r){"use strict";var n=r(2),o=r(13),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function s(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!==e&&void 0!==e)if("object"==typeof e||a(e)||(e=[e]),a(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:o,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:u,isStream:function(e){return s(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]=r}for(var n=0,o=arguments.length;n<o;n++)c(arguments[n],r);return t},extend:function(e,t,r){return c(t,function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t,r){"use strict";(function(t){var n=r(0),o=r(15),i={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s={adapter:function(){var e;return"undefined"!=typeof XMLHttpRequest?e=r(4):void 0!==t&&(e=r(4)),e}(),transformRequest:[function(e,t){return o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(e){s.headers[e]={}}),n.forEach(["post","put","patch"],function(e){s.headers[e]=n.merge(i)}),e.exports=s}).call(t,r(3))},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=s(d);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new h(e,t)),1!==c.length||l||s(p)};function h(e,t){this.fun=e,this.array=t}h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={};function v(){}o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){"use strict";(function(t){var n=r(0),o=r(16),i=r(18),a=r(19),s=r(20),u=r(5),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||r(21);e.exports=function(e){return new Promise(function(l,f){var d=e.data,p=e.headers;n.isFormData(d)&&delete p["Content-Type"];var h=new XMLHttpRequest,v="onreadystatechange",g=!1;if("test"===t.env.NODE_ENV||"undefined"==typeof window||!window.XDomainRequest||"withCredentials"in h||s(e.url)||(h=new window.XDomainRequest,v="onload",g=!0,h.onprogress=function(){},h.ontimeout=function(){}),e.auth){var y=e.auth.username||"",m=e.auth.password||"";p.Authorization="Basic "+c(y+":"+m)}if(h.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h[v]=function(){if(h&&(4===h.readyState||g)&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var t="getAllResponseHeaders"in h?a(h.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:1223===h.status?204:h.status,statusText:1223===h.status?"No Content":h.statusText,headers:t,config:e,request:h};o(l,f,r),h=null}},h.onerror=function(){f(u("Network Error",e,null,h)),h=null},h.ontimeout=function(){f(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",h)),h=null},n.isStandardBrowserEnv()){var b=r(22),w=(e.withCredentials||s(e.url))&&e.xsrfCookieName?b.read(e.xsrfCookieName):void 0;w&&(p[e.xsrfHeaderName]=w)}if("setRequestHeader"in h&&n.forEach(p,function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete p[t]:h.setRequestHeader(t,e)}),e.withCredentials&&(h.withCredentials=!0),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){h&&(h.abort(),f(e),h=null)}),void 0===d&&(d=null),h.send(d)})}}).call(t,r(3))},function(e,t,r){"use strict";var n=r(17);e.exports=function(e,t,r,o,i){var a=new Error(e);return n(a,t,r,o,i)}},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}();t.arrayToObject=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},t.merge=function(e,r,o){if(!r)return e;if("object"!=typeof r){if(Array.isArray(e))e.push(r);else{if("object"!=typeof e)return[e,r];(o.plainObjects||o.allowPrototypes||!n.call(Object.prototype,r))&&(e[r]=!0)}return e}if("object"!=typeof e)return[e].concat(r);var i=e;return Array.isArray(e)&&!Array.isArray(r)&&(i=t.arrayToObject(e,o)),Array.isArray(e)&&Array.isArray(r)?(r.forEach(function(r,i){n.call(e,i)?e[i]&&"object"==typeof e[i]?e[i]=t.merge(e[i],r,o):e.push(r):e[i]=r}),e):Object.keys(r).reduce(function(e,i){var a=r[i];return n.call(e,i)?e[i]=t.merge(e[i],a,o):e[i]=a,e},i)},t.assign=function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),r="",n=0;n<t.length;++n){var i=t.charCodeAt(n);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?r+=t.charAt(n):i<128?r+=o[i]:i<2048?r+=o[192|i>>6]+o[128|63&i]:i<55296||i>=57344?r+=o[224|i>>12]+o[128|i>>6&63]+o[128|63&i]:(n+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(n)),r+=o[240|i>>18]+o[128|i>>12&63]+o[128|i>>6&63]+o[128|63&i])}return r},t.compact=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],a=Object.keys(i),s=0;s<a.length;++s){var u=a[s],c=i[u];"object"==typeof c&&null!==c&&-1===r.indexOf(c)&&(t.push({obj:i,prop:u}),r.push(c))}return function(e){for(var t;e.length;){var r=e.pop();if(t=r.obj[r.prop],Array.isArray(t)){for(var n=[],o=0;o<t.length;++o)void 0!==t[o]&&n.push(t[o]);r.obj[r.prop]=n}}return t}(t)},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null!==e&&void 0!==e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},function(e,t,r){"use strict";var n=String.prototype.replace,o=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return n.call(e,o,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=r(11),i=r(30),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=t.accessToken,n=t.url,o=t.headers,i=t.accessTokenType,a=t.version;if(this.accessTokenType=i||"header",this.accessToken=r,this.headers=o||{},this.version=a||"1.1",!n)throw new Error("No Directus URL provided");var s=n.replace("/api/1.1","");this.base=s.replace(/\/+$/,""),this.api=this.base+"/api/",this.url=this.api+this.version+"/"}t=e,a=void 0,(r=[{key:"_onCaughtError",value:function(e,t,r){return r.response&&r.response.data?t(r.response.data):t(r)}},{key:"_get",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=this._requestHeaders,s=n?this.api:this.url;return this.setAccessTokenParam(r),new Promise(function(n,u){o.get(s+e,{params:r,headers:a,paramsSerializer:function(e){return i.stringify(e,{arrayFormat:"brackets",encode:!1})}}).then(function(e){return n(e.data)}).catch(function(e){return t._onCaughtError(n,u,e)})})}},{key:"_post",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=this._requestHeaders,s=n?this.api:this.url;return this.setAccessTokenParam(i),new Promise(function(n,u){o.post(s+e,r,{headers:a,params:i}).then(function(e){return n(e.data)}).catch(function(e){return t._onCaughtError(n,u,e)})})}},{key:"_put",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=this._requestHeaders,s=n?this.api:this.url;return this.setAccessTokenParam(i),new Promise(function(n,u){o.put(s+e,r,{headers:a,params:i}).then(function(e){return n(e.data)}).catch(function(e){return t._onCaughtError(n,u,e)})})}},{key:"_delete",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=this._requestHeaders,s=n?this.api:this.url;return this.setAccessTokenParam(i),new Promise(function(n,u){o.delete(s+e,{headers:a,data:r,params:i}).then(function(e){return n(e.data)}).catch(function(e){return t._onCaughtError(n,u,e)})})}},{key:"authenticate",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("email"),r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("password");return new Promise(function(n,o){e._post("auth/request-token",{email:t,password:r}).then(function(t){return t.success?(e.accessToken=t.data.token,n(t)):o(t)}).catch(function(e){return o(e)})})}},{key:"createItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._post("tables/".concat(e,"/rows"),t,r)}},{key:"getItems",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._get("tables/".concat(e,"/rows"),t)}},{key:"getItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("id"),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._get("tables/".concat(e,"/rows/").concat(t),r)}},{key:"updateItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("id"),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s("data"),n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this._put("tables/".concat(e,"/rows/").concat(t),r,n)}},{key:"deleteItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("id"),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._delete("tables/".concat(e,"/rows/").concat(t),{},r)}},{key:"createBulk",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");if(!1===Array.isArray(t))throw new TypeError("Parameter data should be an array of objects");return this._post("tables/".concat(e,"/rows/bulk"),{rows:t})}},{key:"updateBulk",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");if(!1===Array.isArray(t))throw new TypeError("Parameter data should be an array of objects");return this._put("tables/".concat(e,"/rows/bulk"),{rows:t})}},{key:"deleteBulk",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");if(!1===Array.isArray(t))throw new TypeError("Parameter data should be an array of objects");return this._delete("tables/".concat(e,"/rows/bulk"),{rows:t})}},{key:"createFile",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._post("files",e)}},{key:"getFiles",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("files",e)}},{key:"getFile",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._get("files/".concat(e))}},{key:"updateFile",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");return this._put("files/".concat(e),t)}},{key:"deleteFile",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._delete("files/".concat(e))}},{key:"createTable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("name");return this._post("tables",{name:e})}},{key:"getTables",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("tables",e)}},{key:"getTable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._get("tables/".concat(e),t)}},{key:"createColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._post("tables/".concat(e,"/columns"),t)}},{key:"getColumns",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._get("tables/".concat(e,"/columns"),t)}},{key:"getColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("column");return this._get("tables/".concat(e,"/columns/").concat(t))}},{key:"updateColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("column"),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._put("tables/".concat(e,"/columns/").concat(t),r)}},{key:"deleteColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("column");return this._delete("tables/".concat(e,"/columns/").concat(t))}},{key:"createGroup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("name");return this._post("groups",{name:e})}},{key:"getGroups",value:function(){return this._get("groups")}},{key:"getGroup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._get("groups/".concat(e))}},{key:"createPrivileges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._post("privileges/".concat(e),t)}},{key:"getPrivileges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._get("privileges/".concat(e))}},{key:"getTablePrivileges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("table");return this._get("privileges/".concat(e,"/").concat(t))}},{key:"updatePrivileges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("table");return this._get("privileges/".concat(e,"/").concat(t))}},{key:"getPreferences",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table");return this._get("tables/".concat(e,"/preferences"))}},{key:"updatePreference",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._update("tables/".concat(e,"/preferences"),t)}},{key:"getMessages",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("messages/rows",e)}},{key:"getMessage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._get("messages/rows/".concat(e))}},{key:"sendMessage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("data");return this._post("messages/rows/",e)}},{key:"getActivity",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("activity",e)}},{key:"getBookmarks",value:function(){return this._get("bookmarks")}},{key:"getUserBookmarks",value:function(){return this._get("bookmarks/self")}},{key:"getBookmark",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._get("bookmarks/".concat(e))}},{key:"createBookmark",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("data");return this._post("bookmarks",e)}},{key:"deleteBookmark",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._delete("bookmarks/".concat(e))}},{key:"getSettings",value:function(){return this._get("settings")}},{key:"getSettingsByCollection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("name");return this._get("settings/".concat(e))}},{key:"updateSettings",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("name"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._put("settings/".concat(e),t)}},{key:"getUsers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("users",e)}},{key:"getUser",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._get("users/".concat(e))}},{key:"getMe",value:function(){return this._get("users/me")}},{key:"createUser",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("user");return this._post("users",e)}},{key:"updateUser",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");return this._put("users/".concat(e),t)}},{key:"updateMe",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("data");return this._put("users/me",e)}},{key:"updatePassword",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("password");return this._put("users/me",{password:e})}},{key:"getApi",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("api_endpoint"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._get(e,t,!0)}},{key:"postApi",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("api_endpoint"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");return this._post(e,t,!0)}},{key:"putApi",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("api_endpoint"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");return this._put(e,t,!0)}},{key:"deleteApi",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("api_endpoint"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");return this._delete(e,t,!0)}},{key:"getHash",value:function(){arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("string");var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._post("hash",e)}},{key:"getRandom",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._post("random",e)}},{key:"setAccessTokenParam",value:function(e){this.accessToken&&"parameter"===this.accessTokenType&&(e.access_token=this.accessToken)}},{key:"_requestHeaders",get:function(){var e=this.headers||{};return this.accessToken&&"header"===this.accessTokenType&&(e.Authorization="Bearer "+this.accessToken),e}}])&&n(t.prototype,r),a&&n(t,a);var t,r,a;return e}();function s(e){throw new Error("Missing parameter [".concat(e,"]"))}e.exports=a},function(e,t,r){e.exports=r(12)},function(e,t,r){"use strict";var n=r(0),o=r(2),i=r(14),a=r(1);function s(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var u=s(a);u.Axios=i,u.create=function(e){return s(n.merge(a,e))},u.Cancel=r(7),u.CancelToken=r(28),u.isCancel=r(6),u.all=function(e){return Promise.all(e)},u.spread=r(29),e.exports=u,e.exports.default=u},function(e,t){e.exports=function(e){return null!=e&&(r(e)||(t=e,"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&r(t.slice(0,0)))||!!e._isBuffer);var t};function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,r){"use strict";var n=r(1),o=r(0),i=r(23),a=r(24),s=r(26),u=r(27);function c(e){this.defaults=e,this.interceptors={request:new i,response:new i}}c.prototype.request=function(e){"string"==typeof e&&(e=o.merge({url:arguments[0]},arguments[1])),(e=o.merge(n,this.defaults,{method:"get"},e)).method=e.method.toLowerCase(),e.baseURL&&!s(e.url)&&(e.url=u(e.baseURL,e.url));var t=[a,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)r=r.then(t.shift(),t.shift());return r},o.forEach(["delete","get","head","options"],function(e){c.prototype[e]=function(t,r){return this.request(o.merge(r||{},{method:e,url:t}))}}),o.forEach(["post","put","patch"],function(e){c.prototype[e]=function(t,r,n){return this.request(o.merge(n||{},{method:e,url:t,data:r}))}}),e.exports=c},function(e,t,r){"use strict";var n=r(0);e.exports=function(e,t){n.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}},function(e,t,r){"use strict";var n=r(5);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e}},function(e,t,r){"use strict";var n=r(0);function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var a=[];n.forEach(t,function(e,t){null!==e&&void 0!==e&&(n.isArray(e)&&(t+="[]"),n.isArray(e)||(e=[e]),n.forEach(e,function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))}))}),i=a.join("&")}return i&&(e+=(-1===e.indexOf("?")?"?":"&")+i),e}},function(e,t,r){"use strict";var n=r(0);e.exports=function(e){var t,r,o,i={};return e?(n.forEach(e.split("\n"),function(e){o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t&&(i[t]=i[t]?i[t]+", "+r:r)}),i):i}},function(e,t,r){"use strict";var n=r(0);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function o(){this.message="String contains an invalid character"}o.prototype=new Error,o.prototype.code=5,o.prototype.name="InvalidCharacterError";e.exports=function(e){for(var t,r,i=String(e),a="",s=0,u=n;i.charAt(0|s)||(u="=",s%1);a+=u.charAt(63&t>>8-s%1*8)){if((r=i.charCodeAt(s+=.75))>255)throw new o;t=t<<8|r}return a}},function(e,t,r){"use strict";var n=r(0);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n=r(0);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=o},function(e,t,r){"use strict";var n=r(0),o=r(25),i=r(6),a=r(1);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){s(e),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]});return(e.adapter||a.adapter)(e).then(function(t){return s(e),t.data=o(t.data,t.headers,e.transformResponse),t},function(t){return i(t)||(s(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,r){"use strict";var n=r(0);e.exports=function(e,t,r){return n.forEach(r,function(r){e=r(e,t)}),e}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";var n=r(7);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var r=this;e(function(e){r.reason||(r.reason=new n(e),t(r.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o(function(t){e=t}),cancel:e}},e.exports=o},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";var n=r(31),o=r(32),i=r(9);e.exports={formats:i,parse:o,stringify:n}},function(e,t,r){"use strict";var n=r(8),o=r(9),i={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},a=Date.prototype.toISOString,s={delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,serializeDate:function(e){return a.call(e)},skipNulls:!1,strictNullHandling:!1},u=function e(t,r,o,i,a,u,c,l,f,d,p,h){var v=t;if("function"==typeof c)v=c(r,v);else if(v instanceof Date)v=d(v);else if(null===v){if(i)return u&&!h?u(r,s.encoder):r;v=""}if("string"==typeof v||"number"==typeof v||"boolean"==typeof v||n.isBuffer(v)){if(u){return[p(h?r:u(r,s.encoder))+"="+p(u(v,s.encoder))]}return[p(r)+"="+p(String(v))]}var g=[];if(void 0===v)return g;var y;if(Array.isArray(c))y=c;else{var m=Object.keys(v);y=l?m.sort(l):m}for(var b=0;b<y.length;++b){var w=y[b];a&&null===v[w]||(g=Array.isArray(v)?g.concat(e(v[w],o(r,w),o,i,a,u,c,l,f,d,p,h)):g.concat(e(v[w],r+(f?"."+w:"["+w+"]"),o,i,a,u,c,l,f,d,p,h)))}return g};e.exports=function(e,t){var r=e,a=t?n.assign({},t):{};if(null!==a.encoder&&void 0!==a.encoder&&"function"!=typeof a.encoder)throw new TypeError("Encoder has to be a function.");var c=void 0===a.delimiter?s.delimiter:a.delimiter,l="boolean"==typeof a.strictNullHandling?a.strictNullHandling:s.strictNullHandling,f="boolean"==typeof a.skipNulls?a.skipNulls:s.skipNulls,d="boolean"==typeof a.encode?a.encode:s.encode,p="function"==typeof a.encoder?a.encoder:s.encoder,h="function"==typeof a.sort?a.sort:null,v=void 0!==a.allowDots&&a.allowDots,g="function"==typeof a.serializeDate?a.serializeDate:s.serializeDate,y="boolean"==typeof a.encodeValuesOnly?a.encodeValuesOnly:s.encodeValuesOnly;if(void 0===a.format)a.format=o.default;else if(!Object.prototype.hasOwnProperty.call(o.formatters,a.format))throw new TypeError("Unknown format option provided.");var m,b,w=o.formatters[a.format];"function"==typeof a.filter?r=(b=a.filter)("",r):Array.isArray(a.filter)&&(m=b=a.filter);var k=[];if("object"!=typeof r||null===r)return"";var _;_=a.arrayFormat in i?a.arrayFormat:"indices"in a?a.indices?"indices":"repeat":"indices";var x=i[_];m||(m=Object.keys(r)),h&&m.sort(h);for(var j=0;j<m.length;++j){var A=m[j];f&&null===r[A]||(k=k.concat(u(r[A],A,x,l,f,d?p:null,b,h,v,g,w,y)))}var T=k.join(c),O=!0===a.addQueryPrefix?"?":"";return T.length>0?O+T:""}},function(e,t,r){"use strict";var n=r(8),o=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=/(\[[^[\]]*])/.exec(n),s=a?n.slice(0,a.index):n,u=[];if(s){if(!r.plainObjects&&o.call(Object.prototype,s)&&!r.allowPrototypes)return;u.push(s)}for(var c=0;null!==(a=i.exec(n))&&c<r.depth;){if(c+=1,!r.plainObjects&&o.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(a[1])}return a&&u.push("["+n.slice(a.index)+"]"),function(e,t,r){for(var n=t,o=e.length-1;o>=0;--o){var i,a=e[o];if("[]"===a)i=(i=[]).concat(n);else{i=r.plainObjects?Object.create(null):{};var s="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,u=parseInt(s,10);!isNaN(u)&&a!==s&&String(u)===s&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(i=[])[u]=n:i[s]=n}n=i}return n}(u,t,r)}};e.exports=function(e,t){var r=t?n.assign({},t):{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.ignoreQueryPrefix=!0===r.ignoreQueryPrefix,r.delimiter="string"==typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:i.delimiter,r.depth="number"==typeof r.depth?r.depth:i.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:i.arrayLimit,r.parseArrays=!1!==r.parseArrays,r.decoder="function"==typeof r.decoder?r.decoder:i.decoder,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:i.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:i.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:i.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:i.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:i.strictNullHandling,""===e||null===e||void 0===e)return r.plainObjects?Object.create(null):{};for(var s="string"==typeof e?function(e,t){for(var r={},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,s=n.split(t.delimiter,a),u=0;u<s.length;++u){var c,l,f=s[u],d=f.indexOf("]="),p=-1===d?f.indexOf("="):d+1;-1===p?(c=t.decoder(f,i.decoder),l=t.strictNullHandling?null:""):(c=t.decoder(f.slice(0,p),i.decoder),l=t.decoder(f.slice(p+1),i.decoder)),o.call(r,c)?r[c]=[].concat(r[c]).concat(l):r[c]=l}return r}(e,r):e,u=r.plainObjects?Object.create(null):{},c=Object.keys(s),l=0;l<c.length;++l){var f=c[l],d=a(f,s[f],r);u=n.merge(u,d,r)}return n.compact(u)}}]); | ||
var RemoteInstance=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=10)}([function(e,t,r){"use strict";var n=r(2),o=r(13),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function s(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!==e&&void 0!==e)if("object"==typeof e||a(e)||(e=[e]),a(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:o,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:u,isStream:function(e){return s(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]=r}for(var n=0,o=arguments.length;n<o;n++)c(arguments[n],r);return t},extend:function(e,t,r){return c(t,function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t,r){"use strict";(function(t){var n=r(0),o=r(15),i={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s={adapter:function(){var e;return"undefined"!=typeof XMLHttpRequest?e=r(4):void 0!==t&&(e=r(4)),e}(),transformRequest:[function(e,t){return o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(e){s.headers[e]={}}),n.forEach(["post","put","patch"],function(e){s.headers[e]=n.merge(i)}),e.exports=s}).call(t,r(3))},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=s(d);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new h(e,t)),1!==c.length||l||s(p)};function h(e,t){this.fun=e,this.array=t}h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={};function v(){}o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){"use strict";(function(t){var n=r(0),o=r(16),i=r(18),a=r(19),s=r(20),u=r(5),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||r(21);e.exports=function(e){return new Promise(function(l,f){var d=e.data,p=e.headers;n.isFormData(d)&&delete p["Content-Type"];var h=new XMLHttpRequest,v="onreadystatechange",g=!1;if("test"===t.env.NODE_ENV||"undefined"==typeof window||!window.XDomainRequest||"withCredentials"in h||s(e.url)||(h=new window.XDomainRequest,v="onload",g=!0,h.onprogress=function(){},h.ontimeout=function(){}),e.auth){var y=e.auth.username||"",m=e.auth.password||"";p.Authorization="Basic "+c(y+":"+m)}if(h.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h[v]=function(){if(h&&(4===h.readyState||g)&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var t="getAllResponseHeaders"in h?a(h.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:1223===h.status?204:h.status,statusText:1223===h.status?"No Content":h.statusText,headers:t,config:e,request:h};o(l,f,r),h=null}},h.onerror=function(){f(u("Network Error",e,null,h)),h=null},h.ontimeout=function(){f(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",h)),h=null},n.isStandardBrowserEnv()){var b=r(22),w=(e.withCredentials||s(e.url))&&e.xsrfCookieName?b.read(e.xsrfCookieName):void 0;w&&(p[e.xsrfHeaderName]=w)}if("setRequestHeader"in h&&n.forEach(p,function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete p[t]:h.setRequestHeader(t,e)}),e.withCredentials&&(h.withCredentials=!0),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){h&&(h.abort(),f(e),h=null)}),void 0===d&&(d=null),h.send(d)})}}).call(t,r(3))},function(e,t,r){"use strict";var n=r(17);e.exports=function(e,t,r,o,i){var a=new Error(e);return n(a,t,r,o,i)}},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}();t.arrayToObject=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},t.merge=function(e,r,o){if(!r)return e;if("object"!=typeof r){if(Array.isArray(e))e.push(r);else{if("object"!=typeof e)return[e,r];(o.plainObjects||o.allowPrototypes||!n.call(Object.prototype,r))&&(e[r]=!0)}return e}if("object"!=typeof e)return[e].concat(r);var i=e;return Array.isArray(e)&&!Array.isArray(r)&&(i=t.arrayToObject(e,o)),Array.isArray(e)&&Array.isArray(r)?(r.forEach(function(r,i){n.call(e,i)?e[i]&&"object"==typeof e[i]?e[i]=t.merge(e[i],r,o):e.push(r):e[i]=r}),e):Object.keys(r).reduce(function(e,i){var a=r[i];return n.call(e,i)?e[i]=t.merge(e[i],a,o):e[i]=a,e},i)},t.assign=function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),r="",n=0;n<t.length;++n){var i=t.charCodeAt(n);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?r+=t.charAt(n):i<128?r+=o[i]:i<2048?r+=o[192|i>>6]+o[128|63&i]:i<55296||i>=57344?r+=o[224|i>>12]+o[128|i>>6&63]+o[128|63&i]:(n+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(n)),r+=o[240|i>>18]+o[128|i>>12&63]+o[128|i>>6&63]+o[128|63&i])}return r},t.compact=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],a=Object.keys(i),s=0;s<a.length;++s){var u=a[s],c=i[u];"object"==typeof c&&null!==c&&-1===r.indexOf(c)&&(t.push({obj:i,prop:u}),r.push(c))}return function(e){for(var t;e.length;){var r=e.pop();if(t=r.obj[r.prop],Array.isArray(t)){for(var n=[],o=0;o<t.length;++o)void 0!==t[o]&&n.push(t[o]);r.obj[r.prop]=n}}return t}(t)},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null!==e&&void 0!==e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},function(e,t,r){"use strict";var n=String.prototype.replace,o=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return n.call(e,o,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=r(11),i=r(30),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=t.accessToken,n=t.url,o=t.headers,i=t.accessTokenType,a=t.version;if(this.accessTokenType=i||"header",this.accessToken=r,this.headers=o||{},this.version=a||"1.1",!n)throw new Error("No Directus URL provided");var s=n.replace("/api/1.1","");this.base=s.replace(/\/+$/,""),this.api=this.base+"/api/",this.url=this.api+this.version+"/"}t=e,a=void 0,(r=[{key:"_onCaughtError",value:function(e,t,r){return r.response&&r.response.data?t(r.response.data):t(r)}},{key:"_get",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=this._requestHeaders,s=n?this.api:this.url;return this.setAccessTokenParam(r),new Promise(function(n,u){o.get(s+e,{params:r,headers:a,paramsSerializer:function(e){return i.stringify(e,{arrayFormat:"brackets",encode:!1})}}).then(function(e){return n(e.data)}).catch(function(e){return t._onCaughtError(n,u,e)})})}},{key:"_post",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=this._requestHeaders,s=n?this.api:this.url;return this.setAccessTokenParam(i),new Promise(function(n,u){o.post(s+e,r,{headers:a,params:i}).then(function(e){return n(e.data)}).catch(function(e){return t._onCaughtError(n,u,e)})})}},{key:"_put",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=this._requestHeaders,s=n?this.api:this.url;return this.setAccessTokenParam(i),new Promise(function(n,u){o.put(s+e,r,{headers:a,params:i}).then(function(e){return n(e.data)}).catch(function(e){return t._onCaughtError(n,u,e)})})}},{key:"_delete",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=this._requestHeaders,s=n?this.api:this.url;return this.setAccessTokenParam(i),new Promise(function(n,u){o.delete(s+e,{headers:a,data:r,params:i}).then(function(e){return n(e.data)}).catch(function(e){return t._onCaughtError(n,u,e)})})}},{key:"authenticate",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("email"),r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("password");return new Promise(function(n,o){e._post("auth/request-token",{email:t,password:r}).then(function(t){return t.success?(e.accessToken=t.data.token,n(t)):o(t)}).catch(function(e){return o(e)})})}},{key:"deauthenticate",value:function(){this.accessToken=null}},{key:"createItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._post("tables/".concat(e,"/rows"),t,r)}},{key:"getItems",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._get("tables/".concat(e,"/rows"),t)}},{key:"getItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("id"),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._get("tables/".concat(e,"/rows/").concat(t),r)}},{key:"updateItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("id"),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s("data"),n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this._put("tables/".concat(e,"/rows/").concat(t),r,n)}},{key:"deleteItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("id"),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._delete("tables/".concat(e,"/rows/").concat(t),{},r)}},{key:"createBulk",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");if(!1===Array.isArray(t))throw new TypeError("Parameter data should be an array of objects");return this._post("tables/".concat(e,"/rows/bulk"),{rows:t})}},{key:"updateBulk",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");if(!1===Array.isArray(t))throw new TypeError("Parameter data should be an array of objects");return this._put("tables/".concat(e,"/rows/bulk"),{rows:t})}},{key:"deleteBulk",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");if(!1===Array.isArray(t))throw new TypeError("Parameter data should be an array of objects");return this._delete("tables/".concat(e,"/rows/bulk"),{rows:t})}},{key:"createFile",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._post("files",e)}},{key:"getFiles",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("files",e)}},{key:"getFile",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._get("files/".concat(e))}},{key:"updateFile",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");return this._put("files/".concat(e),t)}},{key:"deleteFile",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._delete("files/".concat(e))}},{key:"createTable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("name");return this._post("tables",{name:e})}},{key:"getTables",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("tables",e)}},{key:"getTable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._get("tables/".concat(e),t)}},{key:"createColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._post("tables/".concat(e,"/columns"),t)}},{key:"getColumns",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._get("tables/".concat(e,"/columns"),t)}},{key:"getColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("column");return this._get("tables/".concat(e,"/columns/").concat(t))}},{key:"updateColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("column"),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._put("tables/".concat(e,"/columns/").concat(t),r)}},{key:"deleteColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("column");return this._delete("tables/".concat(e,"/columns/").concat(t))}},{key:"createGroup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("name");return this._post("groups",{name:e})}},{key:"getGroups",value:function(){return this._get("groups")}},{key:"getGroup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._get("groups/".concat(e))}},{key:"createPrivileges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._post("privileges/".concat(e),t)}},{key:"getPrivileges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._get("privileges/".concat(e))}},{key:"getTablePrivileges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("table");return this._get("privileges/".concat(e,"/").concat(t))}},{key:"updatePrivileges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("table");return this._get("privileges/".concat(e,"/").concat(t))}},{key:"getPreferences",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table");return this._get("tables/".concat(e,"/preferences"))}},{key:"updatePreference",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._update("tables/".concat(e,"/preferences"),t)}},{key:"getMessages",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("messages/rows",e)}},{key:"getMessage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._get("messages/rows/".concat(e))}},{key:"sendMessage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("data");return this._post("messages/rows/",e)}},{key:"getActivity",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("activity",e)}},{key:"getBookmarks",value:function(){return this._get("bookmarks")}},{key:"getUserBookmarks",value:function(){return this._get("bookmarks/self")}},{key:"getBookmark",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._get("bookmarks/".concat(e))}},{key:"createBookmark",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("data");return this._post("bookmarks",e)}},{key:"deleteBookmark",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._delete("bookmarks/".concat(e))}},{key:"getSettings",value:function(){return this._get("settings")}},{key:"getSettingsByCollection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("name");return this._get("settings/".concat(e))}},{key:"updateSettings",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("name"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._put("settings/".concat(e),t)}},{key:"getUsers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("users",e)}},{key:"getUser",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._get("users/".concat(e))}},{key:"getMe",value:function(){return this._get("users/me")}},{key:"createUser",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("user");return this._post("users",e)}},{key:"updateUser",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");return this._put("users/".concat(e),t)}},{key:"updateMe",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("data");return this._put("users/me",e)}},{key:"updatePassword",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("password");return this._put("users/me",{password:e})}},{key:"getApi",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("api_endpoint"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._get(e,t,!0)}},{key:"postApi",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("api_endpoint"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");return this._post(e,t,!0)}},{key:"putApi",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("api_endpoint"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");return this._put(e,t,!0)}},{key:"deleteApi",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("api_endpoint"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");return this._delete(e,t,!0)}},{key:"getHash",value:function(){arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("string");var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._post("hash",e)}},{key:"getRandom",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._post("random",e)}},{key:"setAccessTokenParam",value:function(e){this.accessToken&&"parameter"===this.accessTokenType&&(e.access_token=this.accessToken)}},{key:"_requestHeaders",get:function(){var e=Object.assign({},this.headers);return this.accessToken&&"header"===this.accessTokenType&&(e.Authorization="Bearer "+this.accessToken),e}}])&&n(t.prototype,r),a&&n(t,a);var t,r,a;return e}();function s(e){throw new Error("Missing parameter [".concat(e,"]"))}e.exports=a},function(e,t,r){e.exports=r(12)},function(e,t,r){"use strict";var n=r(0),o=r(2),i=r(14),a=r(1);function s(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var u=s(a);u.Axios=i,u.create=function(e){return s(n.merge(a,e))},u.Cancel=r(7),u.CancelToken=r(28),u.isCancel=r(6),u.all=function(e){return Promise.all(e)},u.spread=r(29),e.exports=u,e.exports.default=u},function(e,t){e.exports=function(e){return null!=e&&(r(e)||(t=e,"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&r(t.slice(0,0)))||!!e._isBuffer);var t};function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,r){"use strict";var n=r(1),o=r(0),i=r(23),a=r(24),s=r(26),u=r(27);function c(e){this.defaults=e,this.interceptors={request:new i,response:new i}}c.prototype.request=function(e){"string"==typeof e&&(e=o.merge({url:arguments[0]},arguments[1])),(e=o.merge(n,this.defaults,{method:"get"},e)).method=e.method.toLowerCase(),e.baseURL&&!s(e.url)&&(e.url=u(e.baseURL,e.url));var t=[a,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)r=r.then(t.shift(),t.shift());return r},o.forEach(["delete","get","head","options"],function(e){c.prototype[e]=function(t,r){return this.request(o.merge(r||{},{method:e,url:t}))}}),o.forEach(["post","put","patch"],function(e){c.prototype[e]=function(t,r,n){return this.request(o.merge(n||{},{method:e,url:t,data:r}))}}),e.exports=c},function(e,t,r){"use strict";var n=r(0);e.exports=function(e,t){n.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}},function(e,t,r){"use strict";var n=r(5);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e}},function(e,t,r){"use strict";var n=r(0);function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var a=[];n.forEach(t,function(e,t){null!==e&&void 0!==e&&(n.isArray(e)&&(t+="[]"),n.isArray(e)||(e=[e]),n.forEach(e,function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))}))}),i=a.join("&")}return i&&(e+=(-1===e.indexOf("?")?"?":"&")+i),e}},function(e,t,r){"use strict";var n=r(0);e.exports=function(e){var t,r,o,i={};return e?(n.forEach(e.split("\n"),function(e){o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t&&(i[t]=i[t]?i[t]+", "+r:r)}),i):i}},function(e,t,r){"use strict";var n=r(0);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function o(){this.message="String contains an invalid character"}o.prototype=new Error,o.prototype.code=5,o.prototype.name="InvalidCharacterError";e.exports=function(e){for(var t,r,i=String(e),a="",s=0,u=n;i.charAt(0|s)||(u="=",s%1);a+=u.charAt(63&t>>8-s%1*8)){if((r=i.charCodeAt(s+=.75))>255)throw new o;t=t<<8|r}return a}},function(e,t,r){"use strict";var n=r(0);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n=r(0);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=o},function(e,t,r){"use strict";var n=r(0),o=r(25),i=r(6),a=r(1);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){s(e),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]});return(e.adapter||a.adapter)(e).then(function(t){return s(e),t.data=o(t.data,t.headers,e.transformResponse),t},function(t){return i(t)||(s(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,r){"use strict";var n=r(0);e.exports=function(e,t,r){return n.forEach(r,function(r){e=r(e,t)}),e}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";var n=r(7);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var r=this;e(function(e){r.reason||(r.reason=new n(e),t(r.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o(function(t){e=t}),cancel:e}},e.exports=o},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";var n=r(31),o=r(32),i=r(9);e.exports={formats:i,parse:o,stringify:n}},function(e,t,r){"use strict";var n=r(8),o=r(9),i={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},a=Date.prototype.toISOString,s={delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,serializeDate:function(e){return a.call(e)},skipNulls:!1,strictNullHandling:!1},u=function e(t,r,o,i,a,u,c,l,f,d,p,h){var v=t;if("function"==typeof c)v=c(r,v);else if(v instanceof Date)v=d(v);else if(null===v){if(i)return u&&!h?u(r,s.encoder):r;v=""}if("string"==typeof v||"number"==typeof v||"boolean"==typeof v||n.isBuffer(v)){if(u){return[p(h?r:u(r,s.encoder))+"="+p(u(v,s.encoder))]}return[p(r)+"="+p(String(v))]}var g=[];if(void 0===v)return g;var y;if(Array.isArray(c))y=c;else{var m=Object.keys(v);y=l?m.sort(l):m}for(var b=0;b<y.length;++b){var w=y[b];a&&null===v[w]||(g=Array.isArray(v)?g.concat(e(v[w],o(r,w),o,i,a,u,c,l,f,d,p,h)):g.concat(e(v[w],r+(f?"."+w:"["+w+"]"),o,i,a,u,c,l,f,d,p,h)))}return g};e.exports=function(e,t){var r=e,a=t?n.assign({},t):{};if(null!==a.encoder&&void 0!==a.encoder&&"function"!=typeof a.encoder)throw new TypeError("Encoder has to be a function.");var c=void 0===a.delimiter?s.delimiter:a.delimiter,l="boolean"==typeof a.strictNullHandling?a.strictNullHandling:s.strictNullHandling,f="boolean"==typeof a.skipNulls?a.skipNulls:s.skipNulls,d="boolean"==typeof a.encode?a.encode:s.encode,p="function"==typeof a.encoder?a.encoder:s.encoder,h="function"==typeof a.sort?a.sort:null,v=void 0!==a.allowDots&&a.allowDots,g="function"==typeof a.serializeDate?a.serializeDate:s.serializeDate,y="boolean"==typeof a.encodeValuesOnly?a.encodeValuesOnly:s.encodeValuesOnly;if(void 0===a.format)a.format=o.default;else if(!Object.prototype.hasOwnProperty.call(o.formatters,a.format))throw new TypeError("Unknown format option provided.");var m,b,w=o.formatters[a.format];"function"==typeof a.filter?r=(b=a.filter)("",r):Array.isArray(a.filter)&&(m=b=a.filter);var k=[];if("object"!=typeof r||null===r)return"";var _;_=a.arrayFormat in i?a.arrayFormat:"indices"in a?a.indices?"indices":"repeat":"indices";var x=i[_];m||(m=Object.keys(r)),h&&m.sort(h);for(var j=0;j<m.length;++j){var A=m[j];f&&null===r[A]||(k=k.concat(u(r[A],A,x,l,f,d?p:null,b,h,v,g,w,y)))}var T=k.join(c),O=!0===a.addQueryPrefix?"?":"";return T.length>0?O+T:""}},function(e,t,r){"use strict";var n=r(8),o=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=/(\[[^[\]]*])/.exec(n),s=a?n.slice(0,a.index):n,u=[];if(s){if(!r.plainObjects&&o.call(Object.prototype,s)&&!r.allowPrototypes)return;u.push(s)}for(var c=0;null!==(a=i.exec(n))&&c<r.depth;){if(c+=1,!r.plainObjects&&o.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(a[1])}return a&&u.push("["+n.slice(a.index)+"]"),function(e,t,r){for(var n=t,o=e.length-1;o>=0;--o){var i,a=e[o];if("[]"===a)i=(i=[]).concat(n);else{i=r.plainObjects?Object.create(null):{};var s="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,u=parseInt(s,10);!isNaN(u)&&a!==s&&String(u)===s&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(i=[])[u]=n:i[s]=n}n=i}return n}(u,t,r)}};e.exports=function(e,t){var r=t?n.assign({},t):{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.ignoreQueryPrefix=!0===r.ignoreQueryPrefix,r.delimiter="string"==typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:i.delimiter,r.depth="number"==typeof r.depth?r.depth:i.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:i.arrayLimit,r.parseArrays=!1!==r.parseArrays,r.decoder="function"==typeof r.decoder?r.decoder:i.decoder,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:i.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:i.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:i.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:i.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:i.strictNullHandling,""===e||null===e||void 0===e)return r.plainObjects?Object.create(null):{};for(var s="string"==typeof e?function(e,t){for(var r={},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,s=n.split(t.delimiter,a),u=0;u<s.length;++u){var c,l,f=s[u],d=f.indexOf("]="),p=-1===d?f.indexOf("="):d+1;-1===p?(c=t.decoder(f,i.decoder),l=t.strictNullHandling?null:""):(c=t.decoder(f.slice(0,p),i.decoder),l=t.decoder(f.slice(p+1),i.decoder)),o.call(r,c)?r[c]=[].concat(r[c]).concat(l):r[c]=l}return r}(e,r):e,u=r.plainObjects?Object.create(null):{},c=Object.keys(s),l=0;l<c.length;++l){var f=c[l],d=a(f,s[f],r);u=n.merge(u,d,r)}return n.compact(u)}}]); |
{ | ||
"name": "directus-sdk-javascript", | ||
"version": "2.11.1", | ||
"version": "2.12.0", | ||
"description": "WIP - Directus SDK for JavaScript (Node and Browser)", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -26,3 +26,3 @@ const axios = require('axios'); | ||
get _requestHeaders() { | ||
const headers = this.headers || {}; | ||
const headers = Object.assign({}, this.headers); | ||
@@ -116,2 +116,6 @@ if (this.accessToken && this.accessTokenType === 'header') { | ||
deauthenticate() { | ||
this.accessToken = null; | ||
} | ||
// Items | ||
@@ -118,0 +122,0 @@ // ---------------------------------------------------------------------------------- |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
85539
342