You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
159 KiB
JavaScript

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

window.cvat=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=90)}([function(t,e,n){(function(e){var n="object",r=function(t){return t&&t.Math==Math&&t};t.exports=r(typeof globalThis==n&&globalThis)||r(typeof window==n&&window)||r(typeof self==n&&self)||r(typeof e==n&&e)||Function("return this")()}).call(this,n(28))},function(t,e,n){var r=n(0),o=n(31),i=n(57),s=n(97),a=r.Symbol,c=o("wks");t.exports=function(t){return c[t]||(c[t]=s&&a[t]||(s?a:i)("Symbol."+t))}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(11);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,n){"use strict";var r=n(30),o=n(108),i=n(25),s=n(17),a=n(73),c=s.set,u=s.getterFor("Array Iterator");t.exports=a(Array,"Array",function(t,e){c(this,{type:"Array Iterator",target:r(t),index:0,kind:e})},function(){var t=u(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}},"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,n){n(9),(()=>{const e=n(113),r=n(115),o=n(48);class i extends Error{constructor(t){super(t);const n=(new Date).toISOString(),i=e.os.toString(),s=`${e.name} ${e.version}`,a=r.parse(this)[0],c=`${a.fileName}`,u=a.lineNumber,l=a.columnNumber,{jobID:f,taskID:p,clientID:h}=o;Object.defineProperties(this,Object.freeze({system:{get:()=>i},client:{get:()=>s},time:{get:()=>n},jobID:{get:()=>f},taskID:{get:()=>p},projID:{get:()=>void 0},clientID:{get:()=>h},filename:{get:()=>c},line:{get:()=>u},column:{get:()=>l}}))}async save(){const t={system:this.system,client:this.client,time:this.time,job_id:this.jobID,task_id:this.taskID,proj_id:this.projID,client_id:this.clientID,message:this.message,filename:this.filename,line:this.line,column:this.column,stack:this.stack};try{const e=n(18);await e.server.exception(t)}catch(t){}}}t.exports={Exception:i,ArgumentError:class extends i{constructor(t){super(t)}},DataError:class extends i{constructor(t){super(t)}},ScriptingError:class extends i{constructor(t){super(t)}},PluginError:class extends i{constructor(t){super(t)}},ServerError:class extends i{constructor(t,e){super(t),Object.defineProperties(this,Object.freeze({code:{get:()=>e}}))}}}})()},function(t,e,n){"use strict";var r=n(78),o=n(136),i=Object.prototype.toString;function s(t){return"[object Array]"===i.call(t)}function a(t){return null!==t&&"object"==typeof t}function c(t){return"[object Function]"===i.call(t)}function u(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),s(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:s,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:o,isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:a,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:c,isStream:function(t){return a(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:u,merge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]=n}for(var r=0,o=arguments.length;r<o;r++)u(arguments[r],n);return e},extend:function(t,e,n){return u(e,function(e,o){t[o]=n&&"function"==typeof e?r(e,n):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(0),o=n(112),i=n(4),s=n(12),a=n(1),c=a("iterator"),u=a("toStringTag"),l=i.values;for(var f in o){var p=r[f],h=p&&p.prototype;if(h){if(h[c]!==l)try{s(h,c,l)}catch(t){h[c]=l}if(h[u]||s(h,u,f),o[f])for(var d in i)if(h[d]!==i[d])try{s(h,d,i[d])}catch(t){h[d]=i[d]}}}},function(t,e,n){"use strict";var r,o,i,s,a=n(13),c=n(22),u=n(0),l=n(59),f=n(96),p=n(15),h=n(63),d=n(23),b=n(98),g=n(11),m=n(24),y=n(47),v=n(16),w=n(99),O=n(101),x=n(102),j=n(66).set,k=n(103),S=n(104),A=n(105),E=n(69),T=n(106),P=n(68),_=n(17),I=n(62),F=n(1)("species"),C="Promise",N=_.get,$=_.set,M=_.getterFor(C),R=f,D=u.TypeError,L=u.document,z=u.process,B=u.fetch,U=z&&z.versions,G=U&&U.v8||"",W=E.f,J=W,q="process"==v(z),V=!!(L&&L.createEvent&&u.dispatchEvent),X=I(C,function(){var t=R.resolve(1),e=function(){},n=(t.constructor={})[F]=function(t){t(e,e)};return!((q||"function"==typeof PromiseRejectionEvent)&&(!c||t.finally)&&t.then(e)instanceof n&&0!==G.indexOf("6.6")&&-1===P.indexOf("Chrome/66"))}),H=X||!O(function(t){R.all(t).catch(function(){})}),K=function(t){var e;return!(!g(t)||"function"!=typeof(e=t.then))&&e},Z=function(t,e,n){if(!e.notified){e.notified=!0;var r=e.reactions;k(function(){for(var o=e.value,i=1==e.state,s=0;r.length>s;){var a,c,u,l=r[s++],f=i?l.ok:l.fail,p=l.resolve,h=l.reject,d=l.domain;try{f?(i||(2===e.rejection&&et(t,e),e.rejection=1),!0===f?a=o:(d&&d.enter(),a=f(o),d&&(d.exit(),u=!0)),a===l.promise?h(D("Promise-chain cycle")):(c=K(a))?c.call(a,p,h):p(a)):h(o)}catch(t){d&&!u&&d.exit(),h(t)}}e.reactions=[],e.notified=!1,n&&!e.rejection&&Q(t,e)})}},Y=function(t,e,n){var r,o;V?((r=L.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),u.dispatchEvent(r)):r={promise:e,reason:n},(o=u["on"+t])?o(r):"unhandledrejection"===t&&A("Unhandled promise rejection",n)},Q=function(t,e){j.call(u,function(){var n,r=e.value;if(tt(e)&&(n=T(function(){q?z.emit("unhandledRejection",r,t):Y("unhandledrejection",t,r)}),e.rejection=q||tt(e)?2:1,n.error))throw n.value})},tt=function(t){return 1!==t.rejection&&!t.parent},et=function(t,e){j.call(u,function(){q?z.emit("rejectionHandled",t):Y("rejectionhandled",t,e.value)})},nt=function(t,e,n,r){return function(o){t(e,n,o,r)}},rt=function(t,e,n,r){e.done||(e.done=!0,r&&(e=r),e.value=n,e.state=2,Z(t,e,!0))},ot=function(t,e,n,r){if(!e.done){e.done=!0,r&&(e=r);try{if(t===n)throw D("Promise can't be resolved itself");var o=K(n);o?k(function(){var r={done:!1};try{o.call(n,nt(ot,t,r,e),nt(rt,t,r,e))}catch(n){rt(t,r,n,e)}}):(e.value=n,e.state=1,Z(t,e,!1))}catch(n){rt(t,{done:!1},n,e)}}};X&&(R=function(t){y(this,R,C),m(t),r.call(this);var e=N(this);try{t(nt(ot,this,e),nt(rt,this,e))}catch(t){rt(this,e,t)}},(r=function(t){$(this,{type:C,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=h(R.prototype,{then:function(t,e){var n=M(this),r=W(x(this,R));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=q?z.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&Z(this,n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=N(t);this.promise=t,this.resolve=nt(ot,t,e),this.reject=nt(rt,t,e)},E.f=W=function(t){return t===R||t===i?new o(t):J(t)},c||"function"!=typeof f||(s=f.prototype.then,p(f.prototype,"then",function(t,e){var n=this;return new R(function(t,e){s.call(n,t,e)}).then(t,e)}),"function"==typeof B&&a({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return S(R,B.apply(u,arguments))}}))),a({global:!0,wrap:!0,forced:X},{Promise:R}),d(R,C,!1,!0),b(C),i=l.Promise,a({target:C,stat:!0,forced:X},{reject:function(t){var e=W(this);return e.reject.call(void 0,t),e.promise}}),a({target:C,stat:!0,forced:c||X},{resolve:function(t){return S(c&&this===i?R:this,t)}}),a({target:C,stat:!0,forced:H},{all:function(t){var e=this,n=W(e),r=n.resolve,o=n.reject,i=T(function(){var n=m(e.resolve),i=[],s=0,a=1;w(t,function(t){var c=s++,u=!1;i.push(void 0),a++,n.call(e,t).then(function(t){u||(u=!0,i[c]=t,--a||r(i))},o)}),--a||r(i)});return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=W(e),r=n.reject,o=T(function(){var o=m(e.resolve);w(t,function(t){o.call(e,t).then(n.resolve,r)})});return o.error&&r(o.value),n.promise}})},function(t,e,n){var r=n(2);t.exports=!r(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(10),o=n(14),i=n(29);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(0),o=n(40).f,i=n(12),s=n(15),a=n(43),c=n(58),u=n(62);t.exports=function(t,e){var n,l,f,p,h,d=t.target,b=t.global,g=t.stat;if(n=b?r:g?r[d]||a(d,{}):(r[d]||{}).prototype)for(l in e){if(p=e[l],f=t.noTargetGet?(h=o(n,l))&&h.value:n[l],!u(b?l:d+(g?".":"#")+l,t.forced)&&void 0!==f){if(typeof p==typeof f)continue;c(p,f)}(t.sham||f&&f.sham)&&i(p,"sham",!0),s(n,l,p,t)}}},function(t,e,n){var r=n(10),o=n(55),i=n(3),s=n(41),a=Object.defineProperty;e.f=r?a:function(t,e,n){if(i(t),e=s(e,!0),i(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(0),o=n(31),i=n(12),s=n(7),a=n(43),c=n(56),u=n(17),l=u.get,f=u.enforce,p=String(c).split("toString");o("inspectSource",function(t){return c.call(t)}),(t.exports=function(t,e,n,o){var c=!!o&&!!o.unsafe,u=!!o&&!!o.enumerable,l=!!o&&!!o.noTargetGet;"function"==typeof n&&("string"!=typeof e||s(n,"name")||i(n,"name",e),f(n).source=p.join("string"==typeof e?e:"")),t!==r?(c?!l&&t[e]&&(u=!0):delete t[e],u?t[e]=n:i(t,e,n)):u?t[e]=n:a(e,n)})(Function.prototype,"toString",function(){return"function"==typeof this&&l(this).source||c.call(this)})},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r,o,i,s=n(91),a=n(0),c=n(11),u=n(12),l=n(7),f=n(44),p=n(45),h=a.WeakMap;if(s){var d=new h,b=d.get,g=d.has,m=d.set;r=function(t,e){return m.call(d,t,e),e},o=function(t){return b.call(d,t)||{}},i=function(t){return g.call(d,t)}}else{var y=f("state");p[y]=!0,r=function(t,e){return u(t,y,e),e},o=function(t){return l(t,y)?t[y]:{}},i=function(t){return l(t,y)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){n(9),n(117),(()=>{const e=n(122),{ServerError:r}=n(5),o=n(123),i=n(48);function s(t,e){if(t.response){const n=`${e}. `+`${t.message}. ${JSON.stringify(t.response.data)||""}.`;return new r(n,t.response.status)}const n=`${e}. `+`${t.message}.`;return new r(n,0)}const a=new class{constructor(){const a=n(134);a.defaults.withCredentials=!0,a.defaults.xsrfHeaderName="X-CSRFTOKEN",a.defaults.xsrfCookieName="csrftoken";let c=o.get("token");async function u(t=""){const{backendAPI:e}=i;let n=null;try{n=await a.get(`${e}/tasks?${t}`,{proxy:i.proxy})}catch(t){throw s(t,"Could not get tasks from a server")}return n.data.results.count=n.data.count,n.data.results}async function l(t){const{backendAPI:e}=i;try{await a.delete(`${e}/tasks/${t}`)}catch(t){throw s(t,"Could not delete the task from the server")}}c&&(a.defaults.headers.common.Authorization=`Token ${c}`),Object.defineProperties(this,Object.freeze({server:{value:Object.freeze({about:async function(){const{backendAPI:t}=i;let e=null;try{e=await a.get(`${t}/server/about`,{proxy:i.proxy})}catch(t){throw s(t,'Could not get "about" information from the server')}return e.data},share:async function(t){const{backendAPI:e}=i;t=encodeURIComponent(t);let n=null;try{n=await a.get(`${e}/server/share?directory=${t}`,{proxy:i.proxy})}catch(t){throw s(t,'Could not get "share" information from the server')}return n.data},formats:async function(){const{backendAPI:t}=i;let e=null;try{e=await a.get(`${t}/server/annotation/formats`,{proxy:i.proxy})}catch(t){throw s(t,"Could not get annotation formats from the server")}return e.data},exception:async function(t){const{backendAPI:e}=i;try{await a.post(`${e}/server/exception`,JSON.stringify(t),{proxy:i.proxy,headers:{"Content-Type":"application/json"}})}catch(t){throw s(t,"Could not send an exception to the server")}},login:async function(t,e){const n=[`${encodeURIComponent("username")}=${encodeURIComponent(t)}`,`${encodeURIComponent("password")}=${encodeURIComponent(e)}`].join("&").replace(/%20/g,"+");let r=null;try{r=await a.post(`${i.backendAPI}/auth/login`,n,{proxy:i.proxy})}catch(t){throw s(t,"Could not login on a server")}if(r.headers["set-cookie"]){const t=r.headers["set-cookie"].join(";");a.defaults.headers.common.Cookie=t}c=r.data.key,o.set("token",c),a.defaults.headers.common.Authorization=`Token ${c}`},logout:async function(){try{await a.post(`${i.backendAPI}/auth/logout`,{proxy:i.proxy})}catch(t){throw s(t,"Could not logout from the server")}o.remove("token"),a.defaults.headers.common.Authorization=""},authorized:async function(){try{await t.exports.users.getSelf()}catch(t){if(401===t.code)return!1;throw t}return!0},register:async function(t,e,n,r,o,c){let u=null;try{const l=JSON.stringify({username:t,first_name:e,last_name:n,email:r,password1:o,password2:c});u=await a.post(`${i.backendAPI}/auth/register`,l,{proxy:i.proxy,headers:{"Content-Type":"application/json"}})}catch(e){throw s(e,`Could not register '${t}' user on the server`)}return u.data}}),writable:!1},tasks:{value:Object.freeze({getTasks:u,saveTask:async function(t,e){const{backendAPI:n}=i;try{await a.patch(`${n}/tasks/${t}`,JSON.stringify(e),{proxy:i.proxy,headers:{"Content-Type":"application/json"}})}catch(t){throw s(t,"Could not save the task on the server")}},createTask:async function(t,n,o){const{backendAPI:c}=i,f=new e;for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t))for(let e=0;e<n[t].length;e++)f.append(`${t}[${e}]`,n[t][e]);let p=null;o("The task is being created on the server..");try{p=await a.post(`${c}/tasks`,JSON.stringify(t),{proxy:i.proxy,headers:{"Content-Type":"application/json"}})}catch(t){throw s(t,"Could not put task to the server")}o("The data is being uploaded to the server..");try{await a.post(`${c}/tasks/${p.data.id}/data`,f,{proxy:i.proxy})}catch(t){try{await l(p.data.id)}catch(t){}throw s(t,"Could not put data to the server")}try{await async function(t){return new Promise((e,n)=>{setTimeout(async function i(){try{const u=await a.get(`${c}/tasks/${t}/status`);if(["Queued","Started"].includes(u.data.state))""!==u.data.message&&o(u.data.message),setTimeout(i,1e3);else if("Finished"===u.data.state)e();else if("Failed"===u.data.state){const t="Could not create the task on the server. "+`${u.data.message}.`;n(new r(t,400))}else n(new r(`Unknown task state has been received: ${u.data.state}`,500))}catch(t){n(s(t,"Could not put task to the server"))}},1e3)})}(p.data.id)}catch(t){throw await l(p.data.id),t}return(await u(`?id=${p.id}`))[0]},deleteTask:l}),writable:!1},jobs:{value:Object.freeze({getJob:async function(t){const{backendAPI:e}=i;let n=null;try{n=await a.get(`${e}/jobs/${t}`,{proxy:i.proxy})}catch(t){throw s(t,"Could not get jobs from a server")}return n.data},saveJob:async function(t,e){const{backendAPI:n}=i;try{await a.patch(`${n}/jobs/${t}`,JSON.stringify(e),{proxy:i.proxy,headers:{"Content-Type":"application/json"}})}catch(t){throw s(t,"Could not save the job on the server")}}}),writable:!1},users:{value:Object.freeze({getUsers:async function(){const{backendAPI:t}=i;let e=null;try{e=await a.get(`${t}/users`,{proxy:i.proxy})}catch(t){throw s(t,"Could not get users from the server")}return e.data.results},getSelf:async function(){const{backendAPI:t}=i;let e=null;try{e=await a.get(`${t}/users/self`,{proxy:i.proxy})}catch(t){throw s(t,"Could not get user data from the server")}return e.data}}),writable:!1},frames:{value:Object.freeze({getData:async function(t,e){const{backendAPI:n}=i;let r=null;try{r=await a.get(`${n}/tasks/${t}/frames/${e}`,{proxy:i.proxy,responseType:"blob"})}catch(n){throw s(n,`Could not get frame ${e} for the task ${t} from the server`)}return r.data},getMeta:async function(t){const{backendAPI:e}=i;let n=null;try{n=await a.get(`${e}/tasks/${t}/frames/meta`,{proxy:i.proxy})}catch(e){throw s(e,`Could not get frame meta info for the task ${t} from the server`)}return n.data}}),writable:!1},annotations:{value:Object.freeze({updateAnnotations:async function(t,e,n,r){const{backendAPI:o}=i;let c=null,u=null;"PUT"===r.toUpperCase()?(c=a.put.bind(a),u=`${o}/${t}s/${e}/annotations`):(c=a.patch.bind(a),u=`${o}/${t}s/${e}/annotations?action=${r}`);let l=null;try{l=await c(u,JSON.stringify(n),{proxy:i.proxy,headers:{"Content-Type":"application/json"}})}catch(n){throw s(n,`Could not ${r} annotations for the ${t} ${e} on the server`)}return l.data},getAnnotations:async function(t,e){const{backendAPI:n}=i;let r=null;try{r=await a.get(`${n}/${t}s/${e}/annotations`,{proxy:i.proxy})}catch(n){throw s(n,`Could not get annotations for the ${t} ${e} from the server`)}return r.data},dumpAnnotations:async function(t,e,n){const{backendAPI:r}=i,o=e.replace(/\//g,"_");let c=`${r}/tasks/${t}/annotations/${o}?format=${n}`;return new Promise((e,n)=>{setTimeout(async function r(){try{202===(await a.get(`${c}`,{proxy:i.proxy})).status?setTimeout(r,3e3):e(c=`${c}&action=download`)}catch(e){n(s(e,`Could not dump annotations for the task ${t} from the server`))}})})},uploadAnnotations:async function(t,n,r,o){const{backendAPI:c}=i;let u=new e;return u.append("annotation_file",r),new Promise((r,l)=>{setTimeout(async function f(){try{202===(await a.put(`${c}/${t}s/${n}/annotations?format=${o}`,u,{proxy:i.proxy})).status?(u=new e,setTimeout(f,3e3)):r()}catch(e){l(s(e,`Could not upload annotations for the ${t} ${n}`))}})})}}),writable:!1}}))}};t.exports=a})()},function(t,e,n){(function(e){var n=Object.assign?Object.assign:function(t,e,n,r){for(var o=1;o<arguments.length;o++)a(Object(arguments[o]),function(e,n){t[n]=e});return t},r=function(){if(Object.create)return function(t,e,r,o){var i=s(arguments,1);return n.apply(this,[Object.create(t)].concat(i))};{function t(){}return function(e,r,o,i){var a=s(arguments,1);return t.prototype=e,n.apply(this,[new t].concat(a))}}}(),o=String.prototype.trim?function(t){return String.prototype.trim.call(t)}:function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},i="undefined"!=typeof window?window:e;function s(t,e){return Array.prototype.slice.call(t,e||0)}function a(t,e){c(t,function(t,n){return e(t,n),!1})}function c(t,e){if(u(t)){for(var n=0;n<t.length;n++)if(e(t[n],n))return t[n]}else for(var r in t)if(t.hasOwnProperty(r)&&e(t[r],r))return t[r]}function u(t){return null!=t&&"function"!=typeof t&&"number"==typeof t.length}t.exports={assign:n,create:r,trim:o,bind:function(t,e){return function(){return e.apply(t,Array.prototype.slice.call(arguments,0))}},slice:s,each:a,map:function(t,e){var n=u(t)?[]:{};return c(t,function(t,r){return n[r]=e(t,r),!1}),n},pluck:c,isList:u,isFunction:function(t){return t&&"[object Function]"==={}.toString.call(t)},isObject:function(t){return t&&"[object Object]"==={}.toString.call(t)},Global:i}}).call(this,n(28))},function(t,e){(()=>{const e=Object.freeze({DIR:"DIR",REG:"REG"}),n=Object.freeze({ANNOTATION:"annotation",VALIDATION:"validation",COMPLETED:"completed"}),r=Object.freeze({ANNOTATION:"annotation",INTERPOLATION:"interpolation"}),o=Object.freeze({CHECKBOX:"checkbox",RADIO:"radio",SELECT:"select",NUMBER:"number",TEXT:"text"}),i=Object.freeze({TAG:"tag",SHAPE:"shape",TRACK:"track"}),s=Object.freeze({RECTANGLE:"rectangle",POLYGON:"polygon",POLYLINE:"polyline",POINTS:"points"}),a=Object.freeze({ALL:"all",SHAPE:"shape",NONE:"none"});t.exports={ShareFileType:e,TaskStatus:n,TaskMode:r,AttributeType:o,ObjectType:i,ObjectShape:s,VisibleState:a,LogType:{pasteObject:0,changeAttribute:1,dragObject:2,deleteObject:3,pressShortcut:4,resizeObject:5,sendLogs:6,saveJob:7,jumpFrame:8,drawObject:9,changeLabel:10,sendTaskInfo:11,loadJob:12,moveImage:13,zoomImage:14,lockObject:15,mergeObjects:16,copyObject:17,propagateObject:18,undoAction:19,redoAction:20,sendUserActivity:21,sendException:22,changeFrame:23,debugInfo:24,fitImage:25,rotateImage:26}}})()},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports=!1},function(t,e,n){var r=n(14).f,o=n(7),i=n(1)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e){t.exports={}},function(t,e,n){n(107),n(4),n(9),n(8),(()=>{const{PluginError:e}=n(5),r=[];class o{static async apiWrapper(t,...n){const r=await o.list();for(const o of r){const r=o.functions.filter(e=>e.callback===t)[0];if(r&&r.enter)try{await r.enter.call(this,o,...n)}catch(t){throw t instanceof e?t:new e(`Exception in plugin ${o.name}: ${t.toString()}`)}}let i=await t.implementation.call(this,...n);for(const o of r){const r=o.functions.filter(e=>e.callback===t)[0];if(r&&r.leave)try{i=await r.leave.call(this,o,i,...n)}catch(t){throw t instanceof e?t:new e(`Exception in plugin ${o.name}: ${t.toString()}`)}}return i}static async register(t){const n=[];if("object"!=typeof t)throw new e(`Plugin should be an object, but got "${typeof t}"`);if(!("name"in t)||"string"!=typeof t.name)throw new e('Plugin must contain a "name" field and it must be a string');if(!("description"in t)||"string"!=typeof t.description)throw new e('Plugin must contain a "description" field and it must be a string');if("functions"in t)throw new e('Plugin must not contain a "functions" field');!function t(e,r){const o={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&("object"==typeof e[n]?Object.prototype.hasOwnProperty.call(r,n)&&t(e[n],r[n]):["enter","leave"].includes(n)&&"function"==typeof r&&(e[n],1)&&(o.callback=r,o[n]=e[n]));Object.keys(o).length&&n.push(o)}(t,{cvat:this}),Object.defineProperty(t,"functions",{value:n,writable:!1}),r.push(t)}static async list(){return r}}t.exports=o})()},function(t,e,n){var r=n(21);t.exports=function(t){return Object(r(t))}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(54),o=n(21);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(0),o=n(43),i=n(22),s=r["__core-js_shared__"]||o("__core-js_shared__",{});(t.exports=function(t,e){return s[t]||(s[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.2.1",mode:i?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(59),o=n(0),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][e]||o[t]&&o[t][e]}},function(t,e,n){var r=n(34),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(24);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(100),o=n(25),i=n(1)("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){n(4),n(9),n(152),n(8),n(52),(()=>{const e=n(26),r=n(18),{getFrame:o}=n(155),{ArgumentError:i}=n(5),{TaskStatus:s}=n(20),{Label:a}=n(38);function c(t){Object.defineProperties(t,{annotations:Object.freeze({value:{async upload(n,r){return await e.apiWrapper.call(this,t.annotations.upload,n,r)},async save(){return await e.apiWrapper.call(this,t.annotations.save)},async clear(n=!1){return await e.apiWrapper.call(this,t.annotations.clear,n)},async dump(n,r){return await e.apiWrapper.call(this,t.annotations.dump,n,r)},async statistics(){return await e.apiWrapper.call(this,t.annotations.statistics)},async put(n=[]){return await e.apiWrapper.call(this,t.annotations.put,n)},async get(n,r={}){return await e.apiWrapper.call(this,t.annotations.get,n,r)},async search(n,r,o){return await e.apiWrapper.call(this,t.annotations.search,n,r,o)},async select(n,r,o){return await e.apiWrapper.call(this,t.annotations.select,n,r,o)},async hasUnsavedChanges(){return await e.apiWrapper.call(this,t.annotations.hasUnsavedChanges)},async merge(n){return await e.apiWrapper.call(this,t.annotations.merge,n)},async split(n,r){return await e.apiWrapper.call(this,t.annotations.split,n,r)},async group(n,r=!1){return await e.apiWrapper.call(this,t.annotations.group,n,r)}},writable:!0}),frames:Object.freeze({value:{async get(n){return await e.apiWrapper.call(this,t.frames.get,n)}},writable:!0}),logs:Object.freeze({value:{async put(n,r){return await e.apiWrapper.call(this,t.logs.put,n,r)},async save(n){return await e.apiWrapper.call(this,t.logs.save,n)}},writable:!0}),actions:Object.freeze({value:{async undo(n){return await e.apiWrapper.call(this,t.actions.undo,n)},async redo(n){return await e.apiWrapper.call(this,t.actions.redo,n)},async clear(){return await e.apiWrapper.call(this,t.actions.clear)}},writable:!0}),events:Object.freeze({value:{async subscribe(n,r){return await e.apiWrapper.call(this,t.events.subscribe,n,r)},async unsubscribe(n,r=null){return await e.apiWrapper.call(this,t.events.unsubscribe,n,r)}},writable:!0})})}class u{constructor(){}}class l extends u{constructor(t){super();const e={id:void 0,assignee:void 0,status:void 0,start_frame:void 0,stop_frame:void 0,task:void 0};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&(n in t&&(e[n]=t[n]),void 0===e[n]))throw new i(`Job field "${n}" was not initialized`);Object.defineProperties(this,Object.freeze({id:{get:()=>e.id},assignee:{get:()=>e.assignee,set:()=>t=>{if(!Number.isInteger(t)||t<0)throw new i("Value must be a non negative integer");e.assignee=t}},status:{get:()=>e.status,set:t=>{const n=s;let r=!1;for(const e in n)if(n[e]===t){r=!0;break}if(!r)throw new i("Value must be a value from the enumeration cvat.enums.TaskStatus");e.status=t}},startFrame:{get:()=>e.start_frame},stopFrame:{get:()=>e.stop_frame},task:{get:()=>e.task}})),this.annotations={get:Object.getPrototypeOf(this).annotations.get.bind(this),put:Object.getPrototypeOf(this).annotations.put.bind(this),save:Object.getPrototypeOf(this).annotations.save.bind(this),dump:Object.getPrototypeOf(this).annotations.dump.bind(this),merge:Object.getPrototypeOf(this).annotations.merge.bind(this),split:Object.getPrototypeOf(this).annotations.split.bind(this),group:Object.getPrototypeOf(this).annotations.group.bind(this),clear:Object.getPrototypeOf(this).annotations.clear.bind(this),upload:Object.getPrototypeOf(this).annotations.upload.bind(this),select:Object.getPrototypeOf(this).annotations.select.bind(this),statistics:Object.getPrototypeOf(this).annotations.statistics.bind(this),hasUnsavedChanges:Object.getPrototypeOf(this).annotations.hasUnsavedChanges.bind(this)},this.frames={get:Object.getPrototypeOf(this).frames.get.bind(this)}}async save(){return await e.apiWrapper.call(this,l.prototype.save)}}class f extends u{constructor(t){super();const e={id:void 0,name:void 0,status:void 0,size:void 0,mode:void 0,owner:void 0,assignee:void 0,created_date:void 0,updated_date:void 0,bug_tracker:void 0,overlap:void 0,segment_size:void 0,z_order:void 0,image_quality:void 0,start_frame:void 0,stop_frame:void 0,frame_filter:void 0};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&n in t&&(e[n]=t[n]);if(e.labels=[],e.jobs=[],e.files=Object.freeze({server_files:[],client_files:[],remote_files:[]}),Array.isArray(t.segments))for(const n of t.segments)if(Array.isArray(n.jobs))for(const t of n.jobs){const r=new l({url:t.url,id:t.id,assignee:t.assignee,status:t.status,start_frame:n.start_frame,stop_frame:n.stop_frame,task:this});e.jobs.push(r)}if(Array.isArray(t.labels))for(const n of t.labels){const t=new a(n);e.labels.push(t)}Object.defineProperties(this,Object.freeze({id:{get:()=>e.id},name:{get:()=>e.name,set:t=>{if(!t.trim().length)throw new i("Value must not be empty");e.name=t}},status:{get:()=>e.status},size:{get:()=>e.size},mode:{get:()=>e.mode},owner:{get:()=>e.owner},assignee:{get:()=>e.assignee,set:()=>t=>{if(!Number.isInteger(t)||t<0)throw new i("Value must be a non negative integer");e.assignee=t}},createdDate:{get:()=>e.created_date},updatedDate:{get:()=>e.updated_date},bugTracker:{get:()=>e.bug_tracker,set:t=>{e.bug_tracker=t}},overlap:{get:()=>e.overlap,set:t=>{if(!Number.isInteger(t)||t<0)throw new i("Value must be a non negative integer");e.overlap=t}},segmentSize:{get:()=>e.segment_size,set:t=>{if(!Number.isInteger(t)||t<0)throw new i("Value must be a positive integer");e.segment_size=t}},zOrder:{get:()=>e.z_order,set:t=>{if("boolean"!=typeof t)throw new i("Value must be a boolean");e.z_order=t}},imageQuality:{get:()=>e.image_quality,set:t=>{if(!Number.isInteger(t)||t<0)throw new i("Value must be a positive integer");e.image_quality=t}},labels:{get:()=>[...e.labels],set:t=>{if(!Array.isArray(t))throw new i("Value must be an array of Labels");for(const e of t)if(!(e instanceof a))throw new i("Each array value must be an instance of Label. "+`${typeof e} was found`);void 0===e.id?e.labels=[...t]:e.labels=e.labels.concat([...t])}},jobs:{get:()=>[...e.jobs]},serverFiles:{get:()=>[...e.files.server_files],set:t=>{if(!Array.isArray(t))throw new i(`Value must be an array. But ${typeof t} has been got.`);for(const e of t)if("string"!=typeof e)throw new i(`Array values must be a string. But ${typeof e} has been got.`);Array.prototype.push.apply(e.files.server_files,t)}},clientFiles:{get:()=>[...e.files.client_files],set:t=>{if(!Array.isArray(t))throw new i(`Value must be an array. But ${typeof t} has been got.`);for(const e of t)if(!(e instanceof File))throw new i(`Array values must be a File. But ${e.constructor.name} has been got.`);Array.prototype.push.apply(e.files.client_files,t)}},remoteFiles:{get:()=>[...e.files.remote_files],set:t=>{if(!Array.isArray(t))throw new i(`Value must be an array. But ${typeof t} has been got.`);for(const e of t)if("string"!=typeof e)throw new i(`Array values must be a string. But ${typeof e} has been got.`);Array.prototype.push.apply(e.files.remote_files,t)}},startFrame:{get:()=>e.start_frame,set:t=>{if(!Number.isInteger(t)||t<0)throw new i("Value must be a not negative integer");e.start_frame=t}},stopFrame:{get:()=>e.stop_frame,set:t=>{if(!Number.isInteger(t)||t<0)throw new i("Value must be a not negative integer");e.stop_frame=t}},frameFilter:{get:()=>e.frame_filter,set:t=>{if("string"!=typeof t)throw new i(`Filter value must be a string. But ${typeof t} has been got.`);e.frame_filter=t}}})),this.annotations={get:Object.getPrototypeOf(this).annotations.get.bind(this),put:Object.getPrototypeOf(this).annotations.put.bind(this),save:Object.getPrototypeOf(this).annotations.save.bind(this),dump:Object.getPrototypeOf(this).annotations.dump.bind(this),merge:Object.getPrototypeOf(this).annotations.merge.bind(this),split:Object.getPrototypeOf(this).annotations.split.bind(this),group:Object.getPrototypeOf(this).annotations.group.bind(this),clear:Object.getPrototypeOf(this).annotations.clear.bind(this),upload:Object.getPrototypeOf(this).annotations.upload.bind(this),select:Object.getPrototypeOf(this).annotations.select.bind(this),statistics:Object.getPrototypeOf(this).annotations.statistics.bind(this),hasUnsavedChanges:Object.getPrototypeOf(this).annotations.hasUnsavedChanges.bind(this)},this.frames={get:Object.getPrototypeOf(this).frames.get.bind(this)}}async save(t=(()=>{})){return await e.apiWrapper.call(this,f.prototype.save,t)}async delete(){return await e.apiWrapper.call(this,f.prototype.delete)}}t.exports={Job:l,Task:f};const{getAnnotations:p,putAnnotations:h,saveAnnotations:d,hasUnsavedChanges:b,mergeAnnotations:g,splitAnnotations:m,groupAnnotations:y,clearAnnotations:v,selectObject:w,annotationsStatistics:O,uploadAnnotations:x,dumpAnnotations:j}=n(157);c(l.prototype),c(f.prototype),l.prototype.save.implementation=async function(){if(this.id){const t={status:this.status};return await r.jobs.saveJob(this.id,t),this}throw new i("Can not save job without and id")},l.prototype.frames.get.implementation=async function(t){if(!Number.isInteger(t)||t<0)throw new i(`Frame must be a positive integer. Got: "${t}"`);if(t<this.startFrame||t>this.stopFrame)throw new i(`The frame with number ${t} is out of the job`);return await o(this.task.id,this.task.mode,t)},l.prototype.annotations.get.implementation=async function(t,e){if(t<this.startFrame||t>this.stopFrame)throw new i(`Frame ${t} does not exist in the job`);return await p(this,t,e)},l.prototype.annotations.save.implementation=async function(t){return await d(this,t)},l.prototype.annotations.merge.implementation=async function(t){return await g(this,t)},l.prototype.annotations.split.implementation=async function(t,e){return await m(this,t,e)},l.prototype.annotations.group.implementation=async function(t,e){return await y(this,t,e)},l.prototype.annotations.hasUnsavedChanges.implementation=function(){return b(this)},l.prototype.annotations.clear.implementation=async function(t){return await v(this,t)},l.prototype.annotations.select.implementation=function(t,e,n){return w(this,t,e,n)},l.prototype.annotations.statistics.implementation=function(){return O(this)},l.prototype.annotations.put.implementation=function(t){return h(this,t)},l.prototype.annotations.upload.implementation=async function(t,e){return await x(this,t,e)},l.prototype.annotations.dump.implementation=async function(t,e){return await j(this,t,e)},f.prototype.save.implementation=async function(t){if(void 0!==this.id){const t={name:this.name,bug_tracker:this.bugTracker,z_order:this.zOrder,labels:[...this.labels.map(t=>t.toJSON())]};return await r.tasks.saveTask(this.id,t),this}const e={name:this.name,labels:this.labels.map(t=>t.toJSON()),image_quality:this.imageQuality,z_order:Boolean(this.zOrder)};void 0!==this.bugTracker&&(e.bug_tracker=this.bugTracker),void 0!==this.segmentSize&&(e.segment_size=this.segmentSize),void 0!==this.overlap&&(e.overlap=this.overlap),void 0!==this.startFrame&&(e.start_frame=this.startFrame),void 0!==this.stopFrame&&(e.stop_frame=this.stopFrame),void 0!==this.frameFilter&&(e.frame_filter=this.frameFilter);const n={client_files:this.clientFiles,server_files:this.serverFiles,remote_files:this.remoteFiles},o=await r.tasks.createTask(e,n,t);return new f(o)},f.prototype.delete.implementation=async function(){return await r.tasks.deleteTask(this.id)},f.prototype.frames.get.implementation=async function(t){if(!Number.isInteger(t)||t<0)throw new i(`Frame must be a positive integer. Got: "${t}"`);if(t>=this.size)throw new i(`The frame with number ${t} is out of the task`);return await o(this.id,this.mode,t)},f.prototype.annotations.get.implementation=async function(t,e){if(!Number.isInteger(t)||t<0)throw new i(`Frame must be a positive integer. Got: "${t}"`);if(t>=this.size)throw new i(`Frame ${t} does not exist in the task`);return await p(this,t,e)},f.prototype.annotations.save.implementation=async function(t){return await d(this,t)},f.prototype.annotations.merge.implementation=async function(t){return await g(this,t)},f.prototype.annotations.split.implementation=async function(t,e){return await m(this,t,e)},f.prototype.annotations.group.implementation=async function(t,e){return await y(this,t,e)},f.prototype.annotations.hasUnsavedChanges.implementation=function(){return b(this)},f.prototype.annotations.clear.implementation=async function(t){return await v(this,t)},f.prototype.annotations.select.implementation=function(t,e,n){return w(this,t,e,n)},f.prototype.annotations.statistics.implementation=function(){return O(this)},f.prototype.annotations.put.implementation=function(t){return h(this,t)},f.prototype.annotations.upload.implementation=async function(t,e){return await x(this,t,e)},f.prototype.annotations.dump.implementation=async function(t,e){return await j(this,t,e)}})()},function(t,e,n){n(4),n(8),n(52),(()=>{const{AttributeType:e}=n(20),{ArgumentError:r}=n(5);class o{constructor(t){const n={id:void 0,default_value:void 0,input_type:void 0,mutable:void 0,name:void 0,values:void 0};for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&Object.prototype.hasOwnProperty.call(t,e)&&(Array.isArray(t[e])?n[e]=[...t[e]]:n[e]=t[e]);if(!Object.values(e).includes(n.input_type))throw new r(`Got invalid attribute type ${n.input_type}`);Object.defineProperties(this,Object.freeze({id:{get:()=>n.id},defaultValue:{get:()=>n.default_value},inputType:{get:()=>n.input_type},mutable:{get:()=>n.mutable},name:{get:()=>n.name},values:{get:()=>[...n.values]}}))}toJSON(){const t={name:this.name,mutable:this.mutable,input_type:this.inputType,default_value:this.defaultValue,values:this.values};return void 0!==this.id&&(t.id=this.id),t}}t.exports={Attribute:o,Label:class{constructor(t){const e={id:void 0,name:void 0};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);if(e.attributes=[],Object.prototype.hasOwnProperty.call(t,"attributes")&&Array.isArray(t.attributes))for(const n of t.attributes)e.attributes.push(new o(n));Object.defineProperties(this,Object.freeze({id:{get:()=>e.id},name:{get:()=>e.name},attributes:{get:()=>[...e.attributes]}}))}toJSON(){const t={name:this.name,attributes:[...this.attributes.map(t=>t.toJSON())]};return void 0!==this.id&&(t.id=this.id),t}}}})()},function(t,e,n){(()=>{const{ArgumentError:e}=n(5);t.exports={isBoolean:function(t){return"boolean"==typeof t},isInteger:function(t){return"number"==typeof t&&Number.isInteger(t)},isEnum:function(t){for(const e in this)if(Object.prototype.hasOwnProperty.call(this,e)&&this[e]===t)return!0;return!1},isString:function(t){return"string"==typeof t},checkFilter:function(t,n){for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(!(r in n))throw new e(`Unsupported filter property has been recieved: "${r}"`);if(!n[r](t[r]))throw new e(`Received filter property "${r}" is not satisfied for checker`)}},checkObjectType:function(t,n,r,o){if(r){if(typeof n!==r){if("integer"===r&&Number.isInteger(n))return;throw new e(`"${t}" is expected to be "${r}", but "${typeof n}" has been got.`)}}else if(o&&!(n instanceof o)){if(void 0!==n)throw new e(`"${t}" is expected to be ${o.name}, but `+`"${n.constructor.name}" has been got`);throw new e(`"${t}" is expected to be ${o.name}, but "undefined" has been got.`)}}}})()},function(t,e,n){var r=n(10),o=n(53),i=n(29),s=n(30),a=n(41),c=n(7),u=n(55),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=s(t),e=a(e,!0),u)try{return l(t,e)}catch(t){}if(c(t,e))return i(!o.f.call(t,e),t[e])}},function(t,e,n){var r=n(11);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(0),o=n(11),i=r.document,s=o(i)&&o(i.createElement);t.exports=function(t){return s?i.createElement(t):{}}},function(t,e,n){var r=n(0),o=n(12);t.exports=function(t,e){try{o(r,t,e)}catch(n){r[t]=e}return e}},function(t,e,n){var r=n(31),o=n(57),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e){t.exports={}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},function(t,e){t.exports={backendAPI:"http://localhost:7000/api/v1",proxy:!1,taskID:void 0,jobID:void 0,clientID:+Date.now().toString().substr(-6)}},function(t,e,n){var r=n(34),o=n(21),i=function(t){return function(e,n){var i,s,a=String(o(e)),c=r(n),u=a.length;return c<0||c>=u?t?"":void 0:(i=a.charCodeAt(c))<55296||i>56319||c+1===u||(s=a.charCodeAt(c+1))<56320||s>57343?t?a.charAt(c):i:t?a.slice(c,c+2):s-56320+(i-55296<<10)+65536}};t.exports={codeAt:i(!1),charAt:i(!0)}},function(t,e,n){"use strict";(function(e){var r=n(6),o=n(138),i={"Content-Type":"application/x-www-form-urlencoded"};function s(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var a,c={adapter:("undefined"!=typeof XMLHttpRequest?a=n(80):void 0!==e&&(a=n(80)),a),transformRequest:[function(t,e){return o(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(s(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(s(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(t){c.headers[t]={}}),r.forEach(["post","put","patch"],function(t){c.headers[t]=r.merge(i)}),t.exports=c}).call(this,n(79))},function(t,e,n){n(4),n(9),n(8),(()=>{const e=n(26),{ArgumentError:r}=n(5);class o{constructor(t){const e={label:null,attributes:{},points:null,outside:null,occluded:null,keyframe:null,group:null,zOrder:null,lock:null,color:null,visibility:null,clientID:t.clientID,serverID:t.serverID,frame:t.frame,objectType:t.objectType,shapeType:t.shapeType,updateFlags:{}};Object.defineProperty(e.updateFlags,"reset",{value:function(){this.label=!1,this.attributes=!1,this.points=!1,this.outside=!1,this.occluded=!1,this.keyframe=!1,this.group=!1,this.zOrder=!1,this.lock=!1,this.color=!1,this.visibility=!1},writable:!1}),Object.defineProperties(this,Object.freeze({updateFlags:{get:()=>e.updateFlags},frame:{get:()=>e.frame},objectType:{get:()=>e.objectType},shapeType:{get:()=>e.shapeType},clientID:{get:()=>e.clientID},serverID:{get:()=>e.serverID},label:{get:()=>e.label,set:t=>{e.updateFlags.label=!0,e.label=t}},color:{get:()=>e.color,set:t=>{e.updateFlags.color=!0,e.color=t}},visibility:{get:()=>e.visibility,set:t=>{e.updateFlags.visibility=!0,e.visibility=t}},points:{get:()=>e.points,set:t=>{if(!Array.isArray(t))throw new r("Points are expected to be an array "+`but got ${"object"==typeof t?t.constructor.name:typeof t}`);e.updateFlags.points=!0,e.points=[...t]}},group:{get:()=>e.group,set:t=>{e.updateFlags.group=!0,e.group=t}},zOrder:{get:()=>e.zOrder,set:t=>{e.updateFlags.zOrder=!0,e.zOrder=t}},outside:{get:()=>e.outside,set:t=>{e.updateFlags.outside=!0,e.outside=t}},keyframe:{get:()=>e.keyframe,set:t=>{e.updateFlags.keyframe=!0,e.keyframe=t}},occluded:{get:()=>e.occluded,set:t=>{e.updateFlags.occluded=!0,e.occluded=t}},lock:{get:()=>e.lock,set:t=>{e.updateFlags.lock=!0,e.lock=t}},attributes:{get:()=>e.attributes,set:t=>{if("object"!=typeof t)throw new r("Attributes are expected to be an object "+`but got ${"object"==typeof t?t.constructor.name:typeof t}`);for(const n of Object.keys(t))e.updateFlags.attributes=!0,e.attributes[n]=t[n]}}})),this.label=t.label,this.group=t.group,this.zOrder=t.zOrder,this.outside=t.outside,this.keyframe=t.keyframe,this.occluded=t.occluded,this.color=t.color,this.lock=t.lock,this.visibility=t.visibility,void 0!==t.points&&(this.points=t.points),void 0!==t.attributes&&(this.attributes=t.attributes),e.updateFlags.reset()}async save(){return await e.apiWrapper.call(this,o.prototype.save)}async delete(t=!1){return await e.apiWrapper.call(this,o.prototype.delete,t)}async up(){return await e.apiWrapper.call(this,o.prototype.up)}async down(){return await e.apiWrapper.call(this,o.prototype.down)}}o.prototype.save.implementation=async function(){return this.hidden&&this.hidden.save?this.hidden.save():this},o.prototype.delete.implementation=async function(t){return!(!this.hidden||!this.hidden.delete)&&this.hidden.delete(t)},o.prototype.up.implementation=async function(){return!(!this.hidden||!this.hidden.up)&&this.hidden.up()},o.prototype.down.implementation=async function(){return!(!this.hidden||!this.hidden.down)&&this.hidden.down()},t.exports=o})()},function(t,e,n){"use strict";n(13)({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},function(t,e,n){var r=n(2),o=n(16),i="".split;t.exports=r(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},function(t,e,n){var r=n(10),o=n(2),i=n(42);t.exports=!r&&!o(function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(31);t.exports=r("native-function-to-string",Function.toString)},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},function(t,e,n){var r=n(7),o=n(92),i=n(40),s=n(14);t.exports=function(t,e){for(var n=o(e),a=s.f,c=i.f,u=0;u<n.length;u++){var l=n[u];r(t,l)||a(t,l,c(e,l))}}},function(t,e,n){t.exports=n(0)},function(t,e,n){var r=n(7),o=n(30),i=n(94).indexOf,s=n(45);t.exports=function(t,e){var n,a=o(t),c=0,u=[];for(n in a)!r(s,n)&&r(a,n)&&u.push(n);for(;e.length>c;)r(a,n=e[c++])&&(~i(u,n)||u.push(n));return u}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(2),o=/#|\.prototype\./,i=function(t,e){var n=a[s(t)];return n==u||n!=c&&("function"==typeof e?r(e):!!e)},s=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},a=i.data={},c=i.NATIVE="N",u=i.POLYFILL="P";t.exports=i},function(t,e,n){var r=n(15);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},function(t,e,n){var r=n(1),o=n(25),i=r("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||s[i]===t)}},function(t,e,n){var r=n(3);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){var r,o,i,s=n(0),a=n(2),c=n(16),u=n(35),l=n(67),f=n(42),p=s.location,h=s.setImmediate,d=s.clearImmediate,b=s.process,g=s.MessageChannel,m=s.Dispatch,y=0,v={},w=function(t){if(v.hasOwnProperty(t)){var e=v[t];delete v[t],e()}},O=function(t){return function(){w(t)}},x=function(t){w(t.data)},j=function(t){s.postMessage(t+"",p.protocol+"//"+p.host)};h&&d||(h=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return v[++y]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},r(y),y},d=function(t){delete v[t]},"process"==c(b)?r=function(t){b.nextTick(O(t))}:m&&m.now?r=function(t){m.now(O(t))}:g?(i=(o=new g).port2,o.port1.onmessage=x,r=u(i.postMessage,i,1)):!s.addEventListener||"function"!=typeof postMessage||s.importScripts||a(j)?r="onreadystatechange"in f("script")?function(t){l.appendChild(f("script")).onreadystatechange=function(){l.removeChild(this),w(t)}}:function(t){setTimeout(O(t),0)}:(r=j,s.addEventListener("message",x,!1))),t.exports={set:h,clear:d}},function(t,e,n){var r=n(32);t.exports=r("document","documentElement")},function(t,e,n){var r=n(32);t.exports=r("navigator","userAgent")||""},function(t,e,n){"use strict";var r=n(24),o=function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},function(t,e,n){var r=n(3),o=n(71),i=n(46),s=n(45),a=n(67),c=n(42),u=n(44)("IE_PROTO"),l=function(){},f=function(){var t,e=c("iframe"),n=i.length;for(e.style.display="none",a.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),f=t.F;n--;)delete f.prototype[i[n]];return f()};t.exports=Object.create||function(t,e){var n;return null!==t?(l.prototype=r(t),n=new l,l.prototype=null,n[u]=t):n=f(),void 0===e?n:o(n,e)},s[u]=!0},function(t,e,n){var r=n(10),o=n(14),i=n(3),s=n(72);t.exports=r?Object.defineProperties:function(t,e){i(t);for(var n,r=s(e),a=r.length,c=0;a>c;)o.f(t,n=r[c++],e[n]);return t}},function(t,e,n){var r=n(60),o=n(46);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){"use strict";var r=n(13),o=n(74),i=n(76),s=n(110),a=n(23),c=n(12),u=n(15),l=n(1),f=n(22),p=n(25),h=n(75),d=h.IteratorPrototype,b=h.BUGGY_SAFARI_ITERATORS,g=l("iterator"),m=function(){return this};t.exports=function(t,e,n,l,h,y,v){o(n,e,l);var w,O,x,j=function(t){if(t===h&&T)return T;if(!b&&t in A)return A[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},k=e+" Iterator",S=!1,A=t.prototype,E=A[g]||A["@@iterator"]||h&&A[h],T=!b&&E||j(h),P="Array"==e&&A.entries||E;if(P&&(w=i(P.call(new t)),d!==Object.prototype&&w.next&&(f||i(w)===d||(s?s(w,d):"function"!=typeof w[g]&&c(w,g,m)),a(w,k,!0,!0),f&&(p[k]=m))),"values"==h&&E&&"values"!==E.name&&(S=!0,T=function(){return E.call(this)}),f&&!v||A[g]===T||c(A,g,T),p[e]=T,h)if(O={values:j("values"),keys:y?T:j("keys"),entries:j("entries")},v)for(x in O)!b&&!S&&x in A||u(A,x,O[x]);else r({target:e,proto:!0,forced:b||S},O);return O}},function(t,e,n){"use strict";var r=n(75).IteratorPrototype,o=n(70),i=n(29),s=n(23),a=n(25),c=function(){return this};t.exports=function(t,e,n){var u=e+" Iterator";return t.prototype=o(r,{next:i(1,n)}),s(t,u,!1,!0),a[u]=c,t}},function(t,e,n){"use strict";var r,o,i,s=n(76),a=n(12),c=n(7),u=n(1),l=n(22),f=u("iterator"),p=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(r=o):p=!0),null==r&&(r={}),l||c(r,f)||a(r,f,function(){return this}),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},function(t,e,n){var r=n(7),o=n(27),i=n(44),s=n(109),a=i("IE_PROTO"),c=Object.prototype;t.exports=s?Object.getPrototypeOf:function(t){return t=o(t),r(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},function(t,e,n){"use strict";var r,o,i=n(119),s=RegExp.prototype.exec,a=String.prototype.replace,c=s,u=(r=/a/,o=/b*/g,s.call(r,"a"),s.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),l=void 0!==/()??/.exec("")[1];(u||l)&&(c=function(t){var e,n,r,o,c=this;return l&&(n=new RegExp("^"+c.source+"$(?!\\s)",i.call(c))),u&&(e=c.lastIndex),r=s.call(c,t),u&&r&&(c.lastIndex=c.global?r.index+r[0].length:e),l&&r&&r.length>1&&a.call(r[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)}),r}),t.exports=c},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var c,u=[],l=!1,f=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&h())}function h(){if(!l){var t=a(p);l=!0;for(var e=u.length;e;){for(c=u,u=[];++f<e;)c&&c[f].run();f=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function b(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||l||a(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=b,o.addListener=b,o.once=b,o.off=b,o.removeListener=b,o.removeAllListeners=b,o.emit=b,o.prependListener=b,o.prependOnceListener=b,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";var r=n(6),o=n(139),i=n(141),s=n(142),a=n(143),c=n(81);t.exports=function(t){return new Promise(function(e,u){var l=t.data,f=t.headers;r.isFormData(l)&&delete f["Content-Type"];var p=new XMLHttpRequest;if(t.auth){var h=t.auth.username||"",d=t.auth.password||"";f.Authorization="Basic "+btoa(h+":"+d)}if(p.open(t.method.toUpperCase(),i(t.url,t.params,t.paramsSerializer),!0),p.timeout=t.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in p?s(p.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:n,config:t,request:p};o(e,u,r),p=null}},p.onerror=function(){u(c("Network Error",t,null,p)),p=null},p.ontimeout=function(){u(c("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var b=n(144),g=(t.withCredentials||a(t.url))&&t.xsrfCookieName?b.read(t.xsrfCookieName):void 0;g&&(f[t.xsrfHeaderName]=g)}if("setRequestHeader"in p&&r.forEach(f,function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete f[e]:p.setRequestHeader(e,t)}),t.withCredentials&&(p.withCredentials=!0),t.responseType)try{p.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&p.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){p&&(p.abort(),u(t),p=null)}),void 0===l&&(l=null),p.send(l)})}},function(t,e,n){"use strict";var r=n(140);t.exports=function(t,e,n,o,i){var s=new Error(t);return r(s,e,n,o,i)}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e){t.exports=class{constructor(t){const e={id:null,username:null,email:null,first_name:null,last_name:null,groups:null,last_login:null,date_joined:null,is_staff:null,is_superuser:null,is_active:null};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&n in t&&(e[n]=t[n]);Object.defineProperties(this,Object.freeze({id:{get:()=>e.id},username:{get:()=>e.username},email:{get:()=>e.email},firstName:{get:()=>e.first_name},lastName:{get:()=>e.last_name},groups:{get:()=>JSON.parse(JSON.stringify(e.groups))},lastLogin:{get:()=>e.last_login},dateJoined:{get:()=>e.date_joined},isStaff:{get:()=>e.is_staff},isSuperuser:{get:()=>e.is_superuser},isActive:{get:()=>e.is_active}}))}}},function(t,e){t.exports=class{constructor(t,e){Object.defineProperties(this,Object.freeze({label:{get:()=>JSON.parse(JSON.stringify(t))},total:{get:()=>JSON.parse(JSON.stringify(e))}}))}}},function(t,e){t.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},function(t,e,n){"use strict";var r=n(13),o=n(24),i=n(27),s=n(2),a=n(159),c=[].sort,u=[1,2,3],l=s(function(){u.sort(void 0)}),f=s(function(){u.sort(null)}),p=a("sort");r({target:"Array",proto:!0,forced:l||!f||p},{sort:function(t){return void 0===t?c.call(i(this)):c.call(i(this),o(t))}})},function(t,e,n){n(4),n(8),(()=>{class e{constructor(t){const e=t.display_name,n=t.format,r=t.handler,o=t.version;Object.defineProperties(this,{name:{get:()=>e},format:{get:()=>n},handler:{get:()=>r},version:{get:()=>o}})}}class n{constructor(t){const e=t.display_name,n=t.format,r=t.handler,o=t.version;Object.defineProperties(this,{name:{get:()=>e},format:{get:()=>n},handler:{get:()=>r},version:{get:()=>o}})}}t.exports={AnnotationFormat:class{constructor(t){const r={created_date:t.created_date,updated_date:t.updated_date,id:t.id,owner:t.owner,name:t.name,handler_file:t.handler_file};r.dumpers=t.dumpers.map(t=>new n(t)),r.loaders=t.loaders.map(t=>new e(t)),Object.defineProperties(this,{id:{get:()=>r.id},owner:{get:()=>r.owner},name:{get:()=>r.name},createdDate:{get:()=>r.created_date},updatedDate:{get:()=>r.updated_date},handlerFile:{get:()=>r.handler_file},loaders:{get:()=>[...r.loaders]},dumpers:{get:()=>[...r.dumpers]}})}},Loader:e,Dumper:n}})()},function(t,e,n){var r=n(2),o=n(1),i=n(22),s=o("iterator");t.exports=!r(function(){var t=new URL("b?e=1","http://a"),e=t.searchParams;return t.pathname="c%20d",i&&!t.toJSON||!e.sort||"http://a/c%20d?e=1"!==t.href||"1"!==e.get("e")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash})},function(t,e,n){n(9),t.exports=function(){const t=n(26),e=n(84),r=n(51),o=n(85),{Job:i,Task:s}=n(37),{Attribute:a,Label:c}=n(38),{ShareFileType:u,TaskStatus:l,TaskMode:f,AttributeType:p,ObjectType:h,ObjectShape:d,VisibleState:b,LogType:g}=n(20),{Exception:m,ArgumentError:y,DataError:v,ScriptingError:w,PluginError:O,ServerError:x}=n(5),j=n(162),k=n(48),S={server:{about:async()=>await t.apiWrapper(S.server.about),share:async(e="/")=>await t.apiWrapper(S.server.share,e),formats:async()=>await t.apiWrapper(S.server.formats),register:async(e,n,r,o,i,s)=>await t.apiWrapper(S.server.register,e,n,r,o,i,s),login:async(e,n)=>await t.apiWrapper(S.server.login,e,n),logout:async()=>await t.apiWrapper(S.server.logout),authorized:async()=>await t.apiWrapper(S.server.authorized)},tasks:{get:async(e={})=>await t.apiWrapper(S.tasks.get,e)},jobs:{get:async(e={})=>await t.apiWrapper(S.jobs.get,e)},users:{get:async(e={})=>await t.apiWrapper(S.users.get,e)},plugins:{list:async()=>await t.apiWrapper(S.plugins.list),register:async e=>await t.apiWrapper(S.plugins.register,e)},config:{get backendAPI(){return k.backendAPI},set backendAPI(t){k.backendAPI=t},get proxy(){return k.proxy},set proxy(t){k.proxy=t},get taskID(){return k.taskID},set taskID(t){k.taskID=t},get jobID(){return k.jobID},set jobID(t){k.jobID=t},get clientID(){return k.clientID}},client:{version:`${j.version}`},enums:{ShareFileType:u,TaskStatus:l,TaskMode:f,AttributeType:p,ObjectType:h,ObjectShape:d,VisibleState:b,LogType:g},exceptions:{Exception:m,ArgumentError:y,DataError:v,ScriptingError:w,PluginError:O,ServerError:x},classes:{Task:s,User:e,Job:i,Attribute:a,Label:c,Statistics:o,ObjectState:r}};S.server=Object.freeze(S.server),S.tasks=Object.freeze(S.tasks),S.jobs=Object.freeze(S.jobs),S.users=Object.freeze(S.users),S.plugins=Object.freeze(S.plugins),S.client=Object.freeze(S.client),S.enums=Object.freeze(S.enums);const A=n(163);return Math.clamp=function(t,e,n){return Math.min(Math.max(t,e),n)},Object.freeze(A(S))}()},function(t,e,n){var r=n(0),o=n(56),i=r.WeakMap;t.exports="function"==typeof i&&/native code/.test(o.call(i))},function(t,e,n){var r=n(32),o=n(93),i=n(61),s=n(3);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(s(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(60),o=n(46).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(30),o=n(33),i=n(95),s=function(t){return function(e,n,s){var a,c=r(e),u=o(c.length),l=i(s,u);if(t&&n!=n){for(;u>l;)if((a=c[l++])!=a)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},function(t,e,n){var r=n(34),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},function(t,e,n){var r=n(0);t.exports=r.Promise},function(t,e,n){var r=n(2);t.exports=!!Object.getOwnPropertySymbols&&!r(function(){return!String(Symbol())})},function(t,e,n){"use strict";var r=n(32),o=n(14),i=n(1),s=n(10),a=i("species");t.exports=function(t){var e=r(t),n=o.f;s&&e&&!e[a]&&n(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(3),o=n(64),i=n(33),s=n(35),a=n(36),c=n(65),u=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,n,l,f){var p,h,d,b,g,m,y=s(e,n,l?2:1);if(f)p=t;else{if("function"!=typeof(h=a(t)))throw TypeError("Target is not iterable");if(o(h)){for(d=0,b=i(t.length);b>d;d++)if((g=l?y(r(m=t[d])[0],m[1]):y(t[d]))&&g instanceof u)return g;return new u(!1)}p=h.call(t)}for(;!(m=p.next()).done;)if((g=c(p,y,m.value,l))&&g instanceof u)return g;return new u(!1)}).stop=function(t){return new u(!0,t)}},function(t,e,n){var r=n(16),o=n(1)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){var r=n(1)("iterator"),o=!1;try{var i=0,s={next:function(){return{done:!!i++}},return:function(){o=!0}};s[r]=function(){return this},Array.from(s,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n}},function(t,e,n){var r=n(3),o=n(24),i=n(1)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||null==(n=r(s)[i])?e:o(n)}},function(t,e,n){var r,o,i,s,a,c,u,l,f=n(0),p=n(40).f,h=n(16),d=n(66).set,b=n(68),g=f.MutationObserver||f.WebKitMutationObserver,m=f.process,y=f.Promise,v="process"==h(m),w=p(f,"queueMicrotask"),O=w&&w.value;O||(r=function(){var t,e;for(v&&(t=m.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?s():i=void 0,t}}i=void 0,t&&t.enter()},v?s=function(){m.nextTick(r)}:g&&!/(iphone|ipod|ipad).*applewebkit/i.test(b)?(a=!0,c=document.createTextNode(""),new g(r).observe(c,{characterData:!0}),s=function(){c.data=a=!a}):y&&y.resolve?(u=y.resolve(void 0),l=u.then,s=function(){l.call(u,r)}):s=function(){d.call(f,r)}),t.exports=O||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,s()),i=e}},function(t,e,n){var r=n(3),o=n(11),i=n(69);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){var r=n(0);t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e,n){"use strict";var r=n(13),o=n(10),i=n(0),s=n(7),a=n(11),c=n(14).f,u=n(58),l=i.Symbol;if(o&&"function"==typeof l&&(!("description"in l.prototype)||void 0!==l().description)){var f={},p=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof p?new l(t):void 0===t?l():l(t);return""===t&&(f[e]=!0),e};u(p,l);var h=p.prototype=l.prototype;h.constructor=p;var d=h.toString,b="Symbol(test)"==String(l("test")),g=/^Symbol\((.*)\)[^)]+$/;c(h,"description",{configurable:!0,get:function(){var t=a(this)?this.valueOf():this,e=d.call(t);if(s(f,t))return"";var n=b?e.slice(7,-1):e.replace(g,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:p})}},function(t,e,n){var r=n(1),o=n(70),i=n(12),s=r("unscopables"),a=Array.prototype;null==a[s]&&i(a,s,o(null)),t.exports=function(t){a[s][t]=!0}},function(t,e,n){var r=n(2);t.exports=!r(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},function(t,e,n){var r=n(3),o=n(111);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,i){return r(n),o(i),e?t.call(n,i):n.__proto__=i,n}}():void 0)},function(t,e,n){var r=n(11);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,n){(function(t,r){var o;
/*!
* Platform.js <https://mths.be/platform>
* Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/>
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
* Available under MIT license <https://mths.be/mit>
*/(function(){"use strict";var i={function:!0,object:!0},s=i[typeof window]&&window||this,a=i[typeof e]&&e,c=i[typeof t]&&t&&!t.nodeType&&t,u=a&&c&&"object"==typeof r&&r;!u||u.global!==u&&u.window!==u&&u.self!==u||(s=u);var l=Math.pow(2,53)-1,f=/\bOpera/,p=Object.prototype,h=p.hasOwnProperty,d=p.toString;function b(t){return(t=String(t)).charAt(0).toUpperCase()+t.slice(1)}function g(t){return t=O(t),/^(?:webOS|i(?:OS|P))/.test(t)?t:b(t)}function m(t,e){for(var n in t)h.call(t,n)&&e(t[n],n,t)}function y(t){return null==t?b(t):d.call(t).slice(8,-1)}function v(t){return String(t).replace(/([ -])(?!$)/g,"$1?")}function w(t,e){var n=null;return function(t,e){var n=-1,r=t?t.length:0;if("number"==typeof r&&r>-1&&r<=l)for(;++n<r;)e(t[n],n,t);else m(t,e)}(t,function(r,o){n=e(n,r,o,t)}),n}function O(t){return String(t).replace(/^ +| +$/g,"")}var x=function t(e){var n=s,r=e&&"object"==typeof e&&"String"!=y(e);r&&(n=e,e=null);var o=n.navigator||{},i=o.userAgent||"";e||(e=i);var a,c,u,l,p,h=r?!!o.likeChrome:/\bChrome\b/.test(e)&&!/internal|\n/i.test(d.toString()),b=r?"Object":"ScriptBridgingProxyObject",x=r?"Object":"Environment",j=r&&n.java?"JavaPackage":y(n.java),k=r?"Object":"RuntimeObject",S=/\bJava/.test(j)&&n.java,A=S&&y(n.environment)==x,E=S?"a":"α",T=S?"b":"β",P=n.document||{},_=n.operamini||n.opera,I=f.test(I=r&&_?_["[[Class]]"]:y(_))?I:_=null,F=e,C=[],N=null,$=e==i,M=$&&_&&"function"==typeof _.version&&_.version(),R=w([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],function(t,n){return t||RegExp("\\b"+(n.pattern||v(n))+"\\b","i").exec(e)&&(n.label||n)}),D=function(t){return w(t,function(t,n){return t||RegExp("\\b"+(n.pattern||v(n))+"\\b","i").exec(e)&&(n.label||n)})}(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),L=U([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),z=function(t){return w(t,function(t,n,r){return t||(n[L]||n[/^[a-z]+(?: +[a-z]+\b)*/i.exec(L)]||RegExp("\\b"+v(r)+"(?:\\b|\\w*\\d)","i").exec(e))&&r})}({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),B=function(t){return w(t,function(t,n){var r=n.pattern||v(n);return!t&&(t=RegExp("\\b"+r+"(?:/[\\d.]+|[ \\w.]*)","i").exec(e))&&(t=function(t,e,n){var r={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return e&&n&&/^Win/i.test(t)&&!/^Windows Phone /i.test(t)&&(r=r[/[\d.]+$/.exec(t)])&&(t="Windows "+r),t=String(t),e&&n&&(t=t.replace(RegExp(e,"i"),n)),t=g(t.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}(t,r,n.label||n)),t})}(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function U(t){return w(t,function(t,n){var r=n.pattern||v(n);return!t&&(t=RegExp("\\b"+r+" *\\d+[.\\w_]*","i").exec(e)||RegExp("\\b"+r+" *\\w+-[\\w]*","i").exec(e)||RegExp("\\b"+r+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(e))&&((t=String(n.label&&!RegExp(r,"i").test(n.label)?n.label:t).split("/"))[1]&&!/[\d.]+/.test(t[0])&&(t[0]+=" "+t[1]),n=n.label||n,t=g(t[0].replace(RegExp(r,"i"),n).replace(RegExp("; *(?:"+n+"[_-])?","i")," ").replace(RegExp("("+n+")[-_.]?(\\w)","i"),"$1 $2"))),t})}if(R&&(R=[R]),z&&!L&&(L=U([z])),(a=/\bGoogle TV\b/.exec(L))&&(L=a[0]),/\bSimulator\b/i.test(e)&&(L=(L?L+" ":"")+"Simulator"),"Opera Mini"==D&&/\bOPiOS\b/.test(e)&&C.push("running in Turbo/Uncompressed mode"),"IE"==D&&/\blike iPhone OS\b/.test(e)?(z=(a=t(e.replace(/like iPhone OS/,""))).manufacturer,L=a.product):/^iP/.test(L)?(D||(D="Safari"),B="iOS"+((a=/ OS ([\d_]+)/i.exec(e))?" "+a[1].replace(/_/g,"."):"")):"Konqueror"!=D||/buntu/i.test(B)?z&&"Google"!=z&&(/Chrome/.test(D)&&!/\bMobile Safari\b/i.test(e)||/\bVita\b/.test(L))||/\bAndroid\b/.test(B)&&/^Chrome/.test(D)&&/\bVersion\//i.test(e)?(D="Android Browser",B=/\bAndroid\b/.test(B)?B:"Android"):"Silk"==D?(/\bMobi/i.test(e)||(B="Android",C.unshift("desktop mode")),/Accelerated *= *true/i.test(e)&&C.unshift("accelerated")):"PaleMoon"==D&&(a=/\bFirefox\/([\d.]+)\b/.exec(e))?C.push("identifying as Firefox "+a[1]):"Firefox"==D&&(a=/\b(Mobile|Tablet|TV)\b/i.exec(e))?(B||(B="Firefox OS"),L||(L=a[1])):!D||(a=!/\bMinefield\b/i.test(e)&&/\b(?:Firefox|Safari)\b/.exec(D))?(D&&!L&&/[\/,]|^[^(]+?\)/.test(e.slice(e.indexOf(a+"/")+8))&&(D=null),(a=L||z||B)&&(L||z||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(B))&&(D=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(B)?B:a)+" Browser")):"Electron"==D&&(a=(/\bChrome\/([\d.]+)\b/.exec(e)||0)[1])&&C.push("Chromium "+a):B="Kubuntu",M||(M=w(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",v(D),"(?:Firefox|Minefield|NetFront)"],function(t,n){return t||(RegExp(n+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(e)||0)[1]||null})),(a=("iCab"==R&&parseFloat(M)>3?"WebKit":/\bOpera\b/.test(D)&&(/\bOPR\b/.test(e)?"Blink":"Presto"))||/\b(?:Midori|Nook|Safari)\b/i.test(e)&&!/^(?:Trident|EdgeHTML)$/.test(R)&&"WebKit"||!R&&/\bMSIE\b/i.test(e)&&("Mac OS"==B?"Tasman":"Trident")||"WebKit"==R&&/\bPlayStation\b(?! Vita\b)/i.test(D)&&"NetFront")&&(R=[a]),"IE"==D&&(a=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(e)||0)[1])?(D+=" Mobile",B="Windows Phone "+(/\+$/.test(a)?a:a+".x"),C.unshift("desktop mode")):/\bWPDesktop\b/i.test(e)?(D="IE Mobile",B="Windows Phone 8.x",C.unshift("desktop mode"),M||(M=(/\brv:([\d.]+)/.exec(e)||0)[1])):"IE"!=D&&"Trident"==R&&(a=/\brv:([\d.]+)/.exec(e))&&(D&&C.push("identifying as "+D+(M?" "+M:"")),D="IE",M=a[1]),$){if(l="global",p=null!=(u=n)?typeof u[l]:"number",/^(?:boolean|number|string|undefined)$/.test(p)||"object"==p&&!u[l])y(a=n.runtime)==b?(D="Adobe AIR",B=a.flash.system.Capabilities.os):y(a=n.phantom)==k?(D="PhantomJS",M=(a=a.version||null)&&a.major+"."+a.minor+"."+a.patch):"number"==typeof P.documentMode&&(a=/\bTrident\/(\d+)/i.exec(e))?(M=[M,P.documentMode],(a=+a[1]+4)!=M[1]&&(C.push("IE "+M[1]+" mode"),R&&(R[1]=""),M[1]=a),M="IE"==D?String(M[1].toFixed(1)):M[0]):"number"==typeof P.documentMode&&/^(?:Chrome|Firefox)\b/.test(D)&&(C.push("masking as "+D+" "+M),D="IE",M="11.0",R=["Trident"],B="Windows");else if(S&&(F=(a=S.lang.System).getProperty("os.arch"),B=B||a.getProperty("os.name")+" "+a.getProperty("os.version")),A){try{M=n.require("ringo/engine").version.join("."),D="RingoJS"}catch(t){(a=n.system)&&a.global.system==n.system&&(D="Narwhal",B||(B=a[0].os||null))}D||(D="Rhino")}else"object"==typeof n.process&&!n.process.browser&&(a=n.process)&&("object"==typeof a.versions&&("string"==typeof a.versions.electron?(C.push("Node "+a.versions.node),D="Electron",M=a.versions.electron):"string"==typeof a.versions.nw&&(C.push("Chromium "+M,"Node "+a.versions.node),D="NW.js",M=a.versions.nw)),D||(D="Node.js",F=a.arch,B=a.platform,M=(M=/[\d.]+/.exec(a.version))?M[0]:null));B=B&&g(B)}if(M&&(a=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(M)||/(?:alpha|beta)(?: ?\d)?/i.exec(e+";"+($&&o.appMinorVersion))||/\bMinefield\b/i.test(e)&&"a")&&(N=/b/i.test(a)?"beta":"alpha",M=M.replace(RegExp(a+"\\+?$"),"")+("beta"==N?T:E)+(/\d+\+?/.exec(a)||"")),"Fennec"==D||"Firefox"==D&&/\b(?:Android|Firefox OS)\b/.test(B))D="Firefox Mobile";else if("Maxthon"==D&&M)M=M.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(L))"Xbox 360"==L&&(B=null),"Xbox 360"==L&&/\bIEMobile\b/.test(e)&&C.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(D)&&(!D||L||/Browser|Mobi/.test(D))||"Windows CE"!=B&&!/Mobi/i.test(e))if("IE"==D&&$)try{null===n.external&&C.unshift("platform preview")}catch(t){C.unshift("embedded")}else(/\bBlackBerry\b/.test(L)||/\bBB10\b/.test(e))&&(a=(RegExp(L.replace(/ +/g," *")+"/([.\\d]+)","i").exec(e)||0)[1]||M)?(B=((a=[a,/BB10/.test(e)])[1]?(L=null,z="BlackBerry"):"Device Software")+" "+a[0],M=null):this!=m&&"Wii"!=L&&($&&_||/Opera/.test(D)&&/\b(?:MSIE|Firefox)\b/i.test(e)||"Firefox"==D&&/\bOS X (?:\d+\.){2,}/.test(B)||"IE"==D&&(B&&!/^Win/.test(B)&&M>5.5||/\bWindows XP\b/.test(B)&&M>8||8==M&&!/\bTrident\b/.test(e)))&&!f.test(a=t.call(m,e.replace(f,"")+";"))&&a.name&&(a="ing as "+a.name+((a=a.version)?" "+a:""),f.test(D)?(/\bIE\b/.test(a)&&"Mac OS"==B&&(B=null),a="identify"+a):(a="mask"+a,D=I?g(I.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(a)&&(B=null),$||(M=null)),R=["Presto"],C.push(a));else D+=" Mobile";(a=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(e)||0)[1])&&(a=[parseFloat(a.replace(/\.(\d)$/,".0$1")),a],"Safari"==D&&"+"==a[1].slice(-1)?(D="WebKit Nightly",N="alpha",M=a[1].slice(0,-1)):M!=a[1]&&M!=(a[2]=(/\bSafari\/([\d.]+\+?)/i.exec(e)||0)[1])||(M=null),a[1]=(/\bChrome\/([\d.]+)/i.exec(e)||0)[1],537.36==a[0]&&537.36==a[2]&&parseFloat(a[1])>=28&&"WebKit"==R&&(R=["Blink"]),$&&(h||a[1])?(R&&(R[1]="like Chrome"),a=a[1]||((a=a[0])<530?1:a<532?2:a<532.05?3:a<533?4:a<534.03?5:a<534.07?6:a<534.1?7:a<534.13?8:a<534.16?9:a<534.24?10:a<534.3?11:a<535.01?12:a<535.02?"13+":a<535.07?15:a<535.11?16:a<535.19?17:a<536.05?18:a<536.1?19:a<537.01?20:a<537.11?"21+":a<537.13?23:a<537.18?24:a<537.24?25:a<537.36?26:"Blink"!=R?"27":"28")):(R&&(R[1]="like Safari"),a=(a=a[0])<400?1:a<500?2:a<526?3:a<533?4:a<534?"4+":a<535?5:a<537?6:a<538?7:a<601?8:"8"),R&&(R[1]+=" "+(a+="number"==typeof a?".x":/[.+]/.test(a)?"":"+")),"Safari"==D&&(!M||parseInt(M)>45)&&(M=a)),"Opera"==D&&(a=/\bzbov|zvav$/.exec(B))?(D+=" ",C.unshift("desktop mode"),"zvav"==a?(D+="Mini",M=null):D+="Mobile",B=B.replace(RegExp(" *"+a+"$"),"")):"Safari"==D&&/\bChrome\b/.exec(R&&R[1])&&(C.unshift("desktop mode"),D="Chrome Mobile",M=null,/\bOS X\b/.test(B)?(z="Apple",B="iOS 4.3+"):B=null),M&&0==M.indexOf(a=/[\d.]+$/.exec(B))&&e.indexOf("/"+a+"-")>-1&&(B=O(B.replace(a,""))),R&&!/\b(?:Avant|Nook)\b/.test(D)&&(/Browser|Lunascape|Maxthon/.test(D)||"Safari"!=D&&/^iOS/.test(B)&&/\bSafari\b/.test(R[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(D)&&R[1])&&(a=R[R.length-1])&&C.push(a),C.length&&(C=["("+C.join("; ")+")"]),z&&L&&L.indexOf(z)<0&&C.push("on "+z),L&&C.push((/^on /.test(C[C.length-1])?"":"on ")+L),B&&(a=/ ([\d.+]+)$/.exec(B),c=a&&"/"==B.charAt(B.length-a[0].length-1),B={architecture:32,family:a&&!c?B.replace(a[0],""):B,version:a?a[1]:null,toString:function(){var t=this.version;return this.family+(t&&!c?" "+t:"")+(64==this.architecture?" 64-bit":"")}}),(a=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(F))&&!/\bi686\b/i.test(F)?(B&&(B.architecture=64,B.family=B.family.replace(RegExp(" *"+a),"")),D&&(/\bWOW64\b/i.test(e)||$&&/\w(?:86|32)$/.test(o.cpuClass||o.platform)&&!/\bWin64; x64\b/i.test(e))&&C.unshift("32-bit")):B&&/^OS X/.test(B.family)&&"Chrome"==D&&parseFloat(M)>=39&&(B.architecture=64),e||(e=null);var G={};return G.description=e,G.layout=R&&R[0],G.manufacturer=z,G.name=D,G.prerelease=N,G.product=L,G.ua=e,G.version=D&&M,G.os=B||{architecture:null,family:null,version:null,toString:function(){return"null"}},G.parse=t,G.toString=function(){return this.description||""},G.version&&C.unshift(M),G.name&&C.unshift(D),B&&D&&(B!=String(B).split(" ")[0]||B!=D.split(" ")[0]&&!L)&&C.push(L?"("+B+")":"on "+B),C.length&&(G.description=C.join(" ")),G}();s.platform=x,void 0===(o=function(){return x}.call(e,n,e,t))||(t.exports=o)}).call(this)}).call(this,n(114)(t),n(28))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var r,o,i;!function(s,a){"use strict";o=[n(116)],void 0===(i="function"==typeof(r=function(t){var e=/(^|@)\S+\:\d+/,n=/^\s*at .*(\S+\:\d+|\(native\))/m,r=/^(eval@)?(\[native code\])?$/;return{parse:function(t){if(void 0!==t.stacktrace||void 0!==t["opera#sourceloc"])return this.parseOpera(t);if(t.stack&&t.stack.match(n))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/.exec(t.replace(/[\(\)]/g,""));return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(t){return!!t.match(n)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var n=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=n.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(n=r?n.replace(r[0],""):n).split(/\s+/).slice(1),i=this.extractLocation(r?r[1]:o.pop()),s=o.join(" ")||void 0,a=["eval","<anonymous>"].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(t){return!t.match(r)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var n=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(n),o=r&&r[1]?r[1]:void 0,i=this.extractLocation(e.replace(n,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})},this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var n=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),o=[],i=2,s=r.length;i<s;i+=2){var a=n.exec(r[i]);a&&o.push(new t({fileName:a[2],lineNumber:a[1],source:r[i]}))}return o},parseOpera10:function(e){for(var n=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),o=[],i=0,s=r.length;i<s;i+=2){var a=n.exec(r[i]);a&&o.push(new t({functionName:a[3]||void 0,fileName:a[2],lineNumber:a[1],source:r[i]}))}return o},parseOpera11:function(n){return n.stack.split("\n").filter(function(t){return!!t.match(e)&&!t.match(/^Error created at/)},this).map(function(e){var n,r=e.split("@"),o=this.extractLocation(r.pop()),i=r.shift()||"",s=i.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||void 0;i.match(/\(([^\)]*)\)/)&&(n=i.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var a=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})},this)}}})?r.apply(e,o):r)||(t.exports=i)}()},function(t,e,n){var r,o,i;!function(n,s){"use strict";o=[],void 0===(i="function"==typeof(r=function(){function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t){return t.charAt(0).toUpperCase()+t.substring(1)}function n(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],o=["columnNumber","lineNumber"],i=["fileName","functionName","source"],s=r.concat(o,i,["args"]);function a(t){if(t instanceof Object)for(var n=0;n<s.length;n++)t.hasOwnProperty(s[n])&&void 0!==t[s[n]]&&this["set"+e(s[n])](t[s[n]])}a.prototype={getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(t){if(t instanceof a)this.evalOrigin=t;else{if(!(t instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new a(t)}},toString:function(){return(this.getFunctionName()||"{anonymous}")+("("+(this.getArgs()||[]).join(",")+")")+(this.getFileName()?"@"+this.getFileName():"")+(t(this.getLineNumber())?":"+this.getLineNumber():"")+(t(this.getColumnNumber())?":"+this.getColumnNumber():"")}};for(var c=0;c<r.length;c++)a.prototype["get"+e(r[c])]=n(r[c]),a.prototype["set"+e(r[c])]=function(t){return function(e){this[t]=Boolean(e)}}(r[c]);for(var u=0;u<o.length;u++)a.prototype["get"+e(o[u])]=n(o[u]),a.prototype["set"+e(o[u])]=function(e){return function(n){if(!t(n))throw new TypeError(e+" must be a Number");this[e]=Number(n)}}(o[u]);for(var l=0;l<i.length;l++)a.prototype["get"+e(i[l])]=n(i[l]),a.prototype["set"+e(i[l])]=function(t){return function(e){this[t]=String(e)}}(i[l]);return a})?r.apply(e,o):r)||(t.exports=i)}()},function(t,e,n){"use strict";var r=n(118),o=n(3),i=n(27),s=n(33),a=n(34),c=n(21),u=n(120),l=n(121),f=Math.max,p=Math.min,h=Math.floor,d=/\$([$&'`]|\d\d?|<[^>]*>)/g,b=/\$([$&'`]|\d\d?)/g;r("replace",2,function(t,e,n){return[function(n,r){var o=c(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,o,r):e.call(String(o),n,r)},function(t,i){var c=n(e,t,this,i);if(c.done)return c.value;var h=o(t),d=String(this),b="function"==typeof i;b||(i=String(i));var g=h.global;if(g){var m=h.unicode;h.lastIndex=0}for(var y=[];;){var v=l(h,d);if(null===v)break;if(y.push(v),!g)break;""===String(v[0])&&(h.lastIndex=u(d,s(h.lastIndex),m))}for(var w,O="",x=0,j=0;j<y.length;j++){v=y[j];for(var k=String(v[0]),S=f(p(a(v.index),d.length),0),A=[],E=1;E<v.length;E++)A.push(void 0===(w=v[E])?w:String(w));var T=v.groups;if(b){var P=[k].concat(A,S,d);void 0!==T&&P.push(T);var _=String(i.apply(void 0,P))}else _=r(k,d,S,A,T,i);S>=x&&(O+=d.slice(x,S)+_,x=S+k.length)}return O+d.slice(x)}];function r(t,n,r,o,s,a){var c=r+t.length,u=o.length,l=b;return void 0!==s&&(s=i(s),l=d),e.call(a,l,function(e,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(c);case"<":a=s[i.slice(1,-1)];break;default:var l=+i;if(0===l)return e;if(l>u){var f=h(l/10);return 0===f?e:f<=u?void 0===o[f-1]?i.charAt(1):o[f-1]+i.charAt(1):e}a=o[l-1]}return void 0===a?"":a})}})},function(t,e,n){"use strict";var r=n(12),o=n(15),i=n(2),s=n(1),a=n(77),c=s("species"),u=!i(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),l=!i(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]});t.exports=function(t,e,n,f){var p=s(t),h=!i(function(){var e={};return e[p]=function(){return 7},7!=""[t](e)}),d=h&&!i(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[c]=function(){return n}),n[p](""),!e});if(!h||!d||"replace"===t&&!u||"split"===t&&!l){var b=/./[p],g=n(p,""[t],function(t,e,n,r,o){return e.exec===a?h&&!o?{done:!0,value:b.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),m=g[0],y=g[1];o(String.prototype,t,m),o(RegExp.prototype,p,2==e?function(t,e){return y.call(t,this,e)}:function(t){return y.call(t,this)}),f&&r(RegExp.prototype[p],"sham",!0)}}},function(t,e,n){"use strict";var r=n(3);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var r=n(49).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r=n(16),o=n(77);t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var i=n.call(t,e);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},function(t,e){t.exports="object"==typeof self?self.FormData:window.FormData},function(t,e,n){var r=n(124),o=n(125),i=[n(132)];t.exports=r.createStore(o,i)},function(t,e,n){var r=n(19),o=r.slice,i=r.pluck,s=r.each,a=r.bind,c=r.create,u=r.isList,l=r.isFunction,f=r.isObject;t.exports={createStore:h};var p={version:"2.0.12",enabled:!1,get:function(t,e){var n=this.storage.read(this._namespacePrefix+t);return this._deserialize(n,e)},set:function(t,e){return void 0===e?this.remove(t):(this.storage.write(this._namespacePrefix+t,this._serialize(e)),e)},remove:function(t){this.storage.remove(this._namespacePrefix+t)},each:function(t){var e=this;this.storage.each(function(n,r){t.call(e,e._deserialize(n),(r||"").replace(e._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(t){return this._namespacePrefix=="__storejs_"+t+"_"},createStore:function(){return h.apply(this,arguments)},addPlugin:function(t){this._addPlugin(t)},namespace:function(t){return h(this.storage,this.plugins,t)}};function h(t,e,n){n||(n=""),t&&!u(t)&&(t=[t]),e&&!u(e)&&(e=[e]);var r=n?"__storejs_"+n+"_":"",h=n?new RegExp("^"+r):null;if(!/^[a-zA-Z0-9_\-]*$/.test(n))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var d=c({_namespacePrefix:r,_namespaceRegexp:h,_testStorage:function(t){try{var e="__storejs__test__";t.write(e,e);var n=t.read(e)===e;return t.remove(e),n}catch(t){return!1}},_assignPluginFnProp:function(t,e){var n=this[e];this[e]=function(){var e=o(arguments,0),r=this;function i(){if(n)return s(arguments,function(t,n){e[n]=t}),n.apply(r,e)}var a=[i].concat(e);return t.apply(r,a)}},_serialize:function(t){return JSON.stringify(t)},_deserialize:function(t,e){if(!t)return e;var n="";try{n=JSON.parse(t)}catch(e){n=t}return void 0!==n?n:e},_addStorage:function(t){this.enabled||this._testStorage(t)&&(this.storage=t,this.enabled=!0)},_addPlugin:function(t){var e=this;if(u(t))s(t,function(t){e._addPlugin(t)});else if(!i(this.plugins,function(e){return t===e})){if(this.plugins.push(t),!l(t))throw new Error("Plugins must be function values that return objects");var n=t.call(this);if(!f(n))throw new Error("Plugins must return an object of function properties");s(n,function(n,r){if(!l(n))throw new Error("Bad plugin property: "+r+" from plugin "+t.name+". Plugins should only return functions.");e._assignPluginFnProp(n,r)})}},addStorage:function(t){!function(){var t="undefined"==typeof console?null:console;t&&(t.warn?t.warn:t.log).apply(t,arguments)}("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(t)}},p,{plugins:[]});return d.raw={},s(d,function(t,e){l(t)&&(d.raw[e]=a(d,t))}),s(t,function(t){d._addStorage(t)}),s(e,function(t){d._addPlugin(t)}),d}},function(t,e,n){t.exports=[n(126),n(127),n(128),n(129),n(130),n(131)]},function(t,e,n){var r=n(19).Global;function o(){return r.localStorage}function i(t){return o().getItem(t)}t.exports={name:"localStorage",read:i,write:function(t,e){return o().setItem(t,e)},each:function(t){for(var e=o().length-1;e>=0;e--){var n=o().key(e);t(i(n),n)}},remove:function(t){return o().removeItem(t)},clearAll:function(){return o().clear()}}},function(t,e,n){var r=n(19).Global;t.exports={name:"oldFF-globalStorage",read:function(t){return o[t]},write:function(t,e){o[t]=e},each:i,remove:function(t){return o.removeItem(t)},clearAll:function(){i(function(t,e){delete o[t]})}};var o=r.globalStorage;function i(t){for(var e=o.length-1;e>=0;e--){var n=o.key(e);t(o[n],n)}}},function(t,e,n){var r=n(19).Global;t.exports={name:"oldIE-userDataStorage",write:function(t,e){if(a)return;var n=u(t);s(function(t){t.setAttribute(n,e),t.save(o)})},read:function(t){if(a)return;var e=u(t),n=null;return s(function(t){n=t.getAttribute(e)}),n},each:function(t){s(function(e){for(var n=e.XMLDocument.documentElement.attributes,r=n.length-1;r>=0;r--){var o=n[r];t(e.getAttribute(o.name),o.name)}})},remove:function(t){var e=u(t);s(function(t){t.removeAttribute(e),t.save(o)})},clearAll:function(){s(function(t){var e=t.XMLDocument.documentElement.attributes;t.load(o);for(var n=e.length-1;n>=0;n--)t.removeAttribute(e[n].name);t.save(o)})}};var o="storejs",i=r.document,s=function(){if(!i||!i.documentElement||!i.documentElement.addBehavior)return null;var t,e,n;try{(e=new ActiveXObject("htmlfile")).open(),e.write('<script>document.w=window<\/script><iframe src="/favicon.ico"></iframe>'),e.close(),t=e.w.frames[0].document,n=t.createElement("div")}catch(e){n=i.createElement("div"),t=i.body}return function(e){var r=[].slice.call(arguments,0);r.unshift(n),t.appendChild(n),n.addBehavior("#default#userData"),n.load(o),e.apply(this,r),t.removeChild(n)}}(),a=(r.navigator?r.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);var c=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function u(t){return t.replace(/^\d/,"___$&").replace(c,"___")}},function(t,e,n){var r=n(19),o=r.Global,i=r.trim;t.exports={name:"cookieStorage",read:function(t){if(!t||!u(t))return null;var e="(?:^|.*;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(s.cookie.replace(new RegExp(e),"$1"))},write:function(t,e){if(!t)return;s.cookie=escape(t)+"="+escape(e)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"},each:a,remove:c,clearAll:function(){a(function(t,e){c(e)})}};var s=o.document;function a(t){for(var e=s.cookie.split(/; ?/g),n=e.length-1;n>=0;n--)if(i(e[n])){var r=e[n].split("="),o=unescape(r[0]);t(unescape(r[1]),o)}}function c(t){t&&u(t)&&(s.cookie=escape(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function u(t){return new RegExp("(?:^|;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(s.cookie)}},function(t,e,n){var r=n(19).Global;function o(){return r.sessionStorage}function i(t){return o().getItem(t)}t.exports={name:"sessionStorage",read:i,write:function(t,e){return o().setItem(t,e)},each:function(t){for(var e=o().length-1;e>=0;e--){var n=o().key(e);t(i(n),n)}},remove:function(t){return o().removeItem(t)},clearAll:function(){return o().clear()}}},function(t,e){t.exports={name:"memoryStorage",read:function(t){return n[t]},write:function(t,e){n[t]=e},each:function(t){for(var e in n)n.hasOwnProperty(e)&&t(n[e],e)},remove:function(t){delete n[t]},clearAll:function(t){n={}}};var n={}},function(t,e,n){t.exports=function(){return n(133),{}}},function(module,exports){"object"!=typeof JSON&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;function f(t){return t<10?"0"+t:t}function this_value(){return this.valueOf()}function quote(t){return rx_escapable.lastIndex=0,rx_escapable.test(t)?'"'+t.replace(rx_escapable,function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function str(t,e){var n,r,o,i,s,a=gap,c=e[t];switch(c&&"object"==typeof c&&"function"==typeof c.toJSON&&(c=c.toJSON(t)),"function"==typeof rep&&(c=rep.call(e,t,c)),typeof c){case"string":return quote(c);case"number":return isFinite(c)?String(c):"null";case"boolean":case"null":return String(c);case"object":if(!c)return"null";if(gap+=indent,s=[],"[object Array]"===Object.prototype.toString.apply(c)){for(i=c.length,n=0;n<i;n+=1)s[n]=str(n,c)||"null";return o=0===s.length?"[]":gap?"[\n"+gap+s.join(",\n"+gap)+"\n"+a+"]":"["+s.join(",")+"]",gap=a,o}if(rep&&"object"==typeof rep)for(i=rep.length,n=0;n<i;n+=1)"string"==typeof rep[n]&&(o=str(r=rep[n],c))&&s.push(quote(r)+(gap?": ":":")+o);else for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(o=str(r,c))&&s.push(quote(r)+(gap?": ":":")+o);return o=0===s.length?"{}":gap?"{\n"+gap+s.join(",\n"+gap)+"\n"+a+"}":"{"+s.join(",")+"}",gap=a,o}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value),"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(t,e,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;r<n;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=e,e&&"function"!=typeof e&&("object"!=typeof e||"number"!=typeof e.length))throw new Error("JSON.stringify");return str("",{"":t})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){var j;function walk(t,e){var n,r,o=t[e];if(o&&"object"==typeof o)for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(void 0!==(r=walk(o,n))?o[n]=r:delete o[n]);return reviver.call(t,e,o)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},function(t,e,n){t.exports=n(135)},function(t,e,n){"use strict";var r=n(6),o=n(78),i=n(137),s=n(50);function a(t){var e=new i(t),n=o(i.prototype.request,e);return r.extend(n,i.prototype,e),r.extend(n,e),n}var c=a(s);c.Axios=i,c.create=function(t){return a(r.merge(s,t))},c.Cancel=n(83),c.CancelToken=n(150),c.isCancel=n(82),c.all=function(t){return Promise.all(t)},c.spread=n(151),t.exports=c,t.exports.default=c},function(t,e){
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
t.exports=function(t){return null!=t&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}},function(t,e,n){"use strict";var r=n(50),o=n(6),i=n(145),s=n(146);function a(t){this.defaults=t,this.interceptors={request:new i,response:new i}}a.prototype.request=function(t){"string"==typeof t&&(t=o.merge({url:arguments[0]},arguments[1])),(t=o.merge(r,{method:"get"},this.defaults,t)).method=t.method.toLowerCase();var e=[s,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},o.forEach(["delete","get","head","options"],function(t){a.prototype[t]=function(e,n){return this.request(o.merge(n||{},{method:t,url:e}))}}),o.forEach(["post","put","patch"],function(t){a.prototype[t]=function(e,n,r){return this.request(o.merge(r||{},{method:t,url:e,data:n}))}}),t.exports=a},function(t,e,n){"use strict";var r=n(6);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){"use strict";var r=n(81);t.exports=function(t,e,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t}},function(t,e,n){"use strict";var r=n(6);function o(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var i;if(n)i=n(e);else if(r.isURLSearchParams(e))i=e.toString();else{var s=[];r.forEach(e,function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),s.push(o(e)+"="+o(t))}))}),i=s.join("&")}return i&&(t+=(-1===t.indexOf("?")?"?":"&")+i),t}},function(t,e,n){"use strict";var r=n(6),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,i,s={};return t?(r.forEach(t.split("\n"),function(t){if(i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e){if(s[e]&&o.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([n]):s[e]?s[e]+", "+n:n}}),s):s}},function(t,e,n){"use strict";var r=n(6);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=o(window.location.href),function(e){var n=r.isString(e)?o(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r=n(6);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,o,i,s){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";var r=n(6);function o(){this.handlers=[]}o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){r.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=o},function(t,e,n){"use strict";var r=n(6),o=n(147),i=n(82),s=n(50),a=n(148),c=n(149);function u(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return u(t),t.baseURL&&!a(t.url)&&(t.url=c(t.baseURL,t.url)),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||s.adapter)(t).then(function(e){return u(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return i(e)||(u(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,n){"use strict";var r=n(6);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(83);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new r(t),e(n.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o(function(e){t=e}),cancel:t}},t.exports=o},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";var r=n(13),o=n(153).trim;r({target:"String",proto:!0,forced:n(154)("trim")},{trim:function(){return o(this)}})},function(t,e,n){var r=n(21),o="["+n(86)+"]",i=RegExp("^"+o+o+"*"),s=RegExp(o+o+"*$"),a=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(i,"")),2&t&&(n=n.replace(s,"")),n}};t.exports={start:a(1),end:a(2),trim:a(3)}},function(t,e,n){var r=n(2),o=n(86);t.exports=function(t){return r(function(){return!!o[t]()||"…"!="…"[t]()||o[t].name!==t})}},function(t,e,n){(function(e){n(4),n(9),n(8),(()=>{const r=n(26),o=n(18),{ArgumentError:i}=n(5),{isBrowser:s,isNode:a}=n(156),c={},u={};class l{constructor(t,e,n,r){Object.defineProperties(this,Object.freeze({width:{value:t,writable:!1},height:{value:e,writable:!1},tid:{value:n,writable:!1},number:{value:r,writable:!1}}))}async data(t=(()=>{})){return await r.apiWrapper.call(this,l.prototype.data,t)}}l.prototype.data.implementation=async function(t){return new Promise(async(n,r)=>{try{if(this.number in u[this.tid])n(u[this.tid][this.number]);else{t();const r=await o.frames.getData(this.tid,this.number);if(a)u[this.tid][this.number]=e.Buffer.from(r,"binary").toString("base64"),n(u[this.tid][this.number]);else if(s){const t=new FileReader;t.onload=()=>{u[this.tid][this.number]=t.result,n(u[this.tid][this.number])},t.readAsDataURL(r)}}}catch(t){r(t)}})},t.exports={FrameData:l,getFrame:async function(t,e,n){if(t in c||(c[t]={},c[t].meta=await o.frames.getMeta(t),u[t]={}),!(n in c[t])){let r=null;if("interpolation"===e)[r]=c[t].meta;else{if("annotation"!==e)throw new i(`Invalid mode is specified ${e}`);if(n>=c[t].meta.length)throw new i(`Meta information about frame ${n} can't be received from the server`);r=c[t].meta[n]}c[t][n]=new l(r.width,r.height,t,n)}return c[t][n]}}})()}).call(this,n(28))},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r="undefined"!=typeof window&&void 0!==window.document,o="object"===("undefined"==typeof self?"undefined":n(self))&&self.constructor&&"DedicatedWorkerGlobalScope"===self.constructor.name,i=void 0!==t&&null!=t.versions&&null!=t.versions.node;e.isBrowser=r,e.isWebWorker=o,e.isNode=i}).call(this,n(79))},function(t,e,n){n(4),n(9),n(8),(()=>{const e=n(18),r=n(158),o=n(161),{checkObjectType:i}=n(39),{Task:s}=n(37),{Loader:a,Dumper:c}=n(88),{ScriptingError:u,DataError:l,ArgumentError:f}=n(5),p=new WeakMap,h=new WeakMap;function d(t){if("task"===t)return h;if("job"===t)return p;throw new u(`Unknown session type was received ${t}`)}async function b(t){const n=t instanceof s?"task":"job",i=d(n);if(!i.has(t)){const s=await e.annotations.getAnnotations(n,t.id),a="job"===n?t.startFrame:0,c="job"===n?t.stopFrame:t.size-1,u={};for(let e=a;e<=c;e++)u[e]=await t.frames.get(e);const l=new r({labels:t.labels||t.task.labels,startFrame:a,stopFrame:c,frameMeta:u}).import(s),f=new o(s.version,l,t);i.set(t,{collection:l,saver:f})}}t.exports={getAnnotations:async function(t,e,n){return await b(t),d(t instanceof s?"task":"job").get(t).collection.get(e,n)},putAnnotations:function(t,e){const n=d(t instanceof s?"task":"job");if(n.has(t))return n.get(t).collection.put(e);throw new l("Collection has not been initialized yet. Call annotations.get() or annotations.clear(true) before")},saveAnnotations:async function(t,e){const n=d(t instanceof s?"task":"job");n.has(t)&&await n.get(t).saver.save(e)},hasUnsavedChanges:function(t){const e=d(t instanceof s?"task":"job");return!!e.has(t)&&e.get(t).saver.hasUnsavedChanges()},mergeAnnotations:function(t,e){const n=d(t instanceof s?"task":"job");if(n.has(t))return n.get(t).collection.merge(e);throw new l("Collection has not been initialized yet. Call annotations.get() or annotations.clear(true) before")},splitAnnotations:function(t,e,n){const r=d(t instanceof s?"task":"job");if(r.has(t))return r.get(t).collection.split(e,n);throw new l("Collection has not been initialized yet. Call annotations.get() or annotations.clear(true) before")},groupAnnotations:function(t,e,n){const r=d(t instanceof s?"task":"job");if(r.has(t))return r.get(t).collection.group(e,n);throw new l("Collection has not been initialized yet. Call annotations.get() or annotations.clear(true) before")},clearAnnotations:async function(t,e){i("reload",e,"boolean",null);const n=d(t instanceof s?"task":"job");n.has(t)&&n.get(t).collection.clear(),e&&(n.delete(t),await b(t))},annotationsStatistics:function(t){const e=d(t instanceof s?"task":"job");if(e.has(t))return e.get(t).collection.statistics();throw new l("Collection has not been initialized yet. Call annotations.get() or annotations.clear(true) before")},selectObject:function(t,e,n,r){const o=d(t instanceof s?"task":"job");if(o.has(t))return o.get(t).collection.select(e,n,r);throw new l("Collection has not been initialized yet. Call annotations.get() or annotations.clear(true) before")},uploadAnnotations:async function(t,n,r){const o=t instanceof s?"task":"job";if(!(r instanceof a))throw new f("A loader must be instance of Loader class");await e.annotations.uploadAnnotations(o,t.id,n,r.name)},dumpAnnotations:async function(t,n,r){if(!(r instanceof c))throw new f("A dumper must be instance of Dumper class");let o=null;return o="job"===(t instanceof s?"task":"job")?await e.annotations.dumpAnnotations(t.task.id,n,r.name):await e.annotations.dumpAnnotations(t.id,n,r.name)}}})()},function(t,e,n){n(4),n(87),n(8),n(52),(()=>{const{RectangleShape:e,PolygonShape:r,PolylineShape:o,PointsShape:i,RectangleTrack:s,PolygonTrack:a,PolylineTrack:c,PointsTrack:u,Track:l,Shape:f,Tag:p,objectStateFactory:h}=n(160),{checkObjectType:d}=n(39),b=n(85),{Label:g}=n(38),{DataError:m,ArgumentError:y,ScriptingError:v}=n(5),{ObjectShape:w,ObjectType:O}=n(20),x=n(51),j=["#0066FF","#AF593E","#01A368","#FF861F","#ED0A3F","#FF3F34","#76D7EA","#8359A3","#FBE870","#C5E17A","#03BB85","#FFDF00","#8B8680","#0A6B0D","#8FD8D8","#A36F40","#F653A6","#CA3435","#FFCBA4","#FF99CC","#FA9D5A","#FFAE42","#A78B00","#788193","#514E49","#1164B4","#F4FA9F","#FED8B1","#C32148","#01796F","#E90067","#FF91A4","#404E5A","#6CDAE7","#FFC1CC","#006A93","#867200","#E2B631","#6EEB6E","#FFC800","#CC99BA","#FF007C","#BC6CAC","#DCCCD7","#EBE1C2","#A6AAAE","#B99685","#0086A7","#5E4330","#C8A2C8","#708EB3","#BC8777","#B2592D","#497E48","#6A2963","#E6335F","#00755E","#B5A895","#0048ba","#EED9C4","#C88A65","#FF6E4A","#87421F","#B2BEB5","#926F5B","#00B9FB","#6456B7","#DB5079","#C62D42","#FA9C44","#DA8A67","#FD7C6E","#93CCEA","#FCF686","#503E32","#FF5470","#9DE093","#FF7A00","#4F69C6","#A50B5E","#F0E68C","#FDFF00","#F091A9","#FFFF66","#6F9940","#FC74FD","#652DC1","#D6AEDD","#EE34D2","#BB3385","#6B3FA0","#33CC99","#FFDB00","#87FF2A","#6EEB6E","#FFC800","#CC99BA","#7A89B8","#006A93","#867200","#E2B631","#D9D6CF"];function k(t,n,s){const{type:a}=t,c=j[n%j.length];let u=null;switch(a){case"rectangle":u=new e(t,n,c,s);break;case"polygon":u=new r(t,n,c,s);break;case"polyline":u=new o(t,n,c,s);break;case"points":u=new i(t,n,c,s);break;default:throw new m(`An unexpected type of shape "${a}"`)}return u}function S(t,e,n){if(t.shapes.length){const{type:r}=t.shapes[0],o=j[e%j.length];let i=null;switch(r){case"rectangle":i=new s(t,e,o,n);break;case"polygon":i=new a(t,e,o,n);break;case"polyline":i=new c(t,e,o,n);break;case"points":i=new u(t,e,o,n);break;default:throw new m(`An unexpected type of track "${r}"`)}return i}return console.warn("The track without any shapes had been found. It was ignored."),null}t.exports=class{constructor(t){this.startFrame=t.startFrame,this.stopFrame=t.stopFrame,this.frameMeta=t.frameMeta,this.labels=t.labels.reduce((t,e)=>(t[e.id]=e,t),{}),this.shapes={},this.tags={},this.tracks=[],this.objects={},this.count=0,this.flush=!1,this.collectionZ={},this.groups={max:0},this.injection={labels:this.labels,collectionZ:this.collectionZ,groups:this.groups,frameMeta:this.frameMeta}}import(t){for(const e of t.tags){const t=++this.count,n=new p(e,t,this.injection);this.tags[n.frame]=this.tags[n.frame]||[],this.tags[n.frame].push(n),this.objects[t]=n}for(const e of t.shapes){const t=++this.count,n=k(e,t,this.injection);this.shapes[n.frame]=this.shapes[n.frame]||[],this.shapes[n.frame].push(n),this.objects[t]=n}for(const e of t.tracks){const t=++this.count,n=S(e,t,this.injection);n&&(this.tracks.push(n),this.objects[t]=n)}return this}export(){return{tracks:this.tracks.filter(t=>!t.removed).map(t=>t.toJSON()),shapes:Object.values(this.shapes).reduce((t,e)=>(t.push(...e),t),[]).filter(t=>!t.removed).map(t=>t.toJSON()),tags:Object.values(this.tags).reduce((t,e)=>(t.push(...e),t),[]).filter(t=>!t.removed).map(t=>t.toJSON())}}get(t){const{tracks:e}=this,n=this.shapes[t]||[],r=this.tags[t]||[],o=e.concat(n).concat(r).filter(t=>!t.removed),i=[];for(const e of o){const n=e.get(t);if(n.outside&&!n.keyframe)continue;const r=h.call(e,t,n);i.push(r)}return i}merge(t){if(d("shapes for merge",t,null,Array),!t.length)return;const e=t.map(t=>{d("object state",t,null,x);const e=this.objects[t.clientID];if(void 0===e)throw new y("The object has not been saved yet. Call ObjectState.put([state]) before you can merge it");return e}),n={},{label:r,shapeType:o}=t[0];if(!(r.id in this.labels))throw new y(`Unknown label for the task: ${r.id}`);if(!Object.values(w).includes(o))throw new y(`Got unknown shapeType "${o}"`);const i=r.attributes.reduce((t,e)=>(t[e.id]=e,t),{});for(let s=0;s<e.length;s++){const a=e[s],c=t[s];if(c.label.id!==r.id)throw new y(`All shape labels are expected to be ${r.name}, but got ${c.label.name}`);if(c.shapeType!==o)throw new y(`All shapes are expected to be ${o}, but got ${c.shapeType}`);if(a instanceof f){if(a.frame in n&&!n[a.frame].outside)throw new y("Expected only one visible shape per frame");n[a.frame]={type:o,frame:a.frame,points:[...a.points],occluded:a.occluded,zOrder:a.zOrder,outside:!1,attributes:Object.keys(a.attributes).reduce((t,e)=>(e in i&&i[e].mutable&&t.push({spec_id:+e,value:a.attributes[e]}),t),[])},a.frame+1 in n||(n[a.frame+1]=JSON.parse(JSON.stringify(n[a.frame])),n[a.frame+1].outside=!0,n[a.frame+1].frame++)}else{if(!(a instanceof l))throw new y(`Trying to merge unknown object type: ${a.constructor.name}. `+"Only shapes and tracks are expected.");{const t={};for(const e of Object.keys(a.shapes)){const r=a.shapes[e];if(e in n&&!n[e].outside){if(r.outside)continue;throw new y("Expected only one visible shape per frame")}let i=!1;for(const e in r.attributes)e in t&&t[e]===r.attributes[e]||(i=!0,t[e]=r.attributes[e]);n[e]={type:o,frame:+e,points:[...r.points],occluded:r.occluded,outside:r.outside,zOrder:r.zOrder,attributes:i?Object.keys(t).reduce((e,n)=>(e.push({spec_id:+n,value:t[n]}),e),[]):[]}}}}}let s=!1;for(const t of Object.keys(n).sort((t,e)=>+t-+e)){if((s=s||n[t].outside)||!n[t].outside)break;delete n[t]}const a=++this.count,c=S({frame:Math.min.apply(null,Object.keys(n).map(t=>+t)),shapes:Object.values(n),group:0,label_id:r.id,attributes:Object.keys(t[0].attributes).reduce((e,n)=>(i[n].mutable||e.push({spec_id:+n,value:t[0].attributes[n]}),e),[])},a,this.injection);this.tracks.push(c),this.objects[a]=c;for(const t of e)t.removed=!0,"function"==typeof t.resetCache&&t.resetCache()}split(t,e){d("object state",t,null,x),d("frame",e,"integer",null);const n=this.objects[t.clientID];if(void 0===n)throw new y("The object has not been saved yet. Call annotations.put([state]) before");if(t.objectType!==O.TRACK)return;const r=Object.keys(n.shapes).sort((t,e)=>+t-+e);if(e<=+r[0]||e>r[r.length-1])return;const o=n.label.attributes.reduce((t,e)=>(t[e.id]=e,t),{}),i=n.toJSON(),s={type:t.shapeType,points:[...t.points],occluded:t.occluded,outside:t.outside,zOrder:0,attributes:Object.keys(t.attributes).reduce((e,n)=>(o[n].mutable||e.push({spec_id:+n,value:t.attributes[n]}),e),[]),frame:e},a={frame:i.frame,group:0,label_id:i.label_id,attributes:i.attributes,shapes:[]},c=JSON.parse(JSON.stringify(a));c.frame=e,c.shapes.push(JSON.parse(JSON.stringify(s))),i.shapes.map(t=>(delete t.id,t.frame<e?a.shapes.push(JSON.parse(JSON.stringify(t))):t.frame>e&&c.shapes.push(JSON.parse(JSON.stringify(t))),t)),a.shapes.push(s),a.shapes[a.shapes.length-1].outside=!0;let u=++this.count;const l=S(a,u,this.injection);this.tracks.push(l),this.objects[u]=l,u=++this.count;const f=S(c,u,this.injection);this.tracks.push(f),this.objects[u]=f,n.removed=!0,n.resetCache()}group(t,e){d("shapes for group",t,null,Array);const n=t.map(t=>{d("object state",t,null,x);const e=this.objects[t.clientID];if(void 0===e)throw new y("The object has not been saved yet. Call annotations.put([state]) before");return e}),r=e?0:++this.groups.max;for(const t of n)t.group=r,"function"==typeof t.resetCache&&t.resetCache();return r}clear(){this.shapes={},this.tags={},this.tracks=[],this.objects={},this.count=0,this.flush=!0}statistics(){const t={},e={rectangle:{shape:0,track:0},polygon:{shape:0,track:0},polyline:{shape:0,track:0},points:{shape:0,track:0},tags:0,manually:0,interpolated:0,total:0},n=JSON.parse(JSON.stringify(e));for(const n of Object.values(this.labels)){const{name:r}=n;t[r]=JSON.parse(JSON.stringify(e))}for(const e of Object.values(this.objects)){let n=null;if(e instanceof f)n="shape";else if(e instanceof l)n="track";else{if(!(e instanceof p))throw new v(`Unexpected object type: "${n}"`);n="tag"}const r=e.label.name;if("tag"===n)t[r].tags++,t[r].manually++,t[r].total++;else{const{shapeType:o}=e;if(t[r][o][n]++,"track"===n){const n=Object.keys(e.shapes).sort((t,e)=>+t-+e).map(t=>+t);let o=n[0],i=!1;for(const s of n){if(i){const e=s-o-1;t[r].interpolated+=e,t[r].total+=e}i=!e.shapes[s].outside,o=s,i&&(t[r].manually++,t[r].total++)}const s=n[n.length-1];if(s!==this.stopFrame&&!e.shapes[s].outside){const e=this.stopFrame-s;t[r].interpolated+=e,t[r].total+=e}}else t[r].manually++,t[r].total++}}for(const e of Object.keys(t))for(const r of Object.keys(t[e]))if("object"==typeof t[e][r])for(const o of Object.keys(t[e][r]))n[r][o]+=t[e][r][o];else n[r]+=t[e][r];return new b(t,n)}put(t){d("shapes for put",t,null,Array);const e={shapes:[],tracks:[],tags:[]};function n(t,e){const n=+e,r=this.attributes[e];return d("attribute id",n,"integer",null),d("attribute value",r,"string",null),t.push({spec_id:n,value:r}),t}for(const r of t){d("object state",r,null,x),d("state client ID",r.clientID,"undefined",null),d("state frame",r.frame,"integer",null),d("state attributes",r.attributes,null,Object),d("state label",r.label,null,g);const t=Object.keys(r.attributes).reduce(n.bind(r),[]),o=r.label.attributes.reduce((t,e)=>(t[e.id]=e,t),{});if("tag"===r.objectType)e.tags.push({attributes:t,frame:r.frame,label_id:r.label.id,group:0});else{d("state occluded",r.occluded,"boolean",null),d("state points",r.points,null,Array);for(const t of r.points)d("point coordinate",t,"number",null);if(!Object.values(w).includes(r.shapeType))throw new y("Object shape must be one of: "+`${JSON.stringify(Object.values(w))}`);if("shape"===r.objectType)e.shapes.push({attributes:t,frame:r.frame,group:0,label_id:r.label.id,occluded:r.occluded||!1,points:[...r.points],type:r.shapeType,z_order:0});else{if("track"!==r.objectType)throw new y("Object type must be one of: "+`${JSON.stringify(Object.values(O))}`);e.tracks.push({attributes:t.filter(t=>!o[t.spec_id].mutable),frame:r.frame,group:0,label_id:r.label.id,shapes:[{attributes:t.filter(t=>o[t.spec_id].mutable),frame:r.frame,occluded:r.occluded||!1,outside:!1,points:[...r.points],type:r.shapeType,z_order:0}]})}}}this.import(e)}select(t,e,n){d("shapes for select",t,null,Array),d("x coordinate",e,"number",null),d("y coordinate",n,"number",null);let r=null,o=null;for(const i of t){if(d("object state",i,null,x),i.outside)continue;const t=this.objects[i.clientID];if(void 0===t)throw new y("The object has not been saved yet. Call annotations.put([state]) before");const s=t.constructor.distance(i.points,e,n);null!==s&&(null===r||s<r)&&(r=s,o=i)}return{state:o,distance:r}}}})()},function(t,e,n){"use strict";var r=n(2);t.exports=function(t,e){var n=[][t];return!n||!r(function(){n.call(null,e||function(){throw 1},1)})}},function(t,e,n){n(4),n(87),n(8),(()=>{const e=n(51),{checkObjectType:r,isEnum:o}=n(39),{ObjectShape:i,ObjectType:s,AttributeType:a,VisibleState:c}=n(20),{DataError:u,ArgumentError:l,ScriptingError:f}=n(5),{Label:p}=n(38);function h(t,n){const r=new e(n);return r.hidden={save:this.save.bind(this,t,r),delete:this.delete.bind(this),up:this.up.bind(this,t,r),down:this.down.bind(this,t,r)},r}function d(t,e){if(t===i.RECTANGLE){if(e.length/2!=2)throw new u(`Rectangle must have 2 points, but got ${e.length/2}`)}else if(t===i.POLYGON){if(e.length/2<3)throw new u(`Polygon must have at least 3 points, but got ${e.length/2}`)}else if(t===i.POLYLINE){if(e.length/2<2)throw new u(`Polyline must have at least 2 points, but got ${e.length/2}`)}else{if(t!==i.POINTS)throw new l(`Unknown value of shapeType has been recieved ${t}`);if(e.length/2<1)throw new u(`Points must have at least 1 points, but got ${e.length/2}`)}}function b(t,e){if(t===i.POINTS)return!0;let n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;for(let t=0;t<e.length-1;t+=2)n=Math.min(n,e[t]),r=Math.max(r,e[t]),o=Math.min(o,e[t+1]),s=Math.max(s,e[t+1]);if(t===i.POLYLINE){return Math.max(r-n,s-o)>=3}return(r-n)*(s-o)>=9}function g(t,e){const{values:n}=e,r=e.inputType;if("string"!=typeof t)throw new l(`Attribute value is expected to be string, but got ${typeof t}`);return r===a.NUMBER?+t>=+n[0]&&+t<=+n[1]&&!((+t-+n[0])%+n[2]):r===a.CHECKBOX?["true","false"].includes(t.toLowerCase()):n.includes(t)}class m{constructor(t,e,n){this.taskLabels=n.labels,this.clientID=e,this.serverID=t.id,this.group=t.group,this.label=this.taskLabels[t.label_id],this.frame=t.frame,this.removed=!1,this.lock=!1,this.attributes=t.attributes.reduce((t,e)=>(t[e.spec_id]=e.value,t),{}),this.appendDefaultAttributes(this.label),n.groups.max=Math.max(n.groups.max,this.group)}appendDefaultAttributes(t){const e=t.attributes;for(const t of e)t.id in this.attributes||(this.attributes[t.id]=t.defaultValue)}delete(t){return this.lock&&!t||(this.removed=!0),!0}}class y extends m{constructor(t,e,n,r){super(t,e,r),this.frameMeta=r.frameMeta,this.collectionZ=r.collectionZ,this.visibility=c.SHAPE,this.color=n,this.shapeType=null}_getZ(t){return this.collectionZ[t]=this.collectionZ[t]||{max:0,min:0},this.collectionZ[t]}save(){throw new f("Is not implemented")}get(){throw new f("Is not implemented")}toJSON(){throw new f("Is not implemented")}up(t,e){const n=this._getZ(t);n.max++,e.zOrder=n.max}down(t,e){const n=this._getZ(t);n.min--,e.zOrder=n.min}}class v extends y{constructor(t,e,n,r){super(t,e,n,r),this.points=t.points,this.occluded=t.occluded,this.zOrder=t.z_order;const o=this._getZ(this.frame);o.max=Math.max(o.max,this.zOrder||0),o.min=Math.min(o.min,this.zOrder||0)}toJSON(){return{type:this.shapeType,clientID:this.clientID,occluded:this.occluded,z_order:this.zOrder,points:[...this.points],attributes:Object.keys(this.attributes).reduce((t,e)=>(t.push({spec_id:e,value:this.attributes[e]}),t),[]),id:this.serverID,frame:this.frame,label_id:this.label.id,group:this.group}}get(t){if(t!==this.frame)throw new f("Got frame is not equal to the frame of the shape");return{objectType:s.SHAPE,shapeType:this.shapeType,clientID:this.clientID,serverID:this.serverID,occluded:this.occluded,lock:this.lock,zOrder:this.zOrder,points:[...this.points],attributes:Object.assign({},this.attributes),label:this.label,group:this.group,color:this.color,visibility:this.visibility}}save(t,e){if(t!==this.frame)throw new f("Got frame is not equal to the frame of the shape");if(this.lock&&e.lock)return h.call(this,t,this.get(t));const n=this.get(t),i=e.updateFlags;if(i.label&&(r("label",e.label,null,p),n.label=e.label,n.attributes={},this.appendDefaultAttributes.call(n,n.label)),i.attributes){const t=n.label.attributes.reduce((t,e)=>(t[e.id]=e,t),{});for(const r of Object.keys(e.attributes)){const o=e.attributes[r];if(!(r in t&&g(o,t[r])))throw new l(`Trying to save unknown attribute with id ${r} and value ${o}`);n.attributes[r]=o}}if(i.points){r("points",e.points,null,Array),d(this.shapeType,e.points);const{width:o,height:i}=this.frameMeta[t],s=[];for(let t=0;t<e.points.length-1;t+=2){const n=e.points[t],a=e.points[t+1];r("coordinate",n,"number",null),r("coordinate",a,"number",null),s.push(Math.clamp(n,0,o),Math.clamp(a,0,i))}b(this.shapeType,s)&&(n.points=s)}if(i.occluded&&(r("occluded",e.occluded,"boolean",null),n.occluded=e.occluded),i.group&&(r("group",e.group,"integer",null),n.group=e.group),i.zOrder&&(r("zOrder",e.zOrder,"integer",null),n.zOrder=e.zOrder),i.lock&&(r("lock",e.lock,"boolean",null),n.lock=e.lock),i.color){if(r("color",e.color,"string",null),/^#[0-9A-F]{6}$/i.test(e.color))throw new l(`Got invalid color value: "${e.color}"`);n.color=e.color}if(i.visibility){if(!o.call(c,e.visibility))throw new l(`Got invalid visibility value: "${e.visibility}"`);n.visibility=e.visibility}i.reset();for(const t of Object.keys(n))t in this&&(this[t]=n[t]);return h.call(this,t,this.get(t))}}class w extends y{constructor(t,e,n,r){super(t,e,n,r),this.shapes=t.shapes.reduce((t,e)=>{t[e.frame]={serverID:e.id,occluded:e.occluded,zOrder:e.z_order,points:e.points,outside:e.outside,attributes:e.attributes.reduce((t,e)=>(t[e.spec_id]=e.value,t),{})};const n=this._getZ(e.frame);return n.max=Math.max(n.max,e.z_order),n.min=Math.min(n.min,e.z_order),t},{}),this.cache={}}toJSON(){const t=this.label.attributes.reduce((t,e)=>(t[e.id]=e,t),{});return{clientID:this.clientID,id:this.serverID,frame:this.frame,label_id:this.label.id,group:this.group,attributes:Object.keys(this.attributes).reduce((e,n)=>(t[n].mutable||e.push({spec_id:n,value:this.attributes[n]}),e),[]),shapes:Object.keys(this.shapes).reduce((e,n)=>(e.push({type:this.shapeType,occluded:this.shapes[n].occluded,z_order:this.shapes[n].zOrder,points:[...this.shapes[n].points],outside:this.shapes[n].outside,attributes:Object.keys(this.shapes[n].attributes).reduce((e,r)=>(t[r].mutable&&e.push({spec_id:r,value:this.shapes[n].attributes[r]}),e),[]),id:this.shapes[n].serverID,frame:+n}),e),[])}}get(t){if(!(t in this.cache)){const e=Object.assign({},this.getPosition(t),{attributes:this.getAttributes(t),group:this.group,objectType:s.TRACK,shapeType:this.shapeType,clientID:this.clientID,serverID:this.serverID,lock:this.lock,color:this.color,visibility:this.visibility});this.cache[t]=e}const e=JSON.parse(JSON.stringify(this.cache[t]));return e.label=this.label,e}neighborsFrames(t){const e=Object.keys(this.shapes).map(t=>+t);let n=Number.MAX_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER;for(const o of e){const e=Math.abs(t-o);o<=t&&e<n?n=e:e<r&&(r=e)}return{leftFrame:n===Number.MAX_SAFE_INTEGER?null:t-n,rightFrame:r===Number.MAX_SAFE_INTEGER?null:t+r}}getAttributes(t){const e={};for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e[t]=this.attributes[t]);const n=Object.keys(this.shapes).sort((t,e)=>+t-+e);for(const r of n)if(r<=t){const{attributes:t}=this.shapes[r];for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}save(t,e){if(this.lock&&e.lock)return h.call(this,t,this.get(t));const n=Object.assign(this.get(t));n.attributes=Object.assign(n.attributes),n.points=[...n.points];const i=e.updateFlags;let s=!1;i.label&&(r("label",e.label,null,p),n.label=e.label,n.attributes={},this.appendDefaultAttributes.call(n,n.label));const a=n.label.attributes.reduce((t,e)=>(t[e.id]=e,t),{});if(i.attributes)for(const t of Object.keys(e.attributes)){const r=e.attributes[t];if(!(t in a&&g(r,a[t])))throw new l(`Trying to save unknown attribute with id ${t} and value ${r}`);n.attributes[t]=r}if(i.points){r("points",e.points,null,Array),d(this.shapeType,e.points);const{width:o,height:i}=this.frameMeta[t],a=[];for(let t=0;t<e.points.length-1;t+=2){const n=e.points[t],s=e.points[t+1];r("coordinate",n,"number",null),r("coordinate",s,"number",null),a.push(Math.clamp(n,0,o),Math.clamp(s,0,i))}b(this.shapeType,a)&&(n.points=a,s=!0)}if(i.occluded&&(r("occluded",e.occluded,"boolean",null),n.occluded=e.occluded,s=!0),i.outside&&(r("outside",e.outside,"boolean",null),n.outside=e.outside,s=!0),i.group&&(r("group",e.group,"integer",null),n.group=e.group),i.zOrder&&(r("zOrder",e.zOrder,"integer",null),n.zOrder=e.zOrder,s=!0),i.lock&&(r("lock",e.lock,"boolean",null),n.lock=e.lock),i.color){if(r("color",e.color,"string",null),/^#[0-9A-F]{6}$/i.test(e.color))throw new l(`Got invalid color value: "${e.color}"`);n.color=e.color}if(i.visibility){if(!o.call(c,e.visibility))throw new l(`Got invalid visibility value: "${e.visibility}"`);n.visibility=e.visibility}i.keyframe&&r("keyframe",e.keyframe,"boolean",null);for(const e of Object.keys(n))e in this&&(this[e]=n[e]),this.cache[t][e]=n[e];if(i.attributes)for(const r of Object.keys(n.attributes))a[r].mutable||(this.shapes[t].attributes[r]=e.attributes[r],this.shapes[t].attributes[r]=e.attributes[r]);if(i.label)for(const t of Object.values(this.shapes))t.attributes={};if(i.keyframe&&!e.keyframe){for(const e in this.cache)+e>t&&delete this.cache[e];return this.cache[t].keyframe=!1,delete this.shapes[t],i.reset(),h.call(this,t,this.get(t))}if(s||i.keyframe&&e.keyframe){for(const e in this.cache)+e>t&&delete this.cache[e];if(this.cache[t].keyframe=!0,e.keyframe=!0,this.shapes[t]={frame:t,zOrder:n.zOrder,points:n.points,outside:n.outside,occluded:n.occluded,attributes:{}},i.attributes)for(const r of Object.keys(n.attributes))a[r].mutable&&(this.shapes[t].attributes[r]=e.attributes[r],this.shapes[t].attributes[r]=e.attributes[r])}return i.reset(),h.call(this,t,this.get(t))}getPosition(t){const{leftFrame:e,rightFrame:n}=this.neighborsFrames(t),r=Number.isInteger(n)?this.shapes[n]:null,o=Number.isInteger(e)?this.shapes[e]:null;if(o&&e===t)return{points:[...o.points],occluded:o.occluded,outside:o.outside,zOrder:o.zOrder,keyframe:!0};if(r&&o)return Object.assign({},this.interpolatePosition(o,r,(t-e)/(n-e)),{keyframe:!1});if(r)return{points:[...r.points],occluded:r.occluded,outside:!0,zOrder:0,keyframe:!1};if(o)return{points:[...o.points],occluded:o.occluded,outside:o.outside,zOrder:0,keyframe:!1};throw new f(`No one neightbour frame found for the track with client ID: "${this.id}"`)}delete(t){return this.lock&&!t||(this.removed=!0,this.resetCache()),!0}resetCache(){this.cache={}}}class O extends v{constructor(t,e,n,r){super(t,e,n,r),this.shapeType=i.RECTANGLE,d(this.shapeType,this.points)}static distance(t,e,n){const[r,o,i,s]=t;return e>=r&&e<=i&&n>=o&&n<=s?Math.min.apply(null,[e-r,n-o,i-e,s-n]):null}}class x extends v{constructor(t,e,n,r){super(t,e,n,r)}}class j extends x{constructor(t,e,n,r){super(t,e,n,r),this.shapeType=i.POLYGON,d(this.shapeType,this.points)}static distance(t,e,n){function r(t,r,o,i){return(o-t)*(n-r)-(e-t)*(i-r)}let o=0;const i=[];for(let s=0,a=t.length-2;s<t.length-1;a=s,s+=2){const c=t[a],u=t[a+1],l=t[s],f=t[s+1];u<=n?f>n&&r(c,u,l,f)>0&&o++:f<=n&&r(c,u,l,f)<0&&o--;const p=e-(u-f),h=n-(l-c);(p-c)*(l-p)>=0&&(h-u)*(f-h)>=0?i.push(Math.sqrt(Math.pow(e-p,2)+Math.pow(n-h,2))):i.push(Math.min(Math.sqrt(Math.pow(c-e,2)+Math.pow(u-n,2)),Math.sqrt(Math.pow(l-e,2)+Math.pow(f-n,2))))}return 0!==o?Math.min.apply(null,i):null}}class k extends x{constructor(t,e,n,r){super(t,e,n,r),this.shapeType=i.POLYLINE,d(this.shapeType,this.points)}static distance(t,e,n){const r=[];for(let o=0;o<t.length-2;o+=2){const i=t[o],s=t[o+1],a=t[o+2],c=t[o+3];(e-i)*(a-e)>=0&&(n-s)*(c-n)>=0?r.push(Math.abs((c-s)*e-(a-i)*n+a*s-c*i)/Math.sqrt(Math.pow(c-s,2)+Math.pow(a-i,2))):r.push(Math.min(Math.sqrt(Math.pow(i-e,2)+Math.pow(s-n,2)),Math.sqrt(Math.pow(a-e,2)+Math.pow(c-n,2))))}return Math.min.apply(null,r)}}class S extends x{constructor(t,e,n,r){super(t,e,n,r),this.shapeType=i.POINTS,d(this.shapeType,this.points)}static distance(t,e,n){const r=[];for(let o=0;o<t.length;o+=2){const i=t[o],s=t[o+1];r.push(Math.sqrt(Math.pow(i-e,2)+Math.pow(s-n,2)))}return Math.min.apply(null,r)}}class A extends w{constructor(t,e,n,r){super(t,e,n,r),this.shapeType=i.RECTANGLE;for(const t of Object.values(this.shapes))d(this.shapeType,t.points)}interpolatePosition(t,e,n){const r=[e.points[0]-t.points[0],e.points[1]-t.points[1],e.points[2]-t.points[2],e.points[3]-t.points[3]];return{points:[t.points[0]+r[0]*n,t.points[1]+r[1]*n,t.points[2]+r[2]*n,t.points[3]+r[3]*n],occluded:t.occluded,outside:t.outside,zOrder:t.zOrder}}}class E extends w{constructor(t,e,n,r){super(t,e,n,r)}interpolatePosition(t,e,n){function r(t){let e=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER;for(let i=0;i<t.length;i+=2)t[i]<e&&(e=t[i]),t[i+1]<n&&(n=t[i+1]),t[i]>r&&(r=t[i]),t[i+1]>o&&(o=t[i+1]);return{xmin:e,ymin:n,xmax:r,ymax:o}}function o(t,e){const n=[],r=e.xmax-e.xmin,o=e.ymax-e.ymin;for(let i=0;i<t.length;i+=2)n.push((t[i]-e.xmin)/r,(t[i+1]-e.ymin)/o);return n}function i(t,e){const n=[],r=e.xmax-e.xmin,o=e.ymax-e.ymin;for(let i=0;i<t.length;i+=2)n.push(t[i]*r+e.xmin,t[i+1]*o+e.ymin);return n}function s(t){const e=[];for(let n=0;n<t.length;n+=2)e.push({x:t[n],y:t[n+1]});return e}function a(t){const e=[];for(const n of t)e.push(n.x,n.y);return e}function c(t,e){function n(t){let e=0;for(let n=1;n<t.length;n+=2){e+=Math.sqrt(Math.pow(t[n].x-t[n-1].x,2)+Math.pow(t[n].y-t[n-1].y,2))}return e||Number.MAX_SAFE_INTEGER}function r(t,e){let n=0;for(let r=1;r<t.length;r+=2){const o=Math.sqrt(Math.pow(t[r].x-t[r-1].x,2)+Math.pow(t[r].y-t[r-1].y,2));n+=Math.pow(o-e,2)}return n}const o=[],i=[],s=function(t,e){const n={};for(let r=0;r<t.length;r++){n[r]=n[r]||{};for(let o=0;o<e.length;o++){const i=t[r].x-e[o].x,s=t[r].y-e[o].y;n[r][o]=Math.sqrt(Math.pow(i,2)+Math.pow(s,2))}}return n}(t,e),a=function(t,e,n){const r={};for(const o of t)r[o]=e.concat().sort((t,e)=>n[o][t]-n[o][e]);const o={},i={};let s=0;for(;Object.values(i).length!==t.length;){for(const e of t){if(i[e])continue;const t=r[e][s],a=n[e][t];if(t in o&&o[t].distance>a){const e=o[t].value;delete o[t],delete i[e]}t in o||(o[t]={value:e,distance:a},i[e]=!0)}s++}const a={};for(const t of Object.keys(o))a[o[t].value]={value:t,distance:o[t].distance};return a}(Array.from(t.keys()),Array.from(e.keys()),s),c=(n(e)+n(t))/(e.length+t.length);!function(t,e){for(const n of Object.keys(t))t[n].distance>e&&delete t[n]}(a,c+3*Math.sqrt((r(t,c)+r(e,c))/(t.length+e.length)));for(const t of Object.keys(a))a[t]=a[t].value;const u=this.appendMapping(a,t,e);for(const n of u)o.push(t[n]),i.push(e[a[n]]);return[o,i]}let u=r(t.points),l=r(e.points);(u.xmax-u.xmin<1||l.ymax-l.ymin<1)&&(l=u={xmin:0,xmax:1024,ymin:0,ymax:768});const f=s(o(t.points,u)),p=s(o(e.points,l));let h=[],d=[];if(f.length>p.length){const[t,e]=c.call(this,p,f);h=e,d=t}else{const[t,e]=c.call(this,f,p);h=t,d=e}const b=i(a(h),u),g=i(a(d),l),m=[];for(let t=0;t<b.length;t++)m.push(b[t]+(g[t]-b[t])*n);return{points:m,occluded:t.occluded,outside:t.outside,zOrder:t.zOrder}}appendMapping(t,e,n){const r=Object.values(t).map(t=>+t),o=Object.keys(t).map(t=>+t),i=[];function s(t){let e=t,o=t;if(!r.length)throw new f("Interpolation mapping is empty");for(;!r.includes(e);)--e<0&&(e=n.length-1);for(;!r.includes(o);)++o>=n.length&&(o=0);return[e,o]}function a(t,e,r){const o=[];for(;e!==r;)o.push(n[e]),++e>=n.length&&(e=0);o.push(n[r]);let i=0,s=0,a=!1;for(let e=1;e<o.length;e++){const r=o[e],c=o[e-1],u=Math.sqrt(Math.pow(r.x-c.x,2)+Math.pow(r.y-c.y,2));a||(s+=u),i+=u,n[t]===o[e]&&(a=!0)}return i?s/i:0}for(let c=0;c<n.length;c++){const u=r.indexOf(c);if(-1===u){const[r,o]=s(c),u=a(c,r,o),l=n[r],f=n[o],p={x:l.x+(f.x-l.x)*u,y:l.y+(f.y-l.y)*u};e.push(p),t[e.length-1]=c,i.push(e.length-1)}else i.push(o[u])}return i}}class T extends E{constructor(t,e,n,r){super(t,e,n,r),this.shapeType=i.POLYGON;for(const t of Object.values(this.shapes))d(this.shapeType,t.points)}}class P extends E{constructor(t,e,n,r){super(t,e,n,r),this.shapeType=i.POLYLINE;for(const t of Object.values(this.shapes))d(this.shapeType,t.points)}}class _ extends E{constructor(t,e,n,r){super(t,e,n,r),this.shapeType=i.POINTS;for(const t of Object.values(this.shapes))d(this.shapeType,t.points)}}A.distance=O.distance,T.distance=j.distance,P.distance=k.distance,_.distance=S.distance,t.exports={RectangleShape:O,PolygonShape:j,PolylineShape:k,PointsShape:S,RectangleTrack:A,PolygonTrack:T,PolylineTrack:P,PointsTrack:_,Track:w,Shape:v,Tag:class extends m{constructor(t,e,n){super(t,e,n)}toJSON(){return{clientID:this.clientID,id:this.serverID,frame:this.frame,label_id:this.label.id,group:this.group,attributes:Object.keys(this.attributes).reduce((t,e)=>(t.push({spec_id:e,value:this.attributes[e]}),t),[])}}get(t){if(t!==this.frame)throw new f("Got frame is not equal to the frame of the shape");return{objectType:s.TAG,clientID:this.clientID,serverID:this.serverID,lock:this.lock,attributes:Object.assign({},this.attributes),label:this.label,group:this.group}}save(t,e){if(t!==this.frame)throw new f("Got frame is not equal to the frame of the shape");if(this.lock&&e.lock)return h.call(this,t,this.get(t));const n=this.get(t),o=e.updateFlags;if(o.label&&(r("label",e.label,null,p),n.label=e.label,n.attributes={},this.appendDefaultAttributes.call(n,n.label)),o.attributes){const t=n.label.attributes.map(t=>`${t.id}`);for(const r of Object.keys(e.attributes))t.includes(r)&&(n.attributes[r]=e.attributes[r])}o.group&&(r("group",e.group,"integer",null),n.group=e.group),o.lock&&(r("lock",e.lock,"boolean",null),n.lock=e.lock),o.reset();for(const t of Object.keys(n))t in this&&(this[t]=n[t]);return h.call(this,t,this.get(t))}},objectStateFactory:h}})()},function(t,e,n){n(4),n(9),n(8),(()=>{const e=n(18),{Task:r}=n(37),{ScriptingError:o}="./exceptions";t.exports=class{constructor(t,e,n){this.sessionType=n instanceof r?"task":"job",this.id=n.id,this.version=t,this.collection=e,this.initialObjects=[],this.hash=this._getHash();const o=this.collection.export();for(const t of o.shapes)this.initialObjects[t.id]=t;for(const t of o.tracks)this.initialObjects[t.id]=t;for(const t of o.tags)this.initialObjects[t.id]=t}_getHash(){const t=this.collection.export();return JSON.stringify(t)}async _request(t,n){return await e.annotations.updateAnnotations(this.sessionType,this.id,t,n)}async _put(t){return await this._request(t,"put")}async _create(t){return await this._request(t,"create")}async _update(t){return await this._request(t,"update")}async _delete(t){return await this._request(t,"delete")}_split(t){const e={created:{shapes:[],tracks:[],tags:[]},updated:{shapes:[],tracks:[],tags:[]},deleted:{shapes:[],tracks:[],tags:[]}};for(const n of Object.keys(t))for(const r of t[n])if(r.id in this.initialObjects){JSON.stringify(r)!==JSON.stringify(this.initialObjects[r.id])&&e.updated[n].push(r)}else{if(void 0!==r.id)throw new o(`Id of object is defined "${r.id}"`+"but it absents in initial state");e.created[n].push(r)}const n=t.tracks.concat(t.shapes).concat(t.tags).map(t=>t.id);for(const t of Object.keys(this.initialObjects))if(!n.includes(+t)){const n=this.initialObjects[t];let r=null;r="shapes"in n?"tracks":"points"in n?"shapes":"tags",e.deleted[r].push(n)}return e}_updateCreatedObjects(t,e){const n=t.tracks.length+t.shapes.length+t.tags.length,r=e.tracks.length+e.shapes.length+e.tags.length;if(r!==n)throw new o("Number of indexes is differed by number of saved objects"+`${r} vs ${n}`);for(const n of Object.keys(e))for(let r=0;r<e[n].length;r++){const o=e[n][r];this.collection.objects[o].serverID=t[n][r].id,"tracks"===n&&this.collection.objects[o].resetCache()}}_receiveIndexes(t){const e={tracks:t.tracks.map(t=>t.clientID),shapes:t.shapes.map(t=>t.clientID),tags:t.tags.map(t=>t.clientID)};return t.tracks.concat(t.shapes).concat(t.tags).map(t=>(delete t.clientID,t)),e}async save(t){"function"!=typeof t&&(t=t=>{console.log(t)});try{const e=this.collection.export(),{flush:n}=this.collection;if(n){t("New objects are being saved..");const n=this._receiveIndexes(e),r=await this._put(Object.assign({},e,{version:this.version}));this.version=r.version,this.collection.flush=!1,t("Saved objects are being updated in the client"),this._updateCreatedObjects(r,n),t("Initial state is being updated");for(const t of r.shapes.concat(r.tracks).concat(r.tags))this.initialObjects[t.id]=t}else{const{created:n,updated:r,deleted:o}=this._split(e);t("New objects are being saved..");const i=this._receiveIndexes(n),s=await this._create(Object.assign({},n,{version:this.version}));this.version=s.version,t("Saved objects are being updated in the client"),this._updateCreatedObjects(s,i),t("Initial state is being updated");for(const t of s.shapes.concat(s.tracks).concat(s.tags))this.initialObjects[t.id]=t;t("Changed objects are being saved.."),this._receiveIndexes(r);const a=await this._update(Object.assign({},r,{version:this.version}));this.version=s.version,t("Initial state is being updated");for(const t of a.shapes.concat(a.tracks).concat(a.tags))this.initialObjects[t.id]=t;t("Changed objects are being saved.."),this._receiveIndexes(o);const c=await this._delete(Object.assign({},o,{version:this.version}));this._version=c.version,t("Initial state is being updated");for(const t of c.shapes.concat(c.tracks).concat(c.tags))delete this.initialObjects[t.id]}this.hash=this._getHash(),t("Saving is done")}catch(e){throw t(`Can not save annotations: ${e.message}`),e}}hasUnsavedChanges(){return this._getHash()!==this.hash}}})()},function(t){t.exports=JSON.parse('{"name":"cvat-core.js","version":"0.1.0","description":"Part of Computer Vision Tool which presents an interface for client-side integration","main":"babel.config.js","scripts":{"build":"webpack","test":"jest --config=jest.config.js --coverage","docs":"jsdoc --readme README.md src/*.js -p -c jsdoc.config.js -d docs","coveralls":"cat ./reports/coverage/lcov.info | coveralls"},"author":"Intel","license":"MIT","devDependencies":{"@babel/cli":"^7.4.4","@babel/core":"^7.4.4","@babel/preset-env":"^7.4.4","airbnb":"0.0.2","babel-eslint":"^10.0.1","babel-loader":"^8.0.6","core-js":"^3.0.1","coveralls":"^3.0.5","eslint":"6.1.0","eslint-config-airbnb-base":"14.0.0","eslint-plugin-import":"2.18.2","eslint-plugin-no-unsafe-innerhtml":"^1.0.16","eslint-plugin-no-unsanitized":"^3.0.2","eslint-plugin-security":"^1.4.0","jest":"^24.8.0","jest-junit":"^6.4.0","jsdoc":"^3.6.2","webpack":"^4.31.0","webpack-cli":"^3.3.2"},"dependencies":{"axios":"^0.18.0","browser-or-node":"^1.2.1","error-stack-parser":"^2.0.2","form-data":"^2.5.0","jest-config":"^24.8.0","js-cookie":"^2.2.0","platform":"^1.3.5","store":"^2.0.12"}}')},function(t,e,n){n(4),n(9),n(8),n(164),(()=>{const e=n(26),r=n(18),{isBoolean:o,isInteger:i,isEnum:s,isString:a,checkFilter:c}=n(39),{TaskStatus:u,TaskMode:l}=n(20),f=n(84),{AnnotationFormat:p}=n(88),{ArgumentError:h}=n(5),{Task:d}=n(37);t.exports=function(t){return t.plugins.list.implementation=e.list,t.plugins.register.implementation=e.register.bind(t),t.server.about.implementation=async()=>{return await r.server.about()},t.server.share.implementation=async t=>{return await r.server.share(t)},t.server.formats.implementation=async()=>{return(await r.server.formats()).map(t=>new p(t))},t.server.register.implementation=async(t,e,n,o,i,s)=>{await r.server.register(t,e,n,o,i,s)},t.server.login.implementation=async(t,e)=>{await r.server.login(t,e)},t.server.logout.implementation=async()=>{await r.server.logout()},t.server.authorized.implementation=async()=>{return await r.server.authorized()},t.users.get.implementation=async t=>{c(t,{self:o});let e=null;return e=(e="self"in t&&t.self?[e=await r.users.getSelf()]:await r.users.getUsers()).map(t=>new f(t))},t.jobs.get.implementation=async t=>{if(c(t,{taskID:i,jobID:i}),"taskID"in t&&"jobID"in t)throw new h('Only one of fields "taskID" and "jobID" allowed simultaneously');if(!Object.keys(t).length)throw new h("Job filter must not be empty");let e=null;if("taskID"in t)e=await r.tasks.getTasks(`id=${t.taskID}`);else{const n=await r.jobs.getJob(t.jobID);void 0!==n.task_id&&(e=await r.tasks.getTasks(`id=${n.task_id}`))}if(null!==e&&e.length){const n=new d(e[0]);return t.jobID?n.jobs.filter(e=>e.id===t.jobID):n.jobs}return[]},t.tasks.get.implementation=async t=>{if(c(t,{page:i,name:a,id:i,owner:a,assignee:a,search:a,status:s.bind(u),mode:s.bind(l)}),"search"in t&&Object.keys(t).length>1&&!("page"in t&&2===Object.keys(t).length))throw new h('Do not use the filter field "search" with others');if("id"in t&&Object.keys(t).length>1&&!("page"in t&&2===Object.keys(t).length))throw new h('Do not use the filter field "id" with others');const e=new URLSearchParams;for(const n of["name","owner","assignee","search","status","mode","id","page"])Object.prototype.hasOwnProperty.call(t,n)&&e.set(n,t[n]);const n=await r.tasks.getTasks(e.toString()),o=n.map(t=>new d(t));return o.count=n.count,o},t}})()},function(t,e,n){"use strict";n(165);var r,o=n(13),i=n(10),s=n(89),a=n(0),c=n(71),u=n(15),l=n(47),f=n(7),p=n(166),h=n(167),d=n(49).codeAt,b=n(169),g=n(23),m=n(170),y=n(17),v=a.URL,w=m.URLSearchParams,O=m.getState,x=y.set,j=y.getterFor("URL"),k=Math.floor,S=Math.pow,A=/[A-Za-z]/,E=/[\d+\-.A-Za-z]/,T=/\d/,P=/^(0x|0X)/,_=/^[0-7]+$/,I=/^\d+$/,F=/^[\dA-Fa-f]+$/,C=/[\u0000\u0009\u000A\u000D #%\/:?@[\\]]/,N=/[\u0000\u0009\u000A\u000D #\/:?@[\\]]/,$=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,M=/[\u0009\u000A\u000D]/g,R=function(t,e){var n,r,o;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return"Invalid host";if(!(n=L(e.slice(1,-1))))return"Invalid host";t.host=n}else if(V(t)){if(e=b(e),C.test(e))return"Invalid host";if(null===(n=D(e)))return"Invalid host";t.host=n}else{if(N.test(e))return"Invalid host";for(n="",r=h(e),o=0;o<r.length;o++)n+=J(r[o],B);t.host=n}},D=function(t){var e,n,r,o,i,s,a,c=t.split(".");if(c.length&&""==c[c.length-1]&&c.pop(),(e=c.length)>4)return t;for(n=[],r=0;r<e;r++){if(""==(o=c[r]))return t;if(i=10,o.length>1&&"0"==o.charAt(0)&&(i=P.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)s=0;else{if(!(10==i?I:8==i?_:F).test(o))return t;s=parseInt(o,i)}n.push(s)}for(r=0;r<e;r++)if(s=n[r],r==e-1){if(s>=S(256,5-e))return null}else if(s>255)return null;for(a=n.pop(),r=0;r<n.length;r++)a+=n[r]*S(256,3-r);return a},L=function(t){var e,n,r,o,i,s,a,c=[0,0,0,0,0,0,0,0],u=0,l=null,f=0,p=function(){return t.charAt(f)};if(":"==p()){if(":"!=t.charAt(1))return;f+=2,l=++u}for(;p();){if(8==u)return;if(":"!=p()){for(e=n=0;n<4&&F.test(p());)e=16*e+parseInt(p(),16),f++,n++;if("."==p()){if(0==n)return;if(f-=n,u>6)return;for(r=0;p();){if(o=null,r>0){if(!("."==p()&&r<4))return;f++}if(!T.test(p()))return;for(;T.test(p());){if(i=parseInt(p(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;f++}c[u]=256*c[u]+o,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==p()){if(f++,!p())return}else if(p())return;c[u++]=e}else{if(null!==l)return;f++,l=++u}}if(null!==l)for(s=u-l,u=7;0!=u&&s>0;)a=c[u],c[u--]=c[l+s-1],c[l+--s]=a;else if(8!=u)return;return c},z=function(t){var e,n,r,o;if("number"==typeof t){for(e=[],n=0;n<4;n++)e.unshift(t%256),t=k(t/256);return e.join(".")}if("object"==typeof t){for(e="",r=function(t){for(var e=null,n=1,r=null,o=0,i=0;i<8;i++)0!==t[i]?(o>n&&(e=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(e=r,n=o),e}(t),n=0;n<8;n++)o&&0===t[n]||(o&&(o=!1),r===n?(e+=n?":":"::",o=!0):(e+=t[n].toString(16),n<7&&(e+=":")));return"["+e+"]"}return t},B={},U=p({},B,{" ":1,'"':1,"<":1,">":1,"`":1}),G=p({},U,{"#":1,"?":1,"{":1,"}":1}),W=p({},G,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),J=function(t,e){var n=d(t,0);return n>32&&n<127&&!f(e,t)?t:encodeURIComponent(t)},q={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},V=function(t){return f(q,t.scheme)},X=function(t){return""!=t.username||""!=t.password},H=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},K=function(t,e){var n;return 2==t.length&&A.test(t.charAt(0))&&(":"==(n=t.charAt(1))||!e&&"|"==n)},Z=function(t){var e;return t.length>1&&K(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},Y=function(t){var e=t.path,n=e.length;!n||"file"==t.scheme&&1==n&&K(e[0],!0)||e.pop()},Q=function(t){return"."===t||"%2e"===t.toLowerCase()},tt={},et={},nt={},rt={},ot={},it={},st={},at={},ct={},ut={},lt={},ft={},pt={},ht={},dt={},bt={},gt={},mt={},yt={},vt={},wt={},Ot=function(t,e,n,o){var i,s,a,c,u,l=n||tt,p=0,d="",b=!1,g=!1,m=!1;for(n||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace($,"")),e=e.replace(M,""),i=h(e);p<=i.length;){switch(s=i[p],l){case tt:if(!s||!A.test(s)){if(n)return"Invalid scheme";l=nt;continue}d+=s.toLowerCase(),l=et;break;case et:if(s&&(E.test(s)||"+"==s||"-"==s||"."==s))d+=s.toLowerCase();else{if(":"!=s){if(n)return"Invalid scheme";d="",l=nt,p=0;continue}if(n&&(V(t)!=f(q,d)||"file"==d&&(X(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=d,n)return void(V(t)&&q[t.scheme]==t.port&&(t.port=null));d="","file"==t.scheme?l=ht:V(t)&&o&&o.scheme==t.scheme?l=rt:V(t)?l=at:"/"==i[p+1]?(l=ot,p++):(t.cannotBeABaseURL=!0,t.path.push(""),l=yt)}break;case nt:if(!o||o.cannotBeABaseURL&&"#"!=s)return"Invalid scheme";if(o.cannotBeABaseURL&&"#"==s){t.scheme=o.scheme,t.path=o.path.slice(),t.query=o.query,t.fragment="",t.cannotBeABaseURL=!0,l=wt;break}l="file"==o.scheme?ht:it;continue;case rt:if("/"!=s||"/"!=i[p+1]){l=it;continue}l=ct,p++;break;case ot:if("/"==s){l=ut;break}l=mt;continue;case it:if(t.scheme=o.scheme,s==r)t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.query=o.query;else if("/"==s||"\\"==s&&V(t))l=st;else if("?"==s)t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.query="",l=vt;else{if("#"!=s){t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.path.pop(),l=mt;continue}t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.query=o.query,t.fragment="",l=wt}break;case st:if(!V(t)||"/"!=s&&"\\"!=s){if("/"!=s){t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,l=mt;continue}l=ut}else l=ct;break;case at:if(l=ct,"/"!=s||"/"!=d.charAt(p+1))continue;p++;break;case ct:if("/"!=s&&"\\"!=s){l=ut;continue}break;case ut:if("@"==s){b&&(d="%40"+d),b=!0,a=h(d);for(var y=0;y<a.length;y++){var v=a[y];if(":"!=v||m){var w=J(v,W);m?t.password+=w:t.username+=w}else m=!0}d=""}else if(s==r||"/"==s||"?"==s||"#"==s||"\\"==s&&V(t)){if(b&&""==d)return"Invalid authority";p-=h(d).length+1,d="",l=lt}else d+=s;break;case lt:case ft:if(n&&"file"==t.scheme){l=bt;continue}if(":"!=s||g){if(s==r||"/"==s||"?"==s||"#"==s||"\\"==s&&V(t)){if(V(t)&&""==d)return"Invalid host";if(n&&""==d&&(X(t)||null!==t.port))return;if(c=R(t,d))return c;if(d="",l=gt,n)return;continue}"["==s?g=!0:"]"==s&&(g=!1),d+=s}else{if(""==d)return"Invalid host";if(c=R(t,d))return c;if(d="",l=pt,n==ft)return}break;case pt:if(!T.test(s)){if(s==r||"/"==s||"?"==s||"#"==s||"\\"==s&&V(t)||n){if(""!=d){var O=parseInt(d,10);if(O>65535)return"Invalid port";t.port=V(t)&&O===q[t.scheme]?null:O,d=""}if(n)return;l=gt;continue}return"Invalid port"}d+=s;break;case ht:if(t.scheme="file","/"==s||"\\"==s)l=dt;else{if(!o||"file"!=o.scheme){l=mt;continue}if(s==r)t.host=o.host,t.path=o.path.slice(),t.query=o.query;else if("?"==s)t.host=o.host,t.path=o.path.slice(),t.query="",l=vt;else{if("#"!=s){Z(i.slice(p).join(""))||(t.host=o.host,t.path=o.path.slice(),Y(t)),l=mt;continue}t.host=o.host,t.path=o.path.slice(),t.query=o.query,t.fragment="",l=wt}}break;case dt:if("/"==s||"\\"==s){l=bt;break}o&&"file"==o.scheme&&!Z(i.slice(p).join(""))&&(K(o.path[0],!0)?t.path.push(o.path[0]):t.host=o.host),l=mt;continue;case bt:if(s==r||"/"==s||"\\"==s||"?"==s||"#"==s){if(!n&&K(d))l=mt;else if(""==d){if(t.host="",n)return;l=gt}else{if(c=R(t,d))return c;if("localhost"==t.host&&(t.host=""),n)return;d="",l=gt}continue}d+=s;break;case gt:if(V(t)){if(l=mt,"/"!=s&&"\\"!=s)continue}else if(n||"?"!=s)if(n||"#"!=s){if(s!=r&&(l=mt,"/"!=s))continue}else t.fragment="",l=wt;else t.query="",l=vt;break;case mt:if(s==r||"/"==s||"\\"==s&&V(t)||!n&&("?"==s||"#"==s)){if(".."===(u=(u=d).toLowerCase())||"%2e."===u||".%2e"===u||"%2e%2e"===u?(Y(t),"/"==s||"\\"==s&&V(t)||t.path.push("")):Q(d)?"/"==s||"\\"==s&&V(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&K(d)&&(t.host&&(t.host=""),d=d.charAt(0)+":"),t.path.push(d)),d="","file"==t.scheme&&(s==r||"?"==s||"#"==s))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==s?(t.query="",l=vt):"#"==s&&(t.fragment="",l=wt)}else d+=J(s,G);break;case yt:"?"==s?(t.query="",l=vt):"#"==s?(t.fragment="",l=wt):s!=r&&(t.path[0]+=J(s,B));break;case vt:n||"#"!=s?s!=r&&("'"==s&&V(t)?t.query+="%27":t.query+="#"==s?"%23":J(s,B)):(t.fragment="",l=wt);break;case wt:s!=r&&(t.fragment+=J(s,U))}p++}},xt=function(t){var e,n,r=l(this,xt,"URL"),o=arguments.length>1?arguments[1]:void 0,s=String(t),a=x(r,{type:"URL"});if(void 0!==o)if(o instanceof xt)e=j(o);else if(n=Ot(e={},String(o)))throw TypeError(n);if(n=Ot(a,s,null,e))throw TypeError(n);var c=a.searchParams=new w,u=O(c);u.updateSearchParams(a.query),u.updateURL=function(){a.query=String(c)||null},i||(r.href=kt.call(r),r.origin=St.call(r),r.protocol=At.call(r),r.username=Et.call(r),r.password=Tt.call(r),r.host=Pt.call(r),r.hostname=_t.call(r),r.port=It.call(r),r.pathname=Ft.call(r),r.search=Ct.call(r),r.searchParams=Nt.call(r),r.hash=$t.call(r))},jt=xt.prototype,kt=function(){var t=j(this),e=t.scheme,n=t.username,r=t.password,o=t.host,i=t.port,s=t.path,a=t.query,c=t.fragment,u=e+":";return null!==o?(u+="//",X(t)&&(u+=n+(r?":"+r:"")+"@"),u+=z(o),null!==i&&(u+=":"+i)):"file"==e&&(u+="//"),u+=t.cannotBeABaseURL?s[0]:s.length?"/"+s.join("/"):"",null!==a&&(u+="?"+a),null!==c&&(u+="#"+c),u},St=function(){var t=j(this),e=t.scheme,n=t.port;if("blob"==e)try{return new URL(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&V(t)?e+"://"+z(t.host)+(null!==n?":"+n:""):"null"},At=function(){return j(this).scheme+":"},Et=function(){return j(this).username},Tt=function(){return j(this).password},Pt=function(){var t=j(this),e=t.host,n=t.port;return null===e?"":null===n?z(e):z(e)+":"+n},_t=function(){var t=j(this).host;return null===t?"":z(t)},It=function(){var t=j(this).port;return null===t?"":String(t)},Ft=function(){var t=j(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},Ct=function(){var t=j(this).query;return t?"?"+t:""},Nt=function(){return j(this).searchParams},$t=function(){var t=j(this).fragment;return t?"#"+t:""},Mt=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(i&&c(jt,{href:Mt(kt,function(t){var e=j(this),n=String(t),r=Ot(e,n);if(r)throw TypeError(r);O(e.searchParams).updateSearchParams(e.query)}),origin:Mt(St),protocol:Mt(At,function(t){var e=j(this);Ot(e,String(t)+":",tt)}),username:Mt(Et,function(t){var e=j(this),n=h(String(t));if(!H(e)){e.username="";for(var r=0;r<n.length;r++)e.username+=J(n[r],W)}}),password:Mt(Tt,function(t){var e=j(this),n=h(String(t));if(!H(e)){e.password="";for(var r=0;r<n.length;r++)e.password+=J(n[r],W)}}),host:Mt(Pt,function(t){var e=j(this);e.cannotBeABaseURL||Ot(e,String(t),lt)}),hostname:Mt(_t,function(t){var e=j(this);e.cannotBeABaseURL||Ot(e,String(t),ft)}),port:Mt(It,function(t){var e=j(this);H(e)||(""==(t=String(t))?e.port=null:Ot(e,t,pt))}),pathname:Mt(Ft,function(t){var e=j(this);e.cannotBeABaseURL||(e.path=[],Ot(e,t+"",gt))}),search:Mt(Ct,function(t){var e=j(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",Ot(e,t,vt)),O(e.searchParams).updateSearchParams(e.query)}),searchParams:Mt(Nt),hash:Mt($t,function(t){var e=j(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",Ot(e,t,wt)):e.fragment=null})}),u(jt,"toJSON",function(){return kt.call(this)},{enumerable:!0}),u(jt,"toString",function(){return kt.call(this)},{enumerable:!0}),v){var Rt=v.createObjectURL,Dt=v.revokeObjectURL;Rt&&u(xt,"createObjectURL",function(t){return Rt.apply(v,arguments)}),Dt&&u(xt,"revokeObjectURL",function(t){return Dt.apply(v,arguments)})}g(xt,"URL"),o({global:!0,forced:!s,sham:!i},{URL:xt})},function(t,e,n){"use strict";var r=n(49).charAt,o=n(17),i=n(73),s=o.set,a=o.getterFor("String Iterator");i(String,"String",function(t){s(this,{type:"String Iterator",string:String(t),index:0})},function(){var t,e=a(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(10),o=n(2),i=n(72),s=n(61),a=n(53),c=n(27),u=n(54),l=Object.assign;t.exports=!l||o(function(){var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach(function(t){e[t]=t}),7!=l({},t)[n]||"abcdefghijklmnopqrst"!=i(l({},e)).join("")})?function(t,e){for(var n=c(t),o=arguments.length,l=1,f=s.f,p=a.f;o>l;)for(var h,d=u(arguments[l++]),b=f?i(d).concat(f(d)):i(d),g=b.length,m=0;g>m;)h=b[m++],r&&!p.call(d,h)||(n[h]=d[h]);return n}:l},function(t,e,n){"use strict";var r=n(35),o=n(27),i=n(65),s=n(64),a=n(33),c=n(168),u=n(36);t.exports=function(t){var e,n,l,f,p=o(t),h="function"==typeof this?this:Array,d=arguments.length,b=d>1?arguments[1]:void 0,g=void 0!==b,m=0,y=u(p);if(g&&(b=r(b,d>2?arguments[2]:void 0,2)),null==y||h==Array&&s(y))for(n=new h(e=a(p.length));e>m;m++)c(n,m,g?b(p[m],m):p[m]);else for(f=y.call(p),n=new h;!(l=f.next()).done;m++)c(n,m,g?i(f,b,[l.value,m],!0):l.value);return n.length=m,n}},function(t,e,n){"use strict";var r=n(41),o=n(14),i=n(29);t.exports=function(t,e,n){var s=r(e);s in t?o.f(t,s,i(0,n)):t[s]=n}},function(t,e,n){"use strict";var r=/[^\0-\u007E]/,o=/[.\u3002\uFF0E\uFF61]/g,i="Overflow: input needs wider integers to process",s=Math.floor,a=String.fromCharCode,c=function(t){return t+22+75*(t<26)},u=function(t,e,n){var r=0;for(t=n?s(t/700):t>>1,t+=s(t/e);t>455;r+=36)t=s(t/35);return s(r+36*t/(t+38))},l=function(t){var e,n,r=[],o=(t=function(t){for(var e=[],n=0,r=t.length;n<r;){var o=t.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){var i=t.charCodeAt(n++);56320==(64512&i)?e.push(((1023&o)<<10)+(1023&i)+65536):(e.push(o),n--)}else e.push(o)}return e}(t)).length,l=128,f=0,p=72;for(e=0;e<t.length;e++)(n=t[e])<128&&r.push(a(n));var h=r.length,d=h;for(h&&r.push("-");d<o;){var b=2147483647;for(e=0;e<t.length;e++)(n=t[e])>=l&&n<b&&(b=n);var g=d+1;if(b-l>s((2147483647-f)/g))throw RangeError(i);for(f+=(b-l)*g,l=b,e=0;e<t.length;e++){if((n=t[e])<l&&++f>2147483647)throw RangeError(i);if(n==l){for(var m=f,y=36;;y+=36){var v=y<=p?1:y>=p+26?26:y-p;if(m<v)break;var w=m-v,O=36-v;r.push(a(c(v+w%O))),m=s(w/O)}r.push(a(c(m))),p=u(f,g,d==h),f=0,++d}}++f,++l}return r.join("")};t.exports=function(t){var e,n,i=[],s=t.toLowerCase().replace(o,".").split(".");for(e=0;e<s.length;e++)n=s[e],i.push(r.test(n)?"xn--"+l(n):n);return i.join(".")}},function(t,e,n){"use strict";n(4);var r=n(13),o=n(89),i=n(15),s=n(63),a=n(23),c=n(74),u=n(17),l=n(47),f=n(7),p=n(35),h=n(3),d=n(11),b=n(171),g=n(36),m=n(1)("iterator"),y=u.set,v=u.getterFor("URLSearchParams"),w=u.getterFor("URLSearchParamsIterator"),O=/\+/g,x=Array(4),j=function(t){return x[t-1]||(x[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},k=function(t){try{return decodeURIComponent(t)}catch(e){return t}},S=function(t){var e=t.replace(O," "),n=4;try{return decodeURIComponent(e)}catch(t){for(;n;)e=e.replace(j(n--),k);return e}},A=/[!'()~]|%20/g,E={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},T=function(t){return E[t]},P=function(t){return encodeURIComponent(t).replace(A,T)},_=function(t,e){if(e)for(var n,r,o=e.split("&"),i=0;i<o.length;)(n=o[i++]).length&&(r=n.split("="),t.push({key:S(r.shift()),value:S(r.join("="))}))},I=function(t){this.entries.length=0,_(this.entries,t)},F=function(t,e){if(t<e)throw TypeError("Not enough arguments")},C=c(function(t,e){y(this,{type:"URLSearchParamsIterator",iterator:b(v(t).entries),kind:e})},"Iterator",function(){var t=w(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n}),N=function(){l(this,N,"URLSearchParams");var t,e,n,r,o,i,s,a=arguments.length>0?arguments[0]:void 0,c=this,u=[];if(y(c,{type:"URLSearchParams",entries:u,updateURL:function(){},updateSearchParams:I}),void 0!==a)if(d(a))if("function"==typeof(t=g(a)))for(e=t.call(a);!(n=e.next()).done;){if((o=(r=b(h(n.value))).next()).done||(i=r.next()).done||!r.next().done)throw TypeError("Expected sequence with length 2");u.push({key:o.value+"",value:i.value+""})}else for(s in a)f(a,s)&&u.push({key:s,value:a[s]+""});else _(u,"string"==typeof a?"?"===a.charAt(0)?a.slice(1):a:a+"")},$=N.prototype;s($,{append:function(t,e){F(arguments.length,2);var n=v(this);n.entries.push({key:t+"",value:e+""}),n.updateURL()},delete:function(t){F(arguments.length,1);for(var e=v(this),n=e.entries,r=t+"",o=0;o<n.length;)n[o].key===r?n.splice(o,1):o++;e.updateURL()},get:function(t){F(arguments.length,1);for(var e=v(this).entries,n=t+"",r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){F(arguments.length,1);for(var e=v(this).entries,n=t+"",r=[],o=0;o<e.length;o++)e[o].key===n&&r.push(e[o].value);return r},has:function(t){F(arguments.length,1);for(var e=v(this).entries,n=t+"",r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){F(arguments.length,1);for(var n,r=v(this),o=r.entries,i=!1,s=t+"",a=e+"",c=0;c<o.length;c++)(n=o[c]).key===s&&(i?o.splice(c--,1):(i=!0,n.value=a));i||o.push({key:s,value:a}),r.updateURL()},sort:function(){var t,e,n,r=v(this),o=r.entries,i=o.slice();for(o.length=0,n=0;n<i.length;n++){for(t=i[n],e=0;e<n;e++)if(o[e].key>t.key){o.splice(e,0,t);break}e===n&&o.push(t)}r.updateURL()},forEach:function(t){for(var e,n=v(this).entries,r=p(t,arguments.length>1?arguments[1]:void 0,3),o=0;o<n.length;)r((e=n[o++]).value,e.key,this)},keys:function(){return new C(this,"keys")},values:function(){return new C(this,"values")},entries:function(){return new C(this,"entries")}},{enumerable:!0}),i($,m,$.entries),i($,"toString",function(){for(var t,e=v(this).entries,n=[],r=0;r<e.length;)t=e[r++],n.push(P(t.key)+"="+P(t.value));return n.join("&")},{enumerable:!0}),a(N,"URLSearchParams"),r({global:!0,forced:!o},{URLSearchParams:N}),t.exports={URLSearchParams:N,getState:v}},function(t,e,n){var r=n(3),o=n(36);t.exports=function(t){var e=o(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return r(e.call(t))}}]);
//# sourceMappingURL=cvat-core.min.js.map