@verdocs/web-sdk 2.3.10 → 2.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{EnvelopeStore-f8c301e1.js → EnvelopeStore-efc35530.js} +1 -1
- package/dist/cjs/{Envelopes-99ca79fe.js → Envelopes-0b9deb2c.js} +2 -6
- package/dist/cjs/{TemplateStore-1adfba8c.js → TemplateStore-17b9fdfe.js} +1 -1
- package/dist/cjs/{VerdocsEndpoint-b9ed9603.js → VerdocsEndpoint-8f298664.js} +6 -191
- package/dist/cjs/interact.min-a61b43b3.js +12 -0
- package/dist/cjs/ipc-test.cjs.entry.js +2 -2
- package/dist/cjs/{utils-a3f0b70a.js → utils-0916d10f.js} +1 -1
- package/dist/cjs/verdocs-activity-box.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-contact-picker_3.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-attachment.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-date.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-preview_8.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-view.cjs.entry.js +3 -3
- package/dist/components/Envelopes.js +2 -6
- package/dist/components/VerdocsEndpoint.js +6 -191
- package/dist/components/interact.min.js +2 -2
- package/dist/docs.json +1 -1
- package/dist/esm/{EnvelopeStore-15cc99ef.js → EnvelopeStore-17c0bc52.js} +1 -1
- package/dist/esm/{Envelopes-21ffb899.js → Envelopes-627c5239.js} +2 -6
- package/dist/esm/{TemplateStore-09d1ae9f.js → TemplateStore-ad77a294.js} +1 -1
- package/dist/esm/{VerdocsEndpoint-3add43eb.js → VerdocsEndpoint-56fa3371.js} +6 -191
- package/dist/esm/interact.min-6a7b19a1.js +10 -0
- package/dist/esm/ipc-test.entry.js +2 -2
- package/dist/esm/{utils-e0ce2c22.js → utils-ca3121df.js} +1 -1
- package/dist/esm/verdocs-activity-box.entry.js +2 -2
- package/dist/esm/verdocs-auth.entry.js +1 -1
- package/dist/esm/verdocs-build.entry.js +2 -2
- package/dist/esm/verdocs-button-panel_2.entry.js +2 -2
- package/dist/esm/verdocs-contact-picker_3.entry.js +3 -3
- package/dist/esm/verdocs-envelope-document-page.entry.js +3 -3
- package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +3 -3
- package/dist/esm/verdocs-envelope-sidebar.entry.js +3 -3
- package/dist/esm/verdocs-envelopes-list.entry.js +3 -3
- package/dist/esm/verdocs-field-attachment.entry.js +2 -2
- package/dist/esm/verdocs-field-checkbox.entry.js +2 -2
- package/dist/esm/verdocs-field-date.entry.js +2 -2
- package/dist/esm/verdocs-field-dropdown.entry.js +2 -2
- package/dist/esm/verdocs-field-initial.entry.js +2 -2
- package/dist/esm/verdocs-field-payment.entry.js +2 -2
- package/dist/esm/verdocs-field-radio-button.entry.js +2 -2
- package/dist/esm/verdocs-field-signature.entry.js +2 -2
- package/dist/esm/verdocs-field-textarea.entry.js +4 -4
- package/dist/esm/verdocs-field-textbox.entry.js +4 -4
- package/dist/esm/verdocs-field-timestamp.entry.js +2 -2
- package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm/verdocs-pagination_2.entry.js +2 -2
- package/dist/esm/verdocs-preview_8.entry.js +4 -4
- package/dist/esm/verdocs-quick-functions_2.entry.js +1 -1
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-settings-api-keys_4.entry.js +3 -3
- package/dist/esm/verdocs-settings.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +3 -3
- package/dist/esm/verdocs-template-document-page_2.entry.js +3 -3
- package/dist/esm/verdocs-template-fields_4.entry.js +5 -5
- package/dist/esm/verdocs-template-star.entry.js +1 -1
- package/dist/esm/verdocs-templates-list.entry.js +1 -1
- package/dist/esm/verdocs-view.entry.js +3 -3
- package/dist/esm-es5/{EnvelopeStore-15cc99ef.js → EnvelopeStore-17c0bc52.js} +1 -1
- package/dist/esm-es5/Envelopes-627c5239.js +1 -0
- package/dist/esm-es5/{TemplateStore-09d1ae9f.js → TemplateStore-ad77a294.js} +1 -1
- package/dist/esm-es5/VerdocsEndpoint-56fa3371.js +1 -0
- package/dist/esm-es5/interact.min-6a7b19a1.js +1 -0
- package/dist/esm-es5/ipc-test.entry.js +1 -1
- package/dist/esm-es5/{utils-e0ce2c22.js → utils-ca3121df.js} +2 -2
- package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/verdocs-web-sdk/{p-ee159b14.js → p-02a71e03.js} +1 -1
- package/dist/verdocs-web-sdk/{p-15b3184c.entry.js → p-035a3ce2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-035f6b38.js +1 -0
- package/dist/verdocs-web-sdk/{p-8f8504e2.entry.js → p-05e6bc91.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-dcb0e6ae.system.entry.js → p-0685d939.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-45bc9865.system.entry.js → p-0abf0058.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7bad61b5.system.entry.js → p-17598002.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b70ad4db.system.entry.js → p-17bf98f2.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3edde2fa.entry.js → p-1a7aa04b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-87040b70.system.entry.js → p-1c08edf7.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f2aec486.system.entry.js → p-1cb878c8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ff80d211.system.entry.js → p-1e38b22f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ebc4142c.js → p-1f78be32.js} +1 -1
- package/dist/verdocs-web-sdk/{p-992f92f4.entry.js → p-22e0d2bc.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c4140ec7.entry.js → p-2ccbf54d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-319c00bd.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-1eb38c2e.entry.js → p-37dfdc84.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9b66a84a.system.entry.js → p-3f3807b0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b63fb3e8.entry.js → p-410c63e6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7b3fed68.entry.js → p-46624bec.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-13936429.system.entry.js → p-4d98f194.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-120f75b1.entry.js → p-4e47ed1c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5f736f85.system.entry.js → p-59769c39.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-459510cf.entry.js → p-6331d113.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3950200c.entry.js → p-637187de.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f368f4f3.system.entry.js → p-6685ff29.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a4cec3d0.system.entry.js → p-6dd69d82.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f7510858.system.entry.js → p-736fbb87.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f5778ebb.entry.js → p-746fce21.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c9ad6362.entry.js → p-76f8c30a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-76cadb98.system.entry.js → p-79168c6a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2fc54023.system.entry.js → p-7b30c523.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5d1fecb5.system.js → p-82b5e475.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a1ef2dd4.entry.js → p-82d4afbf.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b0bf091c.system.js → p-840827b7.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6ce14c63.entry.js → p-85df0da6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0d4739c4.system.entry.js → p-870707e8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-8aae8d16.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-8e0d6152.system.entry.js → p-8af68516.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-33077795.entry.js → p-8b0a5309.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-915883e6.js +1 -0
- package/dist/verdocs-web-sdk/{p-16849f44.system.entry.js → p-9360b085.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c8135ff6.entry.js → p-94009f45.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7e8d64fb.system.js → p-9615b087.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-13ae6d98.system.entry.js → p-9a5c0882.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-9bf2d124.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-d8fc5f12.system.entry.js → p-9ceff040.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b33ab87b.entry.js → p-9d2995a9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-318a7887.entry.js → p-9fc06f7b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2ec8a9be.entry.js → p-a40b3946.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a4749aeb.system.entry.js → p-ab98a02d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-026eb575.system.entry.js → p-ac98f6f1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-52cd4ee2.system.entry.js → p-acc873cf.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e7755198.entry.js → p-ae83f4a0.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-048cfdb5.system.entry.js → p-b467d981.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-387580cd.system.entry.js → p-b6231fd3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5ba1045a.system.entry.js → p-b648ab63.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c58916d2.system.entry.js → p-b7a815e9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-30fecb02.entry.js → p-b91de346.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d0acae0f.system.entry.js → p-ba653c39.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-eccbfc3a.entry.js → p-c80237f9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-73cbe09b.entry.js → p-cf703fe4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c50a3992.entry.js → p-d0a09719.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e5cf9dd1.system.entry.js → p-d39e4a26.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ed639a7c.entry.js → p-d59b6988.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4490750d.entry.js → p-d61fda4b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-393a9a2a.system.entry.js → p-d99a05e4.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-532e4fc1.entry.js → p-da3faf4a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-dc2ad047.js +1 -0
- package/dist/verdocs-web-sdk/{p-686139a0.entry.js → p-dd2c2edc.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f07340cd.entry.js → p-e1bc55f8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-32b26f8f.system.entry.js → p-e28878eb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-e2ff37fb.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-315e20ac.system.entry.js → p-e4dc3264.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-66507ccf.entry.js → p-e760f894.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9aff3ff0.entry.js → p-eeca4c30.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-e429f3bd.js → p-f3dde708.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a7134b10.entry.js → p-f42c84f1.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f83a0c6e.system.entry.js → p-f6b7439f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b4c4335f.system.entry.js → p-fe67b620.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +4 -4
- package/dist/cjs/interact.min-7c05ff8a.js +0 -12
- package/dist/esm/interact.min-ef5402f3.js +0 -10
- package/dist/esm-es5/Envelopes-21ffb899.js +0 -1
- package/dist/esm-es5/VerdocsEndpoint-3add43eb.js +0 -1
- package/dist/esm-es5/interact.min-ef5402f3.js +0 -1
- package/dist/verdocs-web-sdk/p-0bf08021.js +0 -1
- package/dist/verdocs-web-sdk/p-0cf6b69a.system.js +0 -1
- package/dist/verdocs-web-sdk/p-2ccbcfeb.system.js +0 -1
- package/dist/verdocs-web-sdk/p-5a91bf23.js +0 -1
- package/dist/verdocs-web-sdk/p-999fbe79.js +0 -1
- package/dist/verdocs-web-sdk/p-a4e0b977.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-fcd0a40a.system.js +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-54498887.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.d}],execute:function(){var r=this;e({T:void 0,a:void 0});var n;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(n||(n={}));var i;(function(e){e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(i||(i={}));var o=e("c",(function(e,t,r){var n,o;if(!r&&!t.includes("create")){return{canPerform:false,message:"Missing required template object"}}var s=(e===null||e===void 0?void 0:e.profile_id)||"BOGUS";var u=(e===null||e===void 0?void 0:e.organization_id)||"BOGUS";if(!s){return{canPerform:false,message:"Active session required"}}var c=(r===null||r===void 0?void 0:r.profile_id)===s;var f=(r===null||r===void 0?void 0:r.organization_id)===u;var l=(n=r===null||r===void 0?void 0:r.is_personal)!==null&&n!==void 0?n:false;var d=(o=r===null||r===void 0?void 0:r.is_public)!==null&&o!==void 0?o:false;var p=[];switch(t){case"create_personal":p.push(i.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":p.push(i.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":p.push(i.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":if(!c){if(!l&&f||!d){p.push(i.TEMPLATE_MEMBER_READ)}}break;case"write":if(!c){p.push(i.TEMPLATE_MEMBER_READ);p.push(i.TEMPLATE_MEMBER_WRITE)}break;case"change_visibility_personal":if(c){p.push(i.TEMPLATE_CREATOR_CREATE_PERSONAL)}else{p.push(i.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_org":if(c){p.push(i.TEMPLATE_CREATOR_CREATE_ORG)}else{p.push(i.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_public":if(c){p.push(i.TEMPLATE_CREATOR_CREATE_PUBLIC);p.push(i.TEMPLATE_CREATOR_VISIBILITY)}else{p.push(i.TEMPLATE_MEMBER_VISIBILITY)}break;case"delete":if(c){p.push(i.TEMPLATE_CREATOR_DELETE)}else{p.push(i.TEMPLATE_MEMBER_DELETE)}break;default:return{canPerform:false,message:"Action is not defined"}}if(a(e,p)){return{canPerform:true,message:""}}return{canPerform:false,message:"Insufficient access to perform '".concat(t,"'. Needed permissions: ").concat(p.toString())}}));var a=function(e,t){return t.every((function(t){return((e===null||e===void 0?void 0:e.permissions)||[]).includes(t)}))};var s=undefined&&undefined.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())}))};var u=undefined&&undefined.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(n=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var c=e("g",(function(e,t){return e.api.get("/templates/".concat(t)).then((function(e){return e.data}))}));var f=["name","is_personal","is_public","sender","description","roles","fields"];var l=e("b",(function(e,t,r){var n={timeout:12e4,onUploadProgress:function(e){var t=e.total||1;var n=e.loaded||0;r===null||r===void 0?void 0:r(Math.floor(n*100/(t||1)),n,t||1)}};if(t.documents&&t.documents[0]instanceof File){var i=new FormData;f.forEach((function(e){if(t[e]!==undefined){i.append(e,t[e])}}));t.documents.forEach((function(e){i.append("documents",e,e.name)}));return e.api.post("/v2/templates",i,n).then((function(e){return e.data}))}else{return e.api.post("/v2/templates",t,n).then((function(e){return e.data}))}}));var d=e("u",(function(e,t,r){return e.api.put("/templates/".concat(t),r).then((function(e){return e.data}))}));var p=e("d",(function(e,t){return e.api.delete("/templates/".concat(t)).then((function(e){return e.data}))}));var h;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(h||(h={}));var v=e("l",(function(e,t){if(t===void 0){t={}}return s(void 0,void 0,void 0,(function(){return u(this,(function(r){return[2,e.api.post("/templates/list",t).then((function(e){return e.data}))]}))}))}));var E;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(E||(E=e("T",{})));var m;(function(e){e["CREATE_PERSONAL"]="create_personal";e["CREATE_ORG"]="create_org";e["CREATE_PUBLIC"]="create_public";e["READ"]="read";e["WRITE"]="write";e["DELETE"]="delete";e["CHANGE_VISIBILITY_PERSONAL"]="change_visibility_personal";e["CHANGE_VISIBILITY_ORG"]="change_visibility_org";e["CHANGE_VISIBILITY_PUBLIC"]="change_visibility_public"})(m||(m=e("a",{})));var _;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(_||(_={}));var R;(function(e){e["RCOMMON"]="rcommon:access";e["RFORM_ACCESS"]="rform:access";e["ORG_CREATE"]="org:create";e["ORG_VIEW"]="org:view";e["ORG_UPDATE"]="org:update";e["ORG_DELETE"]="org:delete";e["ORG_TRANSFER"]="org:transfer";e["ORG_LIST"]="org:list";e["OWNER_ADD"]="owner:add";e["OWNER_REMOVE"]="owner:remove";e["ADMIN_ADD"]="admin:add";e["ADMIN_REMOVE"]="admin:remove";e["MEMBER_VIEW"]="member:view";e["MEMBER_ADD"]="member:add";e["MEMBER_REMOVE"]="member:remove";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(R||(R={}));var y;(function(e){e["ENV_ESSENTIAL"]="env:essential";e["ORG_STANDARD"]="org:standard"})(y||(y={}));var T;(function(e){e["OWNER"]="owner";e["BASIC_USER"]="basic_user";e["MEMBER"]="member"})(T||(T={}));var g=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);var b=function(e){return!g.has(e&&e.code)};var A="axios-retry";function O(e){var t=["ERR_CANCELED","ECONNABORTED"];if(e.response){return false}if(!e.code){return false}if(t.includes(e.code)){return false}return b(e)}var w=["get","head","options"];var S=w.concat(["put","delete"]);function C(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status>=500&&e.response.status<=599)}function L(e){var t;if(!((t=e.config)===null||t===void 0?void 0:t.method)){return false}return C(e)&&w.indexOf(e.config.method)!==-1}function N(e){var t;if(!((t=e.config)===null||t===void 0?void 0:t.method)){return false}return C(e)&&S.indexOf(e.config.method)!==-1}function I(e){return O(e)||N(e)}function P(){return 0}function D(e,t,r){if(e===void 0){e=0}if(t===void 0){t=undefined}if(r===void 0){r=100}var n=Math.pow(2,e)*r;var i=n*.2*Math.random();return n+i}var M={retries:3,retryCondition:I,retryDelay:P,shouldResetTimeout:false,onRetry:function(){}};function U(e,t){return __assign(__assign(__assign({},M),t),e[A])}function B(e,t){var r=U(e,t||{});r.retryCount=r.retryCount||0;r.lastRequestTime=r.lastRequestTime||Date.now();e[A]=r;return r}function j(e,t){if(e.defaults.agent===t.agent){delete t.agent}if(e.defaults.httpAgent===t.httpAgent){delete t.httpAgent}if(e.defaults.httpsAgent===t.httpsAgent){delete t.httpsAgent}}function x(e,t){return s(this,void 0,void 0,(function(){var r,n,i,o,a;return u(this,(function(s){switch(s.label){case 0:r=e.retries,n=e.retryCondition;i=(e.retryCount||0)<r&&n(t);if(!(typeof i==="object"))return[3,4];s.label=1;case 1:s.trys.push([1,3,,4]);return[4,i];case 2:o=s.sent();return[2,o!==false];case 3:a=s.sent();return[2,false];case 4:return[2,i]}}))}))}var F=function(e,t){var n=e.interceptors.request.use((function(e){B(e,t);return e}));var i=e.interceptors.response.use(null,(function(n){return s(r,void 0,void 0,(function(){var r,i,o,a,s,c,f,l;return u(this,(function(u){switch(u.label){case 0:r=n.config;if(!r){return[2,Promise.reject(n)]}i=B(r,t);return[4,x(i,n)];case 1:if(!u.sent())return[3,3];i.retryCount+=1;o=i.retryDelay,a=i.shouldResetTimeout,s=i.onRetry;c=o(i.retryCount,n);j(e,r);if(!a&&r.timeout&&i.lastRequestTime){f=Date.now()-i.lastRequestTime;l=r.timeout-f-c;if(l<=0){return[2,Promise.reject(n)]}r.timeout=l}r.transformRequest=[function(e){return e}];return[4,s(i.retryCount,n,r)];case 2:u.sent();return[2,new Promise((function(t){setTimeout((function(){return t(e(r))}),c)}))];case 3:return[2,Promise.reject(n)]}}))}))}));return{requestInterceptorId:n,responseInterceptorId:i}};F.isNetworkError=O;F.isSafeRequestError=L;F.isIdempotentRequestError=N;F.isNetworkOrIdempotentRequestError=I;F.exponentialDelay=D;F.isRetryableError=C;function k(e,t){return function r(){return e.apply(t,arguments)}}var q=Object.prototype.toString;var G=Object.getPrototypeOf;var V=function(e){return function(t){var r=q.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var z=function(e){e=e.toLowerCase();return function(t){return V(t)===e}};var H=function(e){return function(t){return typeof t===e}};var J=Array.isArray;var K=H("undefined");function W(e){return e!==null&&!K(e)&&e.constructor!==null&&!K(e.constructor)&&$(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Y=z("ArrayBuffer");function X(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&Y(e.buffer)}return t}var Z=H("string");var $=H("function");var Q=H("number");var ee=function(e){return e!==null&&typeof e==="object"};var te=function(e){return e===true||e===false};var re=function(e){if(V(e)!=="object"){return false}var t=G(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var ne=z("Date");var ie=z("File");var oe=z("Blob");var ae=z("FileList");var se=function(e){return ee(e)&&$(e.pipe)};var ue=function(e){var t;return e&&(typeof FormData==="function"&&e instanceof FormData||$(e.append)&&((t=V(e))==="formdata"||t==="object"&&$(e.toString)&&e.toString()==="[object FormData]"))};var ce=z("URLSearchParams");var fe=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function le(e,t,r){var n=r===void 0?{}:r,i=n.allOwnKeys,o=i===void 0?false:i;if(e===null||typeof e==="undefined"){return}var a;var s;if(typeof e!=="object"){e=[e]}if(J(e)){for(a=0,s=e.length;a<s;a++){t.call(null,e[a],a,e)}}else{var u=o?Object.getOwnPropertyNames(e):Object.keys(e);var c=u.length;var f=void 0;for(a=0;a<c;a++){f=u[a];t.call(null,e[f],f,e)}}}function de(e,t){t=t.toLowerCase();var r=Object.keys(e);var n=r.length;var i;while(n-- >0){i=r[n];if(t===i.toLowerCase()){return i}}return null}var pe=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var he=function(e){return!K(e)&&e!==pe};function ve(){var e=(he(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&de(t,n)||n;if(re(t[i])&&re(r)){t[i]=ve(t[i],r)}else if(re(r)){t[i]=ve({},r)}else if(J(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&le(arguments[n],r)}return t}var Ee=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;le(t,(function(t,n){if(r&&$(t)){e[n]=k(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var me=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var _e=function(e,t,r,n){e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)};var Re=function(e,t,r,n){var i;var o;var a;var s={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);o=i.length;while(o-- >0){a=i[o];if((!n||n(a,e,t))&&!s[a]){t[a]=e[a];s[a]=true}}e=r!==false&&G(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var ye=function(e,t,r){e=String(e);if(r===undefined||r>e.length){r=e.length}r-=t.length;var n=e.indexOf(t,r);return n!==-1&&n===r};var Te=function(e){if(!e)return null;if(J(e))return e;var t=e.length;if(!Q(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var ge=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&G(Uint8Array));var be=function(e,t){var r=e&&e[Symbol.iterator];var n=r.call(e);var i;while((i=n.next())&&!i.done){var o=i.value;t.call(e,o[0],o[1])}};var Ae=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var Oe=z("HTMLFormElement");var we=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var Se=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var Ce=z("RegExp");var Le=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};le(r,(function(r,i){var o;if((o=t(r,i,e))!==false){n[i]=o||r}}));Object.defineProperties(e,n)};var Ne=function(e){Le(e,(function(t,r){if($(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!$(n))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}}}))};var Ie=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};J(e)?n(e):n(String(e).split(t));return r};var Pe=function(){};var De=function(e,t){e=+e;return Number.isFinite(e)?e:t};var Me="abcdefghijklmnopqrstuvwxyz";var Ue="0123456789";var Be={DIGIT:Ue,ALPHA:Me,ALPHA_DIGIT:Me+Me.toUpperCase()+Ue};var je=function(e,t){if(e===void 0){e=16}if(t===void 0){t=Be.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function xe(e){return!!(e&&$(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var Fe=function(e){var t=new Array(10);var r=function(e,n){if(ee(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=J(e)?[]:{};le(e,(function(e,t){var o=r(e,n+1);!K(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var ke=z("AsyncFunction");var qe=function(e){return e&&(ee(e)||$(e))&&$(e.then)&&$(e.catch)};var Ge={isArray:J,isArrayBuffer:Y,isBuffer:W,isFormData:ue,isArrayBufferView:X,isString:Z,isNumber:Q,isBoolean:te,isObject:ee,isPlainObject:re,isUndefined:K,isDate:ne,isFile:ie,isBlob:oe,isRegExp:Ce,isFunction:$,isStream:se,isURLSearchParams:ce,isTypedArray:ge,isFileList:ae,forEach:le,merge:ve,extend:Ee,trim:fe,stripBOM:me,inherits:_e,toFlatObject:Re,kindOf:V,kindOfTest:z,endsWith:ye,toArray:Te,forEachEntry:be,matchAll:Ae,isHTMLForm:Oe,hasOwnProperty:Se,hasOwnProp:Se,reduceDescriptors:Le,freezeMethods:Ne,toObjectSet:Ie,toCamelCase:we,noop:Pe,toFiniteNumber:De,findKey:de,global:pe,isContextDefined:he,ALPHABET:Be,generateString:je,isSpecCompliantForm:xe,toJSONObject:Fe,isAsyncFn:ke,isThenable:qe};function Ve(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);i&&(this.response=i)}Ge.inherits(Ve,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ge.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var ze=Ve.prototype;var He={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){He[e]={value:e}}));Object.defineProperties(Ve,He);Object.defineProperty(ze,"isAxiosError",{value:true});Ve.from=function(e,t,r,n,i,o){var a=Object.create(ze);Ge.toFlatObject(e,a,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));Ve.call(a,e.message,t,r,n,i);a.cause=e;a.name=e.name;o&&Object.assign(a,o);return a};var Je=null;function Ke(e){return Ge.isPlainObject(e)||Ge.isArray(e)}function We(e){return Ge.endsWith(e,"[]")?e.slice(0,-2):e}function Ye(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=We(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function Xe(e){return Ge.isArray(e)&&!e.some(Ke)}var Ze=Ge.toFlatObject(Ge,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function $e(e,t,r){if(!Ge.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=Ge.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!Ge.isUndefined(r[t])}));var n=r.metaTokens;var i=r.visitor||f;var o=r.dots;var a=r.indexes;var s=r.Blob||typeof Blob!=="undefined"&&Blob;var u=s&&Ge.isSpecCompliantForm(t);if(!Ge.isFunction(i)){throw new TypeError("visitor must be a function")}function c(e){if(e===null)return"";if(Ge.isDate(e)){return e.toISOString()}if(!u&&Ge.isBlob(e)){throw new Ve("Blob is not supported. Use a Buffer instead.")}if(Ge.isArrayBuffer(e)||Ge.isTypedArray(e)){return u&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function f(e,r,i){var s=e;if(e&&!i&&typeof e==="object"){if(Ge.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(Ge.isArray(e)&&Xe(e)||(Ge.isFileList(e)||Ge.endsWith(r,"[]"))&&(s=Ge.toArray(e))){r=We(r);s.forEach((function e(n,i){!(Ge.isUndefined(n)||n===null)&&t.append(a===true?Ye([r],i,o):a===null?r:r+"[]",c(n))}));return false}}if(Ke(e)){return true}t.append(Ye(i,r,o),c(e));return false}var l=[];var d=Object.assign(Ze,{defaultVisitor:f,convertValue:c,isVisitable:Ke});function p(e,r){if(Ge.isUndefined(e))return;if(l.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}l.push(e);Ge.forEach(e,(function e(n,o){var a=!(Ge.isUndefined(n)||n===null)&&i.call(t,n,Ge.isString(o)?o.trim():o,r,d);if(a===true){p(n,r?r.concat(o):[o])}}));l.pop()}if(!Ge.isObject(e)){throw new TypeError("data must be an object")}p(e);return t}function Qe(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function e(r){return t[r]}))}function et(e,t){this._pairs=[];e&&$e(e,this,t)}var tt=et.prototype;tt.append=function e(t,r){this._pairs.push([t,r])};tt.toString=function e(t){var r=t?function(e){return t.call(this,e,Qe)}:Qe;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function rt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function nt(e,t,r){if(!t){return e}var n=r&&r.encode||rt;var i=r&&r.serialize;var o;if(i){o=i(t,r)}else{o=Ge.isURLSearchParams(t)?t.toString():new et(t,r).toString(n)}if(o){var a=e.indexOf("#");if(a!==-1){e=e.slice(0,a)}e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var it=function(){function e(){this.handlers=[]}e.prototype.use=function(e,t,r){this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:false,runWhen:r?r.runWhen:null});return this.handlers.length-1};e.prototype.eject=function(e){if(this.handlers[e]){this.handlers[e]=null}};e.prototype.clear=function(){if(this.handlers){this.handlers=[]}};e.prototype.forEach=function(e){Ge.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var ot={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var at=typeof URLSearchParams!=="undefined"?URLSearchParams:et;var st=typeof FormData!=="undefined"?FormData:null;var ut=typeof Blob!=="undefined"?Blob:null;var ct={isBrowser:true,classes:{URLSearchParams:at,FormData:st,Blob:ut},protocols:["http","https","file","blob","url","data"]};var ft=typeof window!=="undefined"&&typeof document!=="undefined";var lt=function(e){return ft&&["ReactNative","NativeScript","NS"].indexOf(e)<0}(typeof navigator!=="undefined"&&navigator.product);var dt=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var pt=Object.freeze({__proto__:null,hasBrowserEnv:ft,hasStandardBrowserWebWorkerEnv:dt,hasStandardBrowserEnv:lt});var ht=__assign(__assign({},pt),ct);function vt(e,t){return $e(e,new ht.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){if(ht.isNode&&Ge.isBuffer(e)){this.append(t,e.toString("base64"));return false}return n.defaultVisitor.apply(this,arguments)}},t))}function Et(e){return Ge.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function mt(e){var t={};var r=Object.keys(e);var n;var i=r.length;var o;for(n=0;n<i;n++){o=r[n];t[o]=e[o]}return t}function _t(e){function t(e,r,n,i){var o=e[i++];var a=Number.isFinite(+o);var s=i>=e.length;o=!o&&Ge.isArray(n)?n.length:o;if(s){if(Ge.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!a}if(!n[o]||!Ge.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&Ge.isArray(n[o])){n[o]=mt(n[o])}return!a}if(Ge.isFormData(e)&&Ge.isFunction(e.entries)){var r={};Ge.forEachEntry(e,(function(e,n){t(Et(e),n,r,0)}));return r}return null}function Rt(e,t,r){if(Ge.isString(e)){try{(t||JSON.parse)(e);return Ge.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var yt={transitional:ot,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=Ge.isObject(t);if(o&&Ge.isHTMLForm(t)){t=new FormData(t)}var a=Ge.isFormData(t);if(a){if(!i){return t}return i?JSON.stringify(_t(t)):t}if(Ge.isArrayBuffer(t)||Ge.isBuffer(t)||Ge.isStream(t)||Ge.isFile(t)||Ge.isBlob(t)){return t}if(Ge.isArrayBufferView(t)){return t.buffer}if(Ge.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}var s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){return vt(t,this.formSerializer).toString()}if((s=Ge.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return $e(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return Rt(t)}return t}],transformResponse:[function e(t){var r=this.transitional||yt.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&Ge.isString(t)&&(n&&!this.responseType||i)){var o=r&&r.silentJSONParsing;var a=!o&&i;try{return JSON.parse(t)}catch(e){if(a){if(e.name==="SyntaxError"){throw Ve.from(e,Ve.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ht.classes.FormData,Blob:ht.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};Ge.forEach(["delete","get","head","post","put","patch"],(function(e){yt.headers[e]={}}));var Tt=Ge.toObjectSet(["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"]);var gt=function(e){var t={};var r;var n;var i;e&&e.split("\n").forEach((function e(o){i=o.indexOf(":");r=o.substring(0,i).trim().toLowerCase();n=o.substring(i+1).trim();if(!r||t[r]&&Tt[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(n)}else{t[r]=[n]}}else{t[r]=t[r]?t[r]+", "+n:n}}));return t};var bt=Symbol("internals");function At(e){return e&&String(e).trim().toLowerCase()}function Ot(e){if(e===false||e==null){return e}return Ge.isArray(e)?e.map(Ot):String(e)}function wt(e){var t=Object.create(null);var r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;var n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}var St=function(e){return/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())};function Ct(e,t,r,n,i){if(Ge.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!Ge.isString(t))return;if(Ge.isString(n)){return t.indexOf(n)!==-1}if(Ge.isRegExp(n)){return n.test(t)}}function Lt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function Nt(e,t){var r=Ge.toCamelCase(" "+t);["get","set","has"].forEach((function(n){Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:true})}))}var It=function(){function e(e){e&&this.set(e)}e.prototype.set=function(e,t,r){var n=this;function i(e,t,r){var i=At(t);if(!i){throw new Error("header name must be a non-empty string")}var o=Ge.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=Ot(e)}}var o=function(e,t){return Ge.forEach(e,(function(e,r){return i(e,r,t)}))};if(Ge.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(Ge.isString(e)&&(e=e.trim())&&!St(e)){o(gt(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=At(e);if(e){var r=Ge.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return wt(n)}if(Ge.isFunction(t)){return t.call(this,n,r)}if(Ge.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=At(e);if(e){var r=Ge.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||Ct(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=At(e);if(e){var i=Ge.findKey(r,e);if(i&&(!t||Ct(r,r[i],i,t))){delete r[i];n=true}}}if(Ge.isArray(e)){e.forEach(i)}else{i(e)}return n};e.prototype.clear=function(e){var t=Object.keys(this);var r=t.length;var n=false;while(r--){var i=t[r];if(!e||Ct(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};Ge.forEach(this,(function(n,i){var o=Ge.findKey(r,i);if(o){t[o]=Ot(n);delete t[i];return}var a=e?Lt(i):String(i).trim();if(a!==i){delete t[i]}t[a]=Ot(n);r[a]=true}));return this};e.prototype.concat=function(){var e;var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}return(e=this.constructor).concat.apply(e,__spreadArray([this],t,false))};e.prototype.toJSON=function(e){var t=Object.create(null);Ge.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&Ge.isArray(r)?r.join(", "):r)}));return t};e.prototype[Symbol.iterator]=function(){return Object.entries(this.toJSON())[Symbol.iterator]()};e.prototype.toString=function(){return Object.entries(this.toJSON()).map((function(e){var t=e[0],r=e[1];return t+": "+r})).join("\n")};Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"AxiosHeaders"},enumerable:false,configurable:true});e.from=function(e){return e instanceof this?e:new this(e)};e.concat=function(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}var n=new this(e);t.forEach((function(e){return n.set(e)}));return n};e.accessor=function(e){var t=this[bt]=this[bt]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=At(e);if(!r[t]){Nt(n,e);r[t]=true}}Ge.isArray(e)?e.forEach(i):i(e);return this};return e}();It.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ge.reduceDescriptors(It.prototype,(function(e,t){var r=e.value;var n=t[0].toUpperCase()+t.slice(1);return{get:function(){return r},set:function(e){this[n]=e}}}));Ge.freezeMethods(It);function Pt(e,t){var r=this||yt;var n=t||r;var i=It.from(n.headers);var o=n.data;Ge.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function Dt(e){return!!(e&&e.__CANCEL__)}function Mt(e,t,r){Ve.call(this,e==null?"canceled":e,Ve.ERR_CANCELED,t,r);this.name="CanceledError"}Ge.inherits(Mt,Ve,{__CANCEL__:true});function Ut(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new Ve("Request failed with status code "+r.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var Bt=ht.hasStandardBrowserEnv?{write:function(e,t,r,n,i,o){var a=[e+"="+encodeURIComponent(t)];Ge.isNumber(r)&&a.push("expires="+new Date(r).toGMTString());Ge.isString(n)&&a.push("path="+n);Ge.isString(i)&&a.push("domain="+i);o===true&&a.push("secure");document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function jt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function xt(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Ft(e,t){if(e&&!jt(t)){return xt(e,t)}return t}var kt=ht.hasStandardBrowserEnv?function e(){var t=/(msie|trident)/i.test(navigator.userAgent);var r=document.createElement("a");var n;function i(e){var n=e;if(t){r.setAttribute("href",n);n=r.href}r.setAttribute("href",n);return{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}n=i(window.location.href);return function e(t){var r=Ge.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function qt(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Gt(e,t){e=e||10;var r=new Array(e);var n=new Array(e);var i=0;var o=0;var a;t=t!==undefined?t:1e3;return function s(u){var c=Date.now();var f=n[o];if(!a){a=c}r[i]=u;n[i]=c;var l=o;var d=0;while(l!==i){d+=r[l++];l=l%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(c-a<t){return}var p=f&&c-f;return p?Math.round(d*1e3/p):undefined}}function Vt(e,t){var r=0;var n=Gt(50,250);return function(i){var o=i.loaded;var a=i.lengthComputable?i.total:undefined;var s=o-r;var u=n(s);var c=o<=a;r=o;var f={loaded:o,total:a,progress:a?o/a:undefined,bytes:s,rate:u?u:undefined,estimated:u&&a&&c?(a-o)/u:undefined,event:i};f[t?"download":"upload"]=true;e(f)}}var zt=typeof XMLHttpRequest!=="undefined";var Ht=zt&&function(e){return new Promise((function t(r,n){var i=e.data;var o=It.from(e.headers).normalize();var a=e.responseType,s=e.withXSRFToken;var u;function c(){if(e.cancelToken){e.cancelToken.unsubscribe(u)}if(e.signal){e.signal.removeEventListener("abort",u)}}var f;if(Ge.isFormData(i)){if(ht.hasStandardBrowserEnv||ht.hasStandardBrowserWebWorkerEnv){o.setContentType(false)}else if((f=o.getContentType())!==false){var l=f?f.split(";").map((function(e){return e.trim()})).filter(Boolean):[],d=l[0],p=l.slice(1);o.setContentType(__spreadArray([d||"multipart/form-data"],p,true).join("; "))}}var h=new XMLHttpRequest;if(e.auth){var v=e.auth.username||"";var E=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(v+":"+E))}var m=Ft(e.baseURL,e.url);h.open(e.method.toUpperCase(),nt(m,e.params,e.paramsSerializer),true);h.timeout=e.timeout;function _(){if(!h){return}var t=It.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());var i=!a||a==="text"||a==="json"?h.responseText:h.response;var o={data:i,status:h.status,statusText:h.statusText,headers:t,config:e,request:h};Ut((function e(t){r(t);c()}),(function e(t){n(t);c()}),o);h=null}if("onloadend"in h){h.onloadend=_}else{h.onreadystatechange=function e(){if(!h||h.readyState!==4){return}if(h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)){return}setTimeout(_)}}h.onabort=function t(){if(!h){return}n(new Ve("Request aborted",Ve.ECONNABORTED,e,h));h=null};h.onerror=function t(){n(new Ve("Network Error",Ve.ERR_NETWORK,e,h));h=null};h.ontimeout=function t(){var r=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";var i=e.transitional||ot;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new Ve(r,i.clarifyTimeoutError?Ve.ETIMEDOUT:Ve.ECONNABORTED,e,h));h=null};if(ht.hasStandardBrowserEnv){s&&Ge.isFunction(s)&&(s=s(e));if(s||s!==false&&kt(m)){var R=e.xsrfHeaderName&&e.xsrfCookieName&&Bt.read(e.xsrfCookieName);if(R){o.set(e.xsrfHeaderName,R)}}}i===undefined&&o.setContentType(null);if("setRequestHeader"in h){Ge.forEach(o.toJSON(),(function e(t,r){h.setRequestHeader(r,t)}))}if(!Ge.isUndefined(e.withCredentials)){h.withCredentials=!!e.withCredentials}if(a&&a!=="json"){h.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){h.addEventListener("progress",Vt(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&h.upload){h.upload.addEventListener("progress",Vt(e.onUploadProgress))}if(e.cancelToken||e.signal){u=function(t){if(!h){return}n(!t||t.type?new Mt(null,e,h):t);h.abort();h=null};e.cancelToken&&e.cancelToken.subscribe(u);if(e.signal){e.signal.aborted?u():e.signal.addEventListener("abort",u)}}var y=qt(m);if(y&&ht.protocols.indexOf(y)===-1){n(new Ve("Unsupported protocol "+y+":",Ve.ERR_BAD_REQUEST,e));return}h.send(i||null)}))};var Jt={http:Je,xhr:Ht};Ge.forEach(Jt,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var Kt=function(e){return"- ".concat(e)};var Wt=function(e){return Ge.isFunction(e)||e===null||e===false};var Yt={getAdapter:function(e){e=Ge.isArray(e)?e:[e];var t=e.length;var r;var n;var i={};for(var o=0;o<t;o++){r=e[o];var a=void 0;n=r;if(!Wt(r)){n=Jt[(a=String(r)).toLowerCase()];if(n===undefined){throw new Ve("Unknown adapter '".concat(a,"'"))}}if(n){break}i[a||"#"+o]=n}if(!n){var s=Object.entries(i).map((function(e){var t=e[0],r=e[1];return"adapter ".concat(t," ")+(r===false?"is not supported by the environment":"is not available in the build")}));var u=t?s.length>1?"since :\n"+s.map(Kt).join("\n"):" "+Kt(s[0]):"as no adapter specified";throw new Ve("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return n},adapters:Jt};function Xt(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new Mt(null,e)}}function Zt(e){Xt(e);e.headers=It.from(e.headers);e.data=Pt.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}var t=Yt.getAdapter(e.adapter||yt.adapter);return t(e).then((function t(r){Xt(e);r.data=Pt.call(e,e.transformResponse,r);r.headers=It.from(r.headers);return r}),(function t(r){if(!Dt(r)){Xt(e);if(r&&r.response){r.response.data=Pt.call(e,e.transformResponse,r.response);r.response.headers=It.from(r.response.headers)}}return Promise.reject(r)}))}var $t=function(e){return e instanceof It?e.toJSON():e};function Qt(e,t){t=t||{};var r={};function n(e,t,r){if(Ge.isPlainObject(e)&&Ge.isPlainObject(t)){return Ge.merge.call({caseless:r},e,t)}else if(Ge.isPlainObject(t)){return Ge.merge({},t)}else if(Ge.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!Ge.isUndefined(t)){return n(e,t,r)}else if(!Ge.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!Ge.isUndefined(t)){return n(undefined,t)}}function a(e,t){if(!Ge.isUndefined(t)){return n(undefined,t)}else if(!Ge.isUndefined(e)){return n(undefined,e)}}function s(r,i,o){if(o in t){return n(r,i)}else if(o in e){return n(undefined,r)}}var u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t){return i($t(e),$t(t),true)}};Ge.forEach(Object.keys(Object.assign({},e,t)),(function n(o){var a=u[o]||i;var c=a(e[o],t[o],o);Ge.isUndefined(c)&&a!==s||(r[o]=c)}));return r}var er="1.6.2";var tr={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){tr[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var rr={};tr.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+er+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new Ve(i(n," has been removed"+(r?" in "+r:"")),Ve.ERR_DEPRECATED)}if(r&&!rr[n]){rr[n]=true;console.warn(i(n," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(e,n,o):true}};function nr(e,t,r){if(typeof e!=="object"){throw new Ve("options must be an object",Ve.ERR_BAD_OPTION_VALUE)}var n=Object.keys(e);var i=n.length;while(i-- >0){var o=n[i];var a=t[o];if(a){var s=e[o];var u=s===undefined||a(s,o,e);if(u!==true){throw new Ve("option "+o+" must be "+u,Ve.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new Ve("Unknown option "+o,Ve.ERR_BAD_OPTION)}}}var ir={assertOptions:nr,validators:tr};var or=ir.validators;var ar=function(){function e(e){this.defaults=e;this.interceptors={request:new it,response:new it}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=Qt(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){ir.assertOptions(r,{silentJSONParsing:or.transitional(or.boolean),forcedJSONParsing:or.transitional(or.boolean),clarifyTimeoutError:or.transitional(or.boolean)},false)}if(n!=null){if(Ge.isFunction(n)){t.paramsSerializer={serialize:n}}else{ir.assertOptions(n,{encode:or.function,serialize:or.function},true)}}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o=i&&Ge.merge(i.common,i[t.method]);i&&Ge.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=It.concat(o,i);var a=[];var s=true;this.interceptors.request.forEach((function e(r){if(typeof r.runWhen==="function"&&r.runWhen(t)===false){return}s=s&&r.synchronous;a.unshift(r.fulfilled,r.rejected)}));var u=[];this.interceptors.response.forEach((function e(t){u.push(t.fulfilled,t.rejected)}));var c;var f=0;var l;if(!s){var d=[Zt.bind(this),undefined];d.unshift.apply(d,a);d.push.apply(d,u);l=d.length;c=Promise.resolve(t);while(f<l){c=c.then(d[f++],d[f++])}return c}l=a.length;var p=t;f=0;while(f<l){var h=a[f++];var v=a[f++];try{p=h(p)}catch(e){v.call(this,e);break}}try{c=Zt.call(this,p)}catch(e){return Promise.reject(e)}f=0;l=u.length;while(f<l){c=c.then(u[f++],u[f++])}return c};e.prototype.getUri=function(e){e=Qt(this.defaults,e);var t=Ft(e.baseURL,e.url);return nt(t,e.params,e.paramsSerializer)};return e}();Ge.forEach(["delete","get","head","options"],(function e(t){ar.prototype[t]=function(e,r){return this.request(Qt(r||{},{method:t,url:e,data:(r||{}).data}))}}));Ge.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(Qt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}ar.prototype[t]=r();ar.prototype[t+"Form"]=r(true)}));var sr=function(){function e(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}var t;this.promise=new Promise((function e(r){t=r}));var r=this;this.promise.then((function(e){if(!r._listeners)return;var t=r._listeners.length;while(t-- >0){r._listeners[t](e)}r._listeners=null}));this.promise.then=function(e){var t;var n=new Promise((function(e){r.subscribe(e);t=e})).then(e);n.cancel=function e(){r.unsubscribe(t)};return n};e((function e(n,i,o){if(r.reason){return}r.reason=new Mt(n,i,o);t(r.reason)}))}e.prototype.throwIfRequested=function(){if(this.reason){throw this.reason}};e.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}};e.prototype.unsubscribe=function(e){if(!this._listeners){return}var t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}};e.source=function(){var t;var r=new e((function e(r){t=r}));return{token:r,cancel:t}};return e}();function ur(e){return function t(r){return e.apply(null,r)}}function cr(e){return Ge.isObject(e)&&e.isAxiosError===true}var fr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(fr).forEach((function(e){var t=e[0],r=e[1];fr[r]=t}));function lr(e){var t=new ar(e);var r=k(ar.prototype.request,t);Ge.extend(r,ar.prototype,t,{allOwnKeys:true});Ge.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return lr(Qt(e,r))};return r}var dr=lr(yt);dr.Axios=ar;dr.CanceledError=Mt;dr.CancelToken=sr;dr.isCancel=Dt;dr.VERSION=er;dr.toFormData=$e;dr.AxiosError=Ve;dr.Cancel=dr.CanceledError;dr.all=function e(t){return Promise.all(t)};dr.spread=ur;dr.isAxiosError=cr;dr.mergeConfig=Qt;dr.AxiosHeaders=It;dr.formToJSON=function(e){return _t(Ge.isHTMLForm(e)?new FormData(e):e)};dr.getAdapter=Yt.getAdapter;dr.HttpStatusCode=fr;dr.default=dr;var pr=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var hr=function(){if(this)return this;if(typeof globalThis==="object"&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:true})}catch(e){return pr()}try{if(!__global__)return pr();return __global__}finally{delete Object.prototype.__global__}}();var vr=Symbol.for("verdocs-default-endpoint");var Er=function(e){console.debug("[JS-SDK] ".concat(e.method.toUpperCase()," ").concat(e.baseURL).concat(e.url),e.data?JSON.stringify(e.data):"");return e};var mr=e("V",function(){function e(e){this.environment="verdocs";this.sessionType="user";this.baseURL=window.location.origin==="https://beta.verdocs.com"?"https://stage-api.verdocs.com":"https://api.verdocs.com";this.clientID="not-set";this.timeout=6e4;this.token=null;this.nextListenerId=0;this.sessionListeners=new Map;this.requestLoggerId=null;this.session=null;this.baseURL=(e===null||e===void 0?void 0:e.baseURL)||"https://api.verdocs.com";this.timeout=(e===null||e===void 0?void 0:e.timeout)||6e4;this.environment=(e===null||e===void 0?void 0:e.environment)||"verdocs";this.sessionType=(e===null||e===void 0?void 0:e.sessionType)||"user";this.clientID=(e===null||e===void 0?void 0:e.clientID)||"not-set";this.api=dr.create({baseURL:this.baseURL,timeout:this.timeout});F(this.api,{retries:0,retryDelay:F.exponentialDelay,onRetry:function(e,t,r){window.console.debug("[JS_SDK] Retrying request (".concat(e,")"),t.message,r.url)}})}e.prototype.setDefault=function(){hr[vr]=this};e.getDefault=function(){if(!hr[vr]){hr[vr]=new e;window.console.debug("[JS_SDK] Created default endpoint",hr[vr].baseURL)}return hr[vr]};e.prototype.getEnvironment=function(){return this.environment};e.prototype.getSessionType=function(){return this.sessionType};e.prototype.getBaseURL=function(){return this.baseURL};e.prototype.getClientID=function(){return this.clientID};e.prototype.getTimeout=function(){return this.timeout};e.prototype.getSession=function(){return this.session};e.prototype.setEnvironment=function(e){this.environment=e;return this};e.prototype.setSessionType=function(e){this.sessionType=e;return this};e.prototype.setBaseURL=function(e){this.baseURL=e;this.api.defaults.baseURL=e;return this};e.prototype.setClientID=function(e){this.clientID=e;this.api.defaults.headers.common["X-Client-ID"]=e;return this};e.prototype.setTimeout=function(e){this.timeout=e;this.api.defaults.timeout=e;return this};e.prototype.logRequests=function(e){if(e&&this.requestLoggerId===null){this.requestLoggerId=this.api.interceptors.request.use(Er)}else if(!e&&this.requestLoggerId!==null){this.api.interceptors.request.eject(this.requestLoggerId)}return this};e.prototype.setToken=function(e){if(!e){return this.clearSession()}var r=t(e);if(r===null||r.exp&&r.exp*1e3<(new Date).getTime()){window.console.warn("[JS_SDK] Ignoring attempt to use expired session token");return this.clearSession()}this.token=e;this.session=r;if(this.sessionType==="user"){this.api.defaults.headers.common.Authorization="Bearer ".concat(e)}else{this.api.defaults.headers.common.signer="Bearer ".concat(e)}localStorage.setItem(this.sessionStorageKey(),e);this.notifySessionListeners();return this};e.prototype.getToken=function(){return this.token};e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())};e.prototype.clearSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;delete this.api.defaults.headers.common.signer;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.clearSignerSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.notifySessionListeners=function(){var e=this;this.sessionListeners.forEach((function(t){try{t(e,e.session)}catch(e){}}))};e.prototype.onSessionChanged=function(e){var t=this;this.nextListenerId++;var r=Symbol.for(""+this.nextListenerId);this.sessionListeners.set(r,e);return function(){t.sessionListeners.delete(r)}};e.prototype.loadSession=function(){var e=localStorage.getItem(this.sessionStorageKey());if(!e){return this.clearSession()}return this.setToken(e)};return e}())}}}));
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./p-54498887.system.js"],(function(n){"use strict";var t;return{setters:[function(n){t=n.d}],execute:function(){var e=undefined&&undefined.__awaiter||function(n,t,e,o){function r(n){return n instanceof e?n:new e((function(t){t(n)}))}return new(e||(e=Promise))((function(e,i){function u(n){try{c(o.next(n))}catch(n){i(n)}}function a(n){try{c(o["throw"](n))}catch(n){i(n)}}function c(n){n.done?e(n.value):r(n.value).then(u,a)}c((o=o.apply(n,t||[])).next())}))};var o=undefined&&undefined.__generator||function(n,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(n){return function(t){return c([n,t])}}function c(a){if(o)throw new TypeError("Generator is already executing.");while(u&&(u=0,a[0]&&(e=0)),e)try{if(o=1,r&&(i=a[0]&2?r["return"]:a[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;if(r=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;r=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){e.label=a[1];break}if(a[0]===6&&e.label<i[1]){e.label=i[1];i=a;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(a);break}if(i[2])e.ops.pop();e.trys.pop();continue}a=t.call(n,e)}catch(n){a=[6,n];r=0}finally{o=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var r=n("j",(function(n,t){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.post("/envelopes",t).then((function(n){return n.data}))]}))}))}));var i=n("g",(function(n,t){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.post("/envelopes/summary",{page:t}).then((function(n){return n.data}))]}))}))}));var u=n("e",(function(n,r){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.get("/envelopes/".concat(r.envelopeId,"/recipients/").concat(encodeURIComponent(r.roleId),"/invitation/").concat(r.inviteCode)).then((function(e){var o;var r=((o=e.headers)===null||o===void 0?void 0:o.signer_token)||"";var i=t(r);n.setToken(r);return{recipient:e.data,session:i,signerToken:r}}))]}))}))}));var a=n("a",(function(n,t){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.get("/envelopes/".concat(t)).then((function(n){return n.data}))]}))}))}));var c=n("k",(function(n,t,r){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.get("/envelopes/".concat(t,"/envelope_documents/").concat(r,"?download=true")).then((function(n){return n.data}))]}))}))}));var f=n("c",(function(n,t){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.put("/envelopes/".concat(t),{action:"cancel"}).then((function(n){return n.data}))]}))}))}));var d=n("b",(function(n,t,r){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.get("/envelopes/".concat(t,"/envelope_documents/").concat(r,"?file=true"),{responseType:"blob"}).then((function(n){return n.data}))]}))}))}));var v=n("u",(function(n,t,r,i){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.put("/envelopes/".concat(t,"/fields/").concat(r),i).then((function(n){return n.data}))]}))}))}));var s=n("f",(function(n,t,r,i){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.put("/envelopes/".concat(t,"/fields/").concat(r,"/signature/").concat(i)).then((function(n){return n.data}))]}))}))}));var l=n("h",(function(n,t,r,i){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.put("/envelopes/".concat(t,"/fields/").concat(r,"/initial/").concat(i)).then((function(n){return n.data}))]}))}))}));var p=n("i",(function(n,t,r,i,u){return e(void 0,void 0,void 0,(function(){var e;return o(this,(function(o){e=new FormData;e.append("document",i,i.name);return[2,n.api.put("/envelopes/".concat(t,"/fields/").concat(r),e,{timeout:12e4,onUploadProgress:function(n){var t=n.total||1;var e=n.loaded||0;u===null||u===void 0?void 0:u(Math.floor(e*100/(t||1)),e,t||1)}}).then((function(n){return n.data}))]}))}))}));var h=n("d",(function(n,t,r){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.get("/envelopes/".concat(t,"/fields/").concat(r,"/document"),{responseType:"blob"}).then((function(n){return n.data}))]}))}))}));var g=n("m",(function(n,t,r,i,u){if(u===void 0){u="original"}return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.get("/envelopes/".concat(t,"/envelope_documents/").concat(r,"/pages/").concat(i,"/image?type=").concat(u),{timeout:2e4,"axios-retry":{retries:5}}).then((function(n){return n.data}))]}))}))}));var m={};var y=n("t",(function(n,t){if(m[t]&&m[t].loaded+2e3<(new Date).getTime()){return m[t].envelope}return a(n,t).then((function(n){m[t]={loaded:(new Date).getTime(),envelope:n};return n}))}));var b=n("l",(function(n,t){return n.api.post("/envelopes/list",t).then((function(n){return n.data}))}))}}}));
|
@@ -1 +0,0 @@
|
|
1
|
-
import{d as n}from"./p-05788c2b.js";var e=function(n,e,t,o){return new(t||(t=Promise))((function(r,i){function u(n){try{f(o.next(n))}catch(n){i(n)}}function c(n){try{f(o.throw(n))}catch(n){i(n)}}function f(n){var e;n.done?r(n.value):(e=n.value,e instanceof t?e:new t((function(n){n(e)}))).then(u,c)}f((o=o.apply(n,e||[])).next())}))},t=function(n,e){var t,o,r,i,u={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(f){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(u=0)),u;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return u.label++,{value:c[1],done:!1};case 5:u.label++,o=c[1],c=[0];continue;case 7:c=u.ops.pop(),u.trys.pop();continue;default:if(!((r=(r=u.trys).length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){u=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){u.label=c[1];break}if(6===c[0]&&u.label<r[1]){u.label=r[1],r=c;break}if(r&&u.label<r[2]){u.label=r[2],u.ops.push(c);break}r[2]&&u.ops.pop(),u.trys.pop();continue}c=e.call(n,u)}catch(n){c=[6,n],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,f])}}},o=function(n,o){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.post("/envelopes",o).then((function(n){return n.data}))]}))}))},r=function(n,o){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.post("/envelopes/summary",{page:o}).then((function(n){return n.data}))]}))}))},i=function(o,r){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,o.api.get("/envelopes/".concat(r.envelopeId,"/recipients/").concat(encodeURIComponent(r.roleId),"/invitation/").concat(r.inviteCode)).then((function(e){var t,r=(null===(t=e.headers)||void 0===t?void 0:t.signer_token)||"",i=n(r);return o.setToken(r),{recipient:e.data,session:i,signerToken:r}}))]}))}))},u=function(n,o){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.get("/envelopes/".concat(o)).then((function(n){return n.data}))]}))}))},c=function(n,o,r){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.get("/envelopes/".concat(o,"/envelope_documents/").concat(r,"?download=true")).then((function(n){return n.data}))]}))}))},f=function(n,o){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.put("/envelopes/".concat(o),{action:"cancel"}).then((function(n){return n.data}))]}))}))},s=function(n,o,r){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.get("/envelopes/".concat(o,"/envelope_documents/").concat(r,"?file=true"),{responseType:"blob"}).then((function(n){return n.data}))]}))}))},v=function(n,o,r,i){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.put("/envelopes/".concat(o,"/fields/").concat(r),i).then((function(n){return n.data}))]}))}))},d=function(n,o,r,i){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.put("/envelopes/".concat(o,"/fields/").concat(r,"/signature/").concat(i)).then((function(n){return n.data}))]}))}))},a=function(n,o,r,i){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.put("/envelopes/".concat(o,"/fields/").concat(r,"/initial/").concat(i)).then((function(n){return n.data}))]}))}))},l=function(n,o,r,i,u){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(){return(e=new FormData).append("document",i,i.name),[2,n.api.put("/envelopes/".concat(o,"/fields/").concat(r),e,{timeout:12e4,onUploadProgress:function(n){var e=n.total||1,t=n.loaded||0;null==u||u(Math.floor(100*t/(e||1)),t,e||1)}}).then((function(n){return n.data}))]}))}))},p=function(n,o,r){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.get("/envelopes/".concat(o,"/fields/").concat(r,"/document"),{responseType:"blob"}).then((function(n){return n.data}))]}))}))},h=function(n,o,r,i,u){return void 0===u&&(u="original"),e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.get("/envelopes/".concat(o,"/envelope_documents/").concat(r,"/pages/").concat(i,"/image?type=").concat(u),{timeout:2e4,"axios-retry":{retries:5}}).then((function(n){return n.data}))]}))}))},m={},y=function(n,e){return m[e]&&m[e].loaded+2e3<(new Date).getTime()?m[e].envelope:u(n,e).then((function(n){return m[e]={loaded:(new Date).getTime(),envelope:n},n}))},b=function(n,e){return n.api.post("/envelopes/list",e).then((function(n){return n.data}))};export{u as a,s as b,f as c,p as d,i as e,d as f,r as g,a as h,l as i,o as j,c as k,b as l,h as m,y as t,v as u}
|
@@ -1 +0,0 @@
|
|
1
|
-
import{c as t,a as n}from"./p-7d5dbd9a.js";var e=t((function(t){t.exports=function(){function n(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,i)}return e}function e(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?n(Object(i),!0).forEach((function(n){s(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))}))}return t}function i(t){return(i="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})(t)}function r(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function o(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,d(i.key),i)}}function a(t,n,e){return n&&o(t.prototype,n),e&&o(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t,n,e){return(n=d(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function u(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&f(t,n)}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,n){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t})(t,n)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,i=c(t);if(n){var r=c(this).constructor;e=Reflect.construct(i,arguments,r)}else e=i.apply(this,arguments);return function(t,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}(this,e)}}function v(){return(v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,n,e){var i=function(t,n){for(;!Object.prototype.hasOwnProperty.call(t,n)&&null!==(t=c(t)););return t}(t,n);if(i){var r=Object.getOwnPropertyDescriptor(i,n);return r.get?r.get.call(arguments.length<3?t:e):r.value}}).apply(this,arguments)}function d(t){var n=function(t,n){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,n);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof n?n:n+""}var p=function(t){return!(!t||!t.Window)&&t instanceof t.Window},y=void 0,g=void 0;function m(t){y=t;var n=t.document.createTextNode("");n.ownerDocument!==t.document&&"function"==typeof t.wrap&&t.wrap(n)===n&&(t=t.wrap(t)),g=t}function b(t){return p(t)?t:(t.ownerDocument||t).defaultView||g.window}"undefined"!=typeof window&&window&&m(window);var w=function(t){return!!t&&"object"===i(t)},x=function(t){return"function"==typeof t},k=function(t){return t===g||p(t)},M=function(t){return w(t)&&11===t.nodeType},E=w,T=x,O=function(t){return"number"==typeof t},S=function(t){return"boolean"==typeof t},z=function(t){return"string"==typeof t},I=function(t){if(!t||"object"!==i(t))return!1;var n=b(t)||g;return/object|function/.test("undefined"==typeof Element?"undefined":i(Element))?t instanceof Element||t instanceof n.Element:1===t.nodeType&&"string"==typeof t.nodeName},P=function(t){return w(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},j=function(t){return w(t)&&void 0!==t.length&&x(t.splice)};function _(t){var n=t.interaction;if("drag"===n.prepared.name){var e=n.prepared.axis;"x"===e?(n.coords.cur.page.y=n.coords.start.page.y,n.coords.cur.client.y=n.coords.start.client.y,n.coords.velocity.client.y=0,n.coords.velocity.page.y=0):"y"===e&&(n.coords.cur.page.x=n.coords.start.page.x,n.coords.cur.client.x=n.coords.start.client.x,n.coords.velocity.client.x=0,n.coords.velocity.page.x=0)}}function D(t){var n=t.iEvent,e=t.interaction;if("drag"===e.prepared.name){var i=e.prepared.axis;if("x"===i||"y"===i){var r="x"===i?"y":"x";n.page[r]=e.coords.start.page[r],n.client[r]=e.coords.start.client[r],n.delta[r]=0}}}var R={id:"actions/drag",install:function(t){var n=t.actions,e=t.defaults;t.Interactable.prototype.draggable=R.draggable,n.map.drag=R,n.methodDict.drag="draggable",e.actions.drag=R.defaults},listeners:{"interactions:before-action-move":_,"interactions:action-resume":_,"interactions:action-move":D,"auto-start:check":function(t){var n=t.interaction,e=t.interactable,i=t.buttons,r=e.options.drag;if(r&&r.enabled&&(!n.pointerIsDown||!/mouse|pointer/.test(n.pointerType)||0!=(i&e.options.drag.mouseButtons)))return t.action={name:"drag",axis:"start"===r.lockAxis?r.startAxis:r.lockAxis},!1}},draggable:function(t){return E(t)?(this.options.drag.enabled=!1!==t.enabled,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):S(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:_,move:D,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(t){return 0===t.search("drag")}},A=R,C={init:function(t){var n=t;C.document=n.document,C.DocumentFragment=n.DocumentFragment||F,C.SVGElement=n.SVGElement||F,C.SVGSVGElement=n.SVGSVGElement||F,C.SVGElementInstance=n.SVGElementInstance||F,C.Element=n.Element||F,C.HTMLElement=n.HTMLElement||C.Element,C.Event=n.Event,C.Touch=n.Touch||F,C.PointerEvent=n.PointerEvent||n.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function F(){}var X=C,Y={init:function(t){var n=X.Element,e=t.navigator||{};Y.supportsTouch="ontouchstart"in t||T(t.DocumentTouch)&&X.document instanceof t.DocumentTouch,Y.supportsPointerEvent=!1!==e.pointerEnabled&&!!X.PointerEvent,Y.isIOS=/iP(hone|od|ad)/.test(e.platform),Y.isIOS7=/iP(hone|od|ad)/.test(e.platform)&&/OS 7[^\d]/.test(e.appVersion),Y.isIe9=/MSIE 9/.test(e.userAgent),Y.isOperaMobile="Opera"===e.appName&&Y.supportsTouch&&/Presto/.test(e.userAgent),Y.prefixedMatchesSelector="matches"in n.prototype?"matches":"webkitMatchesSelector"in n.prototype?"webkitMatchesSelector":"mozMatchesSelector"in n.prototype?"mozMatchesSelector":"oMatchesSelector"in n.prototype?"oMatchesSelector":"msMatchesSelector",Y.pEventTypes=Y.supportsPointerEvent?X.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,Y.wheelEvent=X.document&&"onmousewheel"in X.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},$=Y;function L(t,n){if(t.contains)return t.contains(n);for(;n;){if(n===t)return!0;n=n.parentNode}return!1}function U(t,n){for(;I(t);){if(V(t,n))return t;t=N(t)}return null}function N(t){var n=t.parentNode;if(M(n)){for(;(n=n.host)&&M(n););return n}return n}function V(t,n){return g!==y&&(n=n.replace(/\/deep\//g," ")),t[$.prefixedMatchesSelector](n)}var B=function(t){return t.parentNode||t.host};function q(t,n){for(var e,i=[],r=t;(e=B(r))&&r!==n&&e!==r.ownerDocument;)i.unshift(r),r=e;return i}function G(t,n,e){for(;I(t);){if(V(t,n))return!0;if((t=N(t))===e)return V(t,n)}return!1}function K(t){return t.correspondingUseElement||t}function W(t){var n=t instanceof X.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return n&&{left:n.left,right:n.right,top:n.top,bottom:n.bottom,width:n.width||n.right-n.left,height:n.height||n.bottom-n.top}}function H(t){var n,e=W(t);if(!$.isIOS7&&e){var i={x:(n=(n=b(t))||g).scrollX||n.document.documentElement.scrollLeft,y:n.scrollY||n.document.documentElement.scrollTop};e.left+=i.x,e.right+=i.x,e.top+=i.y,e.bottom+=i.y}return e}function J(t){for(var n=[];t;)n.push(t),t=N(t);return n}function Q(t){return!!z(t)&&(X.document.querySelector(t),!0)}function Z(t,n){for(var e in n)t[e]=n[e];return t}function tt(t,n,e){return"parent"===t?N(e):"self"===t?n.getRect(e):U(e,t)}function nt(t,n,e,i){var r=t;return z(r)?r=tt(r,n,e):T(r)&&(r=r.apply(void 0,i)),I(r)&&(r=H(r)),r}function et(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function it(t){return!t||"x"in t&&"y"in t||((t=Z({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t}function rt(t,n,e){t.left&&(n.left+=e.x),t.right&&(n.right+=e.x),t.top&&(n.top+=e.y),t.bottom&&(n.bottom+=e.y),n.width=n.right-n.left,n.height=n.bottom-n.top}function ot(t,n,e){var i=e&&t.options[e];return et(nt(i&&i.origin||t.options.origin,t,n,[t&&n]))||{x:0,y:0}}function at(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0},i=arguments.length>3?arguments[3]:void 0;if(i=i||{},z(t)&&-1!==t.search(" ")&&(t=st(t)),j(t))return t.forEach((function(t){return at(t,n,e,i)})),i;if(E(t)&&(n=t,t=""),T(n)&&e(t))i[t]=i[t]||[],i[t].push(n);else if(j(n))for(var r=0,o=n;r<o.length;r++)at(t,o[r],e,i);else if(E(n))for(var a in n)at(st(a).map((function(n){return"".concat(t).concat(n)})),n[a],e,i);return i}function st(t){return t.trim().split(/ +/)}var ut=function(t,n){return Math.sqrt(t*t+n*n)},ct=["webkit","moz"];function ft(t,n){t.__set||(t.__set={});var e=function(e){if(ct.some((function(t){return 0===e.indexOf(t)})))return 1;"function"!=typeof t[e]&&"__set"!==e&&Object.defineProperty(t,e,{get:function(){return e in t.__set?t.__set[e]:t.__set[e]=n[e]},set:function(n){t.__set[e]=n},configurable:!0})};for(var i in n)e(i);return t}function lt(t,n){t.page=t.page||{},t.page.x=n.page.x,t.page.y=n.page.y,t.client=t.client||{},t.client.x=n.client.x,t.client.y=n.client.y,t.timeStamp=n.timeStamp}function ht(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function vt(t){return t instanceof X.Event||t instanceof X.Touch}function dt(t,n,e){return(e=e||{}).x=n[(t=t||"page")+"X"],e.y=n[t+"Y"],e}function pt(t,n){return n=n||{x:0,y:0},$.isOperaMobile&&vt(t)?(dt("screen",t,n),n.x+=window.scrollX,n.y+=window.scrollY):dt("page",t,n),n}function yt(t){return O(t.pointerId)?t.pointerId:t.identifier}function gt(t){var n=[];return j(t)?(n[0]=t[0],n[1]=t[1]):"touchend"===t.type?1===t.touches.length?(n[0]=t.touches[0],n[1]=t.changedTouches[0]):0===t.touches.length&&(n[0]=t.changedTouches[0],n[1]=t.changedTouches[1]):(n[0]=t.touches[0],n[1]=t.touches[1]),n}function mt(t){for(var n={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},e=0;e<t.length;e++){var i=t[e];for(var r in n)n[r]+=i[r]}for(var o in n)n[o]/=t.length;return n}function bt(t){if(!t.length)return null;var n=gt(t),e=Math.min(n[0].pageX,n[1].pageX),i=Math.min(n[0].pageY,n[1].pageY),r=Math.max(n[0].pageX,n[1].pageX),o=Math.max(n[0].pageY,n[1].pageY);return{x:e,y:i,left:e,top:i,right:r,bottom:o,width:r-e,height:o-i}}function wt(t,n){var e=n+"X",i=n+"Y",r=gt(t);return ut(r[0][e]-r[1][e],r[0][i]-r[1][i])}function xt(t,n){var e=n+"X",i=n+"Y",r=gt(t);return 180*Math.atan2(r[1][i]-r[0][i],r[1][e]-r[0][e])/Math.PI}function kt(t){return z(t.pointerType)?t.pointerType:O(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof X.Touch?"touch":"mouse"}function Mt(t){var n=T(t.composedPath)?t.composedPath():t.path;return[K(n?n[0]:t.target),K(t.currentTarget)]}var Et=function(){function t(n){r(this,t),s(this,"immediatePropagationStopped",!1),s(this,"propagationStopped",!1),this._interaction=n}return a(t,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),t}();Object.defineProperty(Et.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Tt=function(t,n){for(var e=0;e<n.length;e++)t.push(n[e]);return t},Ot=function(t){return Tt([],t)},St=function(t,n){for(var e=0;e<t.length;e++)if(n(t[e],e,t))return e;return-1},zt=function(t,n){return t[St(t,n)]},It=function(t){u(e,t);var n=h(e);function e(t,i,o){var a;r(this,e),s(l(a=n.call(this,i._interaction)),"dropzone",void 0),s(l(a),"dragEvent",void 0),s(l(a),"relatedTarget",void 0),s(l(a),"draggable",void 0),s(l(a),"propagationStopped",!1),s(l(a),"immediatePropagationStopped",!1);var u="dragleave"===o?t.prev:t.cur,c=u.element,f=u.dropzone;return a.type=o,a.target=c,a.currentTarget=c,a.dropzone=f,a.dragEvent=i,a.relatedTarget=i.target,a.draggable=i.interactable,a.timeStamp=i.timeStamp,a}return a(e,[{key:"reject",value:function(){var t=this,n=this._interaction.dropState;if("dropactivate"===this.type||this.dropzone&&n.cur.dropzone===this.dropzone&&n.cur.element===this.target)if(n.prev.dropzone=this.dropzone,n.prev.element=this.target,n.rejected=!0,n.events.enter=null,this.stopImmediatePropagation(),"dropactivate"===this.type){var i=St(n.activeDrops,(function(n){return n.dropzone===t.dropzone&&n.element===t.target}));n.activeDrops.splice(i,1);var r=new e(n,this.dragEvent,"dropdeactivate");r.dropzone=this.dropzone,r.target=this.target,this.dropzone.fire(r)}else this.dropzone.fire(new e(n,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),e}(Et);function Pt(t,n){for(var e=0,i=t.slice();e<i.length;e++){var r=i[e],o=r.dropzone,a=r.element;n.dropzone=o,n.target=a,o.fire(n),n.propagationStopped=n.immediatePropagationStopped=!1}}function jt(t,n){for(var e=function(t,n){for(var e=[],i=0,r=t.interactables.list;i<r.length;i++){var o=r[i];if(o.options.drop.enabled){var a=o.options.drop.accept;if(!(I(a)&&a!==n||z(a)&&!V(n,a)||T(a)&&!a({dropzone:o,draggableElement:n})))for(var s=0,u=o.getAllElements();s<u.length;s++){var c=u[s];c!==n&&e.push({dropzone:o,element:c,rect:o.getRect(c)})}}}return e}(t,n),i=0;i<e.length;i++){var r=e[i];r.rect=r.dropzone.getRect(r.element)}return e}function _t(t,n,e){for(var i=t.dropState,r=t.interactable,o=t.element,a=[],s=0,u=i.activeDrops;s<u.length;s++){var c=u[s],f=c.element,l=c.dropzone.dropCheck(n,e,r,o,f,c.rect);a.push(l?f:null)}var h=function(t){for(var n,e,i,r=[],o=0;o<t.length;o++){var a=t[o],s=t[n];if(a&&o!==n)if(s){var u=B(a),c=B(s);if(u!==a.ownerDocument)if(c!==a.ownerDocument)if(u!==c){r=r.length?r:q(s);var f=void 0;if(s instanceof X.HTMLElement&&a instanceof X.SVGElement&&!(a instanceof X.SVGSVGElement)){if(a===c)continue;f=a.ownerSVGElement}else f=a;for(var l=q(f,s.ownerDocument),h=0;l[h]&&l[h]===r[h];)h++;var v=[l[h-1],l[h],r[h]];if(v[0])for(var d=v[0].lastChild;d;){if(d===v[1]){n=o,r=l;break}if(d===v[2])break;d=d.previousSibling}}else i=s,(parseInt(b(e=a).getComputedStyle(e).zIndex,10)||0)>=(parseInt(b(i).getComputedStyle(i).zIndex,10)||0)&&(n=o);else n=o}else n=o}return n}(a);return i.activeDrops[h]||null}function Dt(t,n,e){var i=t.dropState,r={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return"dragstart"===e.type&&(r.activate=new It(i,e,"dropactivate"),r.activate.target=null,r.activate.dropzone=null),"dragend"===e.type&&(r.deactivate=new It(i,e,"dropdeactivate"),r.deactivate.target=null,r.deactivate.dropzone=null),i.rejected||(i.cur.element!==i.prev.element&&(i.prev.dropzone&&(r.leave=new It(i,e,"dragleave"),e.dragLeave=r.leave.target=i.prev.element,e.prevDropzone=r.leave.dropzone=i.prev.dropzone),i.cur.dropzone&&(r.enter=new It(i,e,"dragenter"),e.dragEnter=i.cur.element,e.dropzone=i.cur.dropzone)),"dragend"===e.type&&i.cur.dropzone&&(r.drop=new It(i,e,"drop"),e.dropzone=i.cur.dropzone,e.relatedTarget=i.cur.element),"dragmove"===e.type&&i.cur.dropzone&&(r.move=new It(i,e,"dropmove"),e.dropzone=i.cur.dropzone)),r}function Rt(t,n){var e=t.dropState,i=e.activeDrops,r=e.cur;n.leave&&e.prev.dropzone.fire(n.leave),n.enter&&r.dropzone.fire(n.enter),n.move&&r.dropzone.fire(n.move),n.drop&&r.dropzone.fire(n.drop),n.deactivate&&Pt(i,n.deactivate),e.prev.dropzone=r.dropzone,e.prev.element=r.element}function At(t,n){var e=t.interaction,i=t.iEvent,r=t.event;if("dragmove"===i.type||"dragend"===i.type){var o=e.dropState;n.dynamicDrop&&(o.activeDrops=jt(n,e.element));var a=i,s=_t(e,a,r);o.rejected=o.rejected&&!!s&&s.dropzone===o.cur.dropzone&&s.element===o.cur.element,o.cur.dropzone=s&&s.dropzone,o.cur.element=s&&s.element,o.events=Dt(e,0,a)}}var Ct={id:"actions/drop",install:function(t){var n=t.actions,e=t.interactStatic,i=t.Interactable,r=t.defaults;t.usePlugin(A),i.prototype.dropzone=function(t){return function(t,n){if(E(n)){if(t.options.drop.enabled=!1!==n.enabled,n.listeners){var e=at(n.listeners),i=Object.keys(e).reduce((function(t,n){return t[/^(enter|leave)/.test(n)?"drag".concat(n):/^(activate|deactivate|move)/.test(n)?"drop".concat(n):n]=e[n],t}),{}),r=t.options.drop.listeners;r&&t.off(r),t.on(i),t.options.drop.listeners=i}return T(n.ondrop)&&t.on("drop",n.ondrop),T(n.ondropactivate)&&t.on("dropactivate",n.ondropactivate),T(n.ondropdeactivate)&&t.on("dropdeactivate",n.ondropdeactivate),T(n.ondragenter)&&t.on("dragenter",n.ondragenter),T(n.ondragleave)&&t.on("dragleave",n.ondragleave),T(n.ondropmove)&&t.on("dropmove",n.ondropmove),/^(pointer|center)$/.test(n.overlap)?t.options.drop.overlap=n.overlap:O(n.overlap)&&(t.options.drop.overlap=Math.max(Math.min(1,n.overlap),0)),"accept"in n&&(t.options.drop.accept=n.accept),"checker"in n&&(t.options.drop.checker=n.checker),t}return S(n)?(t.options.drop.enabled=n,t):t.options.drop}(this,t)},i.prototype.dropCheck=function(t,n,e,i,r,o){return function(t,n,e,i,r,o,a){var s=!1;if(!(a=a||t.getRect(o)))return!!t.options.drop.checker&&t.options.drop.checker(n,e,s,t,o,i,r);var u=t.options.drop.overlap;if("pointer"===u){var c=ot(i,r,"drag"),f=pt(n);f.x+=c.x,f.y+=c.y,s=f.x>a.left&&f.x<a.right&&f.y>a.top&&f.y<a.bottom}var l=i.getRect(r);if(l&&"center"===u){var h=l.left+l.width/2,v=l.top+l.height/2;s=h>=a.left&&h<=a.right&&v>=a.top&&v<=a.bottom}return l&&O(u)&&(s=Math.max(0,Math.min(a.right,l.right)-Math.max(a.left,l.left))*Math.max(0,Math.min(a.bottom,l.bottom)-Math.max(a.top,l.top))/(l.width*l.height)>=u),t.options.drop.checker&&(s=t.options.drop.checker(n,e,s,t,o,i,r)),s}(this,t,n,e,i,r,o)},e.dynamicDrop=function(n){return S(n)?(t.dynamicDrop=n,e):t.dynamicDrop},Z(n.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),n.methodDict.drop="dropzone",t.dynamicDrop=!1,r.actions.drop=Ct.defaults},listeners:{"interactions:before-action-start":function(t){var n=t.interaction;"drag"===n.prepared.name&&(n.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,n){var e=t.interaction,i=t.iEvent;if("drag"===e.prepared.name){var r=e.dropState;r.activeDrops=[],r.events={},r.activeDrops=jt(n,e.element),r.events=Dt(e,0,i),r.events.activate&&(Pt(r.activeDrops,r.events.activate),n.fire("actions/drop:start",{interaction:e,dragEvent:i}))}},"interactions:action-move":At,"interactions:after-action-move":function(t,n){var e=t.interaction,i=t.iEvent;if("drag"===e.prepared.name){var r=e.dropState;Rt(e,r.events),n.fire("actions/drop:move",{interaction:e,dragEvent:i}),r.events={}}},"interactions:action-end":function(t,n){if("drag"===t.interaction.prepared.name){var e=t.interaction,i=t.iEvent;At(t,n),Rt(e,e.dropState.events),n.fire("actions/drop:end",{interaction:e,dragEvent:i})}},"interactions:stop":function(t){var n=t.interaction;if("drag"===n.prepared.name){var e=n.dropState;e&&(e.activeDrops=null,e.events=null,e.cur.dropzone=null,e.cur.element=null,e.prev.dropzone=null,e.prev.element=null,e.rejected=!1)}}},getActiveDrops:jt,getDrop:_t,getDropEvents:Dt,fireDropEvents:Rt,filterEventType:function(t){return 0===t.search("drag")||0===t.search("drop")},defaults:{enabled:!1,accept:null,overlap:"pointer"}},Ft=Ct;function Xt(t){var n=t.interaction,e=t.iEvent,i=t.phase;if("gesture"===n.prepared.name){var r=n.pointers.map((function(t){return t.pointer})),o="start"===i,a="end"===i,s=n.interactable.options.deltaSource;if(e.touches=[r[0],r[1]],o)e.distance=wt(r,s),e.box=bt(r),e.scale=1,e.ds=0,e.angle=xt(r,s),e.da=0,n.gesture.startDistance=e.distance,n.gesture.startAngle=e.angle;else if(a||n.pointers.length<2){var u=n.prevEvent;e.distance=u.distance,e.box=u.box,e.scale=u.scale,e.ds=0,e.angle=u.angle,e.da=0}else e.distance=wt(r,s),e.box=bt(r),e.scale=e.distance/n.gesture.startDistance,e.angle=xt(r,s),e.ds=e.scale-n.gesture.scale,e.da=e.angle-n.gesture.angle;n.gesture.distance=e.distance,n.gesture.angle=e.angle,O(e.scale)&&e.scale!==1/0&&!isNaN(e.scale)&&(n.gesture.scale=e.scale)}}var Yt={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var n=t.actions,e=t.defaults;t.Interactable.prototype.gesturable=function(t){return E(t)?(this.options.gesture.enabled=!1!==t.enabled,this.setPerAction("gesture",t),this.setOnEvents("gesture",t),this):S(t)?(this.options.gesture.enabled=t,this):this.options.gesture},n.map.gesture=Yt,n.methodDict.gesture="gesturable",e.actions.gesture=Yt.defaults},listeners:{"interactions:action-start":Xt,"interactions:action-move":Xt,"interactions:action-end":Xt,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var n=t.interactable.options.gesture;if(n&&n.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(t){return 0===t.search("gesture")}},$t=Yt;function Lt(t,n,e,i,r,o,a){if(!n)return!1;if(!0===n){var s=O(o.width)?o.width:o.right-o.left,u=O(o.height)?o.height:o.bottom-o.top;if(a=Math.min(a,Math.abs(("left"===t||"right"===t?s:u)/2)),s<0&&("left"===t?t="right":"right"===t&&(t="left")),u<0&&("top"===t?t="bottom":"bottom"===t&&(t="top")),"left"===t)return e.x<(s>=0?o.left:o.right)+a;if("top"===t)return e.y<(u>=0?o.top:o.bottom)+a;if("right"===t)return e.x>(s>=0?o.right:o.left)-a;if("bottom"===t)return e.y>(u>=0?o.bottom:o.top)-a}return!!I(i)&&(I(n)?n===i:G(i,n,r))}function Ut(t){var n=t.interaction;if("resize"===n.prepared.name&&n.resizeAxes){var e=t.iEvent;n.interactable.options.resize.square?("y"===n.resizeAxes?e.delta.x=e.delta.y:e.delta.y=e.delta.x,e.axes="xy"):(e.axes=n.resizeAxes,"x"===n.resizeAxes?e.delta.y=0:"y"===n.resizeAxes&&(e.delta.x=0))}}var Nt,Vt,Bt={id:"actions/resize",before:["actions/drag"],install:function(t){var n=t.actions,e=t.browser,i=t.Interactable,r=t.defaults;Bt.cursors=function(t){return t.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(e),Bt.defaultMargin=e.supportsTouch||e.supportsPointerEvent?20:10,i.prototype.resizable=function(n){return function(t,n,e){return E(n)?(t.options.resize.enabled=!1!==n.enabled,t.setPerAction("resize",n),t.setOnEvents("resize",n),z(n.axis)&&/^x$|^y$|^xy$/.test(n.axis)?t.options.resize.axis=n.axis:null===n.axis&&(t.options.resize.axis=e.defaults.actions.resize.axis),S(n.preserveAspectRatio)?t.options.resize.preserveAspectRatio=n.preserveAspectRatio:S(n.square)&&(t.options.resize.square=n.square),t):S(n)?(t.options.resize.enabled=n,t):t.options.resize}(this,n,t)},n.map.resize=Bt,n.methodDict.resize="resizable",r.actions.resize=Bt.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){!function(t){var n=t.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var e=t.iEvent,i=n.rect;n._rects={start:Z({},i),corrected:Z({},i),previous:Z({},i),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},e.edges=n.prepared.edges,e.rect=n._rects.corrected,e.deltaRect=n._rects.delta}}(t),Ut(t)},"interactions:action-move":function(t){!function(t){var n=t.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var e=t.iEvent,i=n.interactable.options.resize.invert,r="reposition"===i||"negate"===i,o=n.rect,a=n._rects,s=a.start,u=a.corrected,c=a.delta,f=a.previous;if(Z(f,u),r){if(Z(u,o),"reposition"===i){if(u.top>u.bottom){var l=u.top;u.top=u.bottom,u.bottom=l}if(u.left>u.right){var h=u.left;u.left=u.right,u.right=h}}}else u.top=Math.min(o.top,s.bottom),u.bottom=Math.max(o.bottom,s.top),u.left=Math.min(o.left,s.right),u.right=Math.max(o.right,s.left);for(var v in u.width=u.right-u.left,u.height=u.bottom-u.top,u)c[v]=u[v]-f[v];e.edges=n.prepared.edges,e.rect=u,e.deltaRect=c}}(t),Ut(t)},"interactions:action-end":function(t){var n=t.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var e=t.iEvent;e.edges=n.prepared.edges,e.rect=n._rects.corrected,e.deltaRect=n._rects.delta}},"auto-start:check":function(t){var n=t.interaction,e=t.interactable,i=t.element,r=t.rect,o=t.buttons;if(r){var a=Z({},n.coords.cur.page),s=e.options.resize;if(s&&s.enabled&&(!n.pointerIsDown||!/mouse|pointer/.test(n.pointerType)||0!=(o&s.mouseButtons))){if(E(s.edges)){var u={left:!1,right:!1,top:!1,bottom:!1};for(var c in u)u[c]=Lt(c,s.edges[c],a,n._latestPointer.eventTarget,i,r,s.margin||Bt.defaultMargin);u.left=u.left&&!u.right,u.top=u.top&&!u.bottom,(u.left||u.right||u.top||u.bottom)&&(t.action={name:"resize",edges:u})}else{var f="y"!==s.axis&&a.x>r.right-Bt.defaultMargin,l="x"!==s.axis&&a.y>r.bottom-Bt.defaultMargin;(f||l)&&(t.action={name:"resize",axes:(f?"x":"")+(l?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var n=t.edges,e=t.axis,i=Bt.cursors,r=null;if(e)r=i[t.name+e];else if(n){for(var o="",a=0,s=["top","bottom","left","right"];a<s.length;a++){var u=s[a];n[u]&&(o+=u)}r=i[o]}return r},filterEventType:function(t){return 0===t.search("resize")},defaultMargin:null},qt=Bt,Gt={id:"actions",install:function(t){t.usePlugin($t),t.usePlugin(qt),t.usePlugin(A),t.usePlugin(Ft)}},Kt=0,Wt=function(t){return Nt(t)},Ht=function(t){return Vt(t)},Jt=function(t){if(Vt=t.cancelAnimationFrame,!(Nt=t.requestAnimationFrame))for(var n=["ms","moz","webkit","o"],e=0;e<n.length;e++){var i=n[e];Nt=t["".concat(i,"RequestAnimationFrame")],Vt=t["".concat(i,"CancelAnimationFrame")]||t["".concat(i,"CancelRequestAnimationFrame")]}Nt=Nt&&Nt.bind(t),Vt=Vt&&Vt.bind(t),Nt||(Nt=function(n){var e=Date.now(),i=Math.max(0,16-(e-Kt)),r=t.setTimeout((function(){n(e+i)}),i);return Kt=e+i,r},Vt=function(t){return clearTimeout(t)})},Qt={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(t){Qt.isScrolling=!0,Ht(Qt.i),t.autoScroll=Qt,Qt.interaction=t,Qt.prevTime=Qt.now(),Qt.i=Wt(Qt.scroll)},stop:function(){Qt.isScrolling=!1,Qt.interaction&&(Qt.interaction.autoScroll=null),Ht(Qt.i)},scroll:function(){var t=Qt.interaction,n=t.interactable,e=t.element,i=n.options[t.prepared.name].autoScroll,r=Zt(i.container,n,e),o=Qt.now(),a=i.speed*((o-Qt.prevTime)/1e3);if(a>=1){var s={x:Qt.x*a,y:Qt.y*a};if(s.x||s.y){var u=tn(r);k(r)?r.scrollBy(s.x,s.y):r&&(r.scrollLeft+=s.x,r.scrollTop+=s.y);var c=tn(r),f={x:c.x-u.x,y:c.y-u.y};(f.x||f.y)&&n.fire({type:"autoscroll",target:e,interactable:n,delta:f,interaction:t,container:r})}Qt.prevTime=o}Qt.isScrolling&&(Ht(Qt.i),Qt.i=Wt(Qt.scroll))},check:function(t,n){var e;return null==(e=t.options[n].autoScroll)?void 0:e.enabled},onInteractionMove:function(t){var n=t.interaction,e=t.pointer;if(n.interacting()&&Qt.check(n.interactable,n.prepared.name))if(n.simulation)Qt.x=Qt.y=0;else{var i,r,o,a,s=n.interactable,u=s.options[n.prepared.name].autoScroll,c=Zt(u.container,s,n.element);if(k(c))a=e.clientX<Qt.margin,i=e.clientY<Qt.margin,r=e.clientX>c.innerWidth-Qt.margin,o=e.clientY>c.innerHeight-Qt.margin;else{var f=W(c);a=e.clientX<f.left+Qt.margin,i=e.clientY<f.top+Qt.margin,r=e.clientX>f.right-Qt.margin,o=e.clientY>f.bottom-Qt.margin}Qt.x=r?1:a?-1:0,Qt.y=o?1:i?-1:0,Qt.isScrolling||(Qt.margin=u.margin,Qt.speed=u.speed,Qt.start(n))}}};function Zt(t,n,e){return(z(t)?tt(t,n,e):t)||b(e)}function tn(t){return k(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var nn={id:"auto-scroll",install:function(t){var n=t.defaults,e=t.actions;t.autoScroll=Qt,Qt.now=function(){return t.now()},e.phaselessTypes.autoscroll=!0,n.perAction.autoScroll=Qt.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,Qt.stop(),Qt.interaction&&(Qt.interaction=null)},"interactions:stop":Qt.stop,"interactions:action-move":function(t){return Qt.onInteractionMove(t)}}};function en(t,n){var e=!1;return function(){return e||(g.console.warn(n),e=!0),t.apply(this,arguments)}}function rn(t,n){return t.name=n.name,t.axis=n.axis,t.edges=n.edges,t}function on(t){return S(t)?(this.options.styleCursor=t,this):null===t?(delete this.options.styleCursor,this):this.options.styleCursor}function an(t){return T(t)?(this.options.actionChecker=t,this):null===t?(delete this.options.actionChecker,this):this.options.actionChecker}var sn={id:"auto-start/interactableMethods",install:function(t){var n=t.Interactable;n.prototype.getAction=function(n,e,i,r){var o=function(t,n,e,i,r){var o=t.getRect(i),a={action:null,interactable:t,interaction:e,element:i,rect:o,buttons:n.buttons||{0:1,1:4,3:8,4:16}[n.button]};return r.fire("auto-start:check",a),a.action}(this,e,i,r,t);return this.options.actionChecker?this.options.actionChecker(n,e,o,this,r,i):o},n.prototype.ignoreFrom=en((function(t){return this._backCompatOption("ignoreFrom",t)}),"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),n.prototype.allowFrom=en((function(t){return this._backCompatOption("allowFrom",t)}),"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),n.prototype.actionChecker=an,n.prototype.styleCursor=on}};function un(t,n,e,i,r){return n.testIgnoreAllow(n.options[t.name],e,i)&&n.options[t.name].enabled&&hn(n,e,t,r)?t:null}function cn(t,n,e,i,r,o,a){for(var s=0,u=i.length;s<u;s++){var c=i[s],f=r[s],l=c.getAction(n,e,t,f);if(l){var h=un(l,c,f,o,a);if(h)return{action:h,interactable:c,element:f}}}return{action:null,interactable:null,element:null}}function fn(t,n,e,i,r){var o=[],a=[],s=i;function u(t){o.push(t),a.push(s)}for(;I(s);){o=[],a=[],r.interactables.forEachMatch(s,u);var c=cn(t,n,e,o,a,i,r);if(c.action&&!c.interactable.options[c.action.name].manualStart)return c;s=N(s)}return{action:null,interactable:null,element:null}}function ln(t,n,e){var i=n.action,r=n.interactable,o=n.element;i=i||{name:null},t.interactable=r,t.element=o,rn(t.prepared,i),t.rect=r&&i.name?r.getRect(o):null,pn(t,e),e.fire("autoStart:prepared",{interaction:t})}function hn(t,n,e,i){var r=t.options,o=r[e.name].max,a=r[e.name].maxPerElement,s=i.autoStart.maxInteractions,u=0,c=0,f=0;if(!(o&&a&&s))return!1;for(var l=0,h=i.interactions.list;l<h.length;l++){var v=h[l],d=v.prepared.name;if(v.interacting()){if(++u>=s)return!1;if(v.interactable===t){if((c+=d===e.name?1:0)>=o)return!1;if(v.element===n&&(f++,d===e.name&&f>=a))return!1}}}return s>0}function vn(t,n){return O(t)?(n.autoStart.maxInteractions=t,this):n.autoStart.maxInteractions}function dn(t,n,e){var i=e.autoStart.cursorElement;i&&i!==t&&(i.style.cursor=""),t.ownerDocument.documentElement.style.cursor=n,t.style.cursor=n,e.autoStart.cursorElement=n?t:null}function pn(t,n){var e=t.interactable,i=t.element,r=t.prepared;if("mouse"===t.pointerType&&e&&e.options.styleCursor){var o="";if(r.name){var a=e.options[r.name].cursorChecker;o=T(a)?a(r,e,i,t._interacting):n.actions.map[r.name].getCursor(r)}dn(t.element,o||"",n)}else n.autoStart.cursorElement&&dn(n.autoStart.cursorElement,"",n)}var yn={id:"auto-start/base",before:["actions"],install:function(t){var n=t.interactStatic,e=t.defaults;t.usePlugin(sn),e.base.actionChecker=null,e.base.styleCursor=!0,Z(e.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),n.maxInteractions=function(n){return vn(n,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:hn,cursorElement:null}},listeners:{"interactions:down":function(t,n){var e=t.interaction,i=t.pointer,r=t.event,o=t.eventTarget;e.interacting()||ln(e,fn(e,i,r,o,n),n)},"interactions:move":function(t,n){!function(t,n){var e=t.interaction,i=t.pointer,r=t.event,o=t.eventTarget;"mouse"!==e.pointerType||e.pointerIsDown||e.interacting()||ln(e,fn(e,i,r,o,n),n)}(t,n),function(t,n){var e=t.interaction;if(e.pointerIsDown&&!e.interacting()&&e.pointerWasMoved&&e.prepared.name){n.fire("autoStart:before-start",t);var i=e.interactable,r=e.prepared.name;r&&i&&(i.options[r].manualStart||!hn(i,e.element,e.prepared,n)?e.stop():(e.start(e.prepared,i,e.element),pn(e,n)))}}(t,n)},"interactions:stop":function(t,n){var e=t.interaction,i=e.interactable;i&&i.options.styleCursor&&dn(e.element,"",n)}},maxInteractions:vn,withinInteractionLimit:hn,validateAction:un},gn={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,n){var e=t.interaction,i=t.eventTarget,r=t.dy;if("drag"===e.prepared.name){var o=Math.abs(t.dx),a=Math.abs(r),s=e.interactable.options.drag,u=s.startAxis,c=o>a?"x":o<a?"y":"xy";if(e.prepared.axis="start"===s.lockAxis?c[0]:s.lockAxis,"xy"!==c&&"xy"!==u&&u!==c){e.prepared.name=null;for(var f=i,l=function(t){if(t!==e.interactable){var r=e.interactable.options.drag;if(!r.manualStart&&t.testIgnoreAllow(r,f,i)){var o=t.getAction(e.downPointer,e.downEvent,e,f);if(o&&"drag"===o.name&&function(t,n){if(!n)return!1;var e=n.options.drag.startAxis;return"xy"===t||"xy"===e||e===t}(c,t)&&yn.validateAction(o,t,f,i,n))return t}}};I(f);){var h=n.interactables.forEachMatch(f,l);if(h){e.prepared.name="drag",e.interactable=h,e.element=f;break}f=N(f)}}}}}};function mn(t){var n=t.prepared&&t.prepared.name;if(!n)return null;var e=t.interactable.options;return e[n].hold||e[n].delay}var bn={id:"auto-start/hold",install:function(t){var n=t.defaults;t.usePlugin(yn),n.perAction.hold=0,n.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var n=t.interaction,e=mn(n);e>0&&(n.autoStartHoldTimer=setTimeout((function(){n.start(n.prepared,n.interactable,n.element)}),e))},"interactions:move":function(t){var n=t.interaction;n.autoStartHoldTimer&&n.pointerWasMoved&&!t.duplicate&&(clearTimeout(n.autoStartHoldTimer),n.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var n=t.interaction;mn(n)>0&&(n.prepared.name=null)}},getHoldDuration:mn},wn={id:"auto-start",install:function(t){t.usePlugin(yn),t.usePlugin(bn),t.usePlugin(gn)}},xn=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):S(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault};function kn(t){var n=t.interaction;n.interactable&&n.interactable.checkAndPreventDefault(t.event)}var Mn={id:"core/interactablePreventDefault",install:function(t){var n=t.Interactable;n.prototype.preventDefault=xn,n.prototype.checkAndPreventDefault=function(n){return function(t,n,e){var i=t.options.preventDefault;if("never"!==i)if("always"!==i){if(n.events.supportsPassive&&/^touch(start|move)$/.test(e.type)){var r=b(e.target).document,o=n.getDocOptions(r);if(!o||!o.events||!1!==o.events.passive)return}/^(mouse|pointer|touch)*(down|start)/i.test(e.type)||I(e.target)&&V(e.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||e.preventDefault()}else e.preventDefault()}(this,t,n)},t.interactions.docEvents.push({type:"dragstart",listener:function(n){for(var e=0,i=t.interactions.list;e<i.length;e++){var r=i[e];if(r.element&&(r.element===n.target||L(r.element,n.target)))return void r.interactable.checkAndPreventDefault(n)}}})},listeners:["down","move","up","cancel"].reduce((function(t,n){return t["interactions:".concat(n)]=kn,t}),{})};function En(t,n){if(n.phaselessTypes[t])return!0;for(var e in n.map)if(0===t.indexOf(e)&&t.substr(e.length)in n.phases)return!0;return!1}function Tn(t){var n={};for(var e in t){var i=t[e];n[e]=P(i)?Tn(i):j(i)?Ot(i):i}return n}var On=function(){function t(n){r(this,t),s(this,"states",[]),s(this,"startOffset",{left:0,right:0,top:0,bottom:0}),s(this,"startDelta",void 0),s(this,"result",void 0),s(this,"endResult",void 0),s(this,"startEdges",void 0),s(this,"edges",void 0),s(this,"interaction",void 0),this.interaction=n,this.result=Sn(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return a(t,[{key:"start",value:function(t,n){var e,i,r=t.phase,o=this.interaction,a=function(t){var n=t.interactable.options[t.prepared.name],e=n.modifiers;return e&&e.length?e:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map((function(t){var e=n[t];return e&&e.enabled&&{options:e,methods:e._methods}})).filter((function(t){return!!t}))}(o);this.prepareStates(a),this.startEdges=Z({},o.edges),this.edges=Z({},this.startEdges),this.startOffset=(i=n,(e=o.rect)?{left:i.x-e.left,top:i.y-e.top,right:e.right-i.x,bottom:e.bottom-i.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var s=this.fillArg({phase:r,pageCoords:n,preEnd:!1});return this.result=Sn(),this.startAll(s),this.result=this.setAll(s)}},{key:"fillArg",value:function(t){var n=this.interaction;return t.interaction=n,t.interactable=n.interactable,t.element=n.element,t.rect||(t.rect=n.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var n=0,e=this.states;n<e.length;n++){var i=e[n];i.methods.start&&(t.state=i,i.methods.start(t))}}},{key:"setAll",value:function(t){var n=t.phase,e=t.preEnd,i=t.skipModifiers,r=t.rect,o=t.edges;t.coords=Z({},t.pageCoords),t.rect=Z({},r),t.edges=Z({},o);for(var a=i?this.states.slice(i):this.states,s=Sn(t.coords,t.rect),u=0;u<a.length;u++){var c,f=a[u],l=f.options,h=Z({},t.coords),v=null;null!=(c=f.methods)&&c.set&&this.shouldDo(l,e,n)&&(t.state=f,v=f.methods.set(t),rt(t.edges,t.rect,{x:t.coords.x-h.x,y:t.coords.y-h.y})),s.eventProps.push(v)}Z(this.edges,t.edges),s.delta.x=t.coords.x-t.pageCoords.x,s.delta.y=t.coords.y-t.pageCoords.y,s.rectDelta.left=t.rect.left-r.left,s.rectDelta.right=t.rect.right-r.right,s.rectDelta.top=t.rect.top-r.top,s.rectDelta.bottom=t.rect.bottom-r.bottom;var d=this.result.coords,p=this.result.rect;return d&&p&&(s.changed=s.rect.left!==p.left||s.rect.right!==p.right||s.rect.top!==p.top||s.rect.bottom!==p.bottom||d.x!==s.coords.x||d.y!==s.coords.y),s}},{key:"applyToInteraction",value:function(t){var n=this.interaction,e=n.coords.cur,i=n.coords.start,r=this.result,o=this.startDelta,a=r.delta;"start"===t.phase&&Z(this.startDelta,r.delta);for(var s=0,u=[[i,o],[e,a]];s<u.length;s++){var c=u[s],f=c[0],l=c[1];f.page.x+=l.x,f.page.y+=l.y,f.client.x+=l.x,f.client.y+=l.y}var h=this.result.rectDelta,v=t.rect||n.rect;v.left+=h.left,v.right+=h.right,v.top+=h.top,v.bottom+=h.bottom,v.width=v.right-v.left,v.height=v.bottom-v.top}},{key:"setAndApply",value:function(t){var n=this.interaction,e=t.skipModifiers,i=this.setAll(this.fillArg({preEnd:t.preEnd,phase:t.phase,pageCoords:t.modifiedCoords||n.coords.cur.page}));if(this.result=i,!i.changed&&(!e||e<this.states.length)&&n.interacting())return!1;if(t.modifiedCoords){var r=n.coords.cur.page,o={x:t.modifiedCoords.x-r.x,y:t.modifiedCoords.y-r.y};i.coords.x+=o.x,i.coords.y+=o.y,i.delta.x+=o.x,i.delta.y+=o.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var n=t.interaction,e=t.event,i=this.states;if(i&&i.length){for(var r=!1,o=0;o<i.length;o++){var a=i[o];t.state=a;var s=a.options,u=a.methods,c=u.beforeEnd&&u.beforeEnd(t);if(c)return this.endResult=c,!1;r=r||!r&&this.shouldDo(s,!0,t.phase,!0)}r&&n.move({event:e,preEnd:!0})}}},{key:"stop",value:function(t){var n=t.interaction;if(this.states&&this.states.length){var e=Z({states:this.states,interactable:n.interactable,element:n.element,rect:null},t);this.fillArg(e);for(var i=0,r=this.states;i<r.length;i++){var o=r[i];e.state=o,o.methods.stop&&o.methods.stop(e)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var n=0;n<t.length;n++){var e=t[n];this.states.push({options:e.options,methods:e.methods,index:n,name:e.name})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var n=t.interaction,e=n.coords,i=n.rect,r=n.modification;if(r.result){for(var o=r.result,a=o.rectDelta,s=0,u=[[e.start,r.startDelta],[e.cur,o.delta]];s<u.length;s++){var c=u[s],f=c[0],l=c[1];f.page.x-=l.x,f.page.y-=l.y,f.client.x-=l.x,f.client.y-=l.y}i.left-=a.left,i.right-=a.right,i.top-=a.top,i.bottom-=a.bottom}}},{key:"shouldDo",value:function(t,n,e,i){return!(!t||!1===t.enabled||i&&!t.endOnly||t.endOnly&&!n||"start"===e&&!t.setStart)}},{key:"copyFrom",value:function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map((function(t){return Tn(t)})),this.result=Sn(Z({},t.result.coords),Z({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),t}();function Sn(t,n){return{rect:n,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function zn(t,n){var e=t.defaults,i={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},r=function(t){var r=t||{};for(var o in r.enabled=!1!==r.enabled,e)o in r||(r[o]=e[o]);var a={options:r,methods:i,name:n,enable:function(){return r.enabled=!0,a},disable:function(){return r.enabled=!1,a}};return a};return n&&"string"==typeof n&&(r._defaults=e,r._methods=i),r}function In(t){var n=t.interaction.modification.result;n&&(t.iEvent.modifiers=n.eventProps)}var Pn={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var n=t.interaction;n.modification=new On(n)},"interactions:before-action-start":function(t){var n=t.interaction,e=t.interaction.modification;e.start(t,n.coords.start.page),n.edges=e.edges,e.applyToInteraction(t)},"interactions:before-action-move":function(t){var n=t.interaction,e=n.modification,i=e.setAndApply(t);return n.edges=e.edges,i},"interactions:before-action-end":function(t){var n=t.interaction,e=n.modification,i=e.beforeEnd(t);return n.edges=e.startEdges,i},"interactions:action-start":In,"interactions:action-move":In,"interactions:action-end":In,"interactions:after-action-start":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-move":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:stop":function(t){return t.interaction.modification.stop(t)}}},jn={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},_n=function(t){u(e,t);var n=h(e);function e(t,i,o,a,u,c,f){var h;r(this,e),s(l(h=n.call(this,t)),"relatedTarget",null),s(l(h),"screenX",void 0),s(l(h),"screenY",void 0),s(l(h),"button",void 0),s(l(h),"buttons",void 0),s(l(h),"ctrlKey",void 0),s(l(h),"shiftKey",void 0),s(l(h),"altKey",void 0),s(l(h),"metaKey",void 0),s(l(h),"page",void 0),s(l(h),"client",void 0),s(l(h),"delta",void 0),s(l(h),"rect",void 0),s(l(h),"x0",void 0),s(l(h),"y0",void 0),s(l(h),"t0",void 0),s(l(h),"dt",void 0),s(l(h),"duration",void 0),s(l(h),"clientX0",void 0),s(l(h),"clientY0",void 0),s(l(h),"velocity",void 0),s(l(h),"speed",void 0),s(l(h),"swipe",void 0),s(l(h),"axes",void 0),s(l(h),"preEnd",void 0);var v=t.interactable,d=(v&&v.options||jn).deltaSource,p=ot(v,u=u||t.element,o),y="start"===a,g="end"===a,m=y?l(h):t.prevEvent,b=y?t.coords.start:g?{page:m.page,client:m.client,timeStamp:t.coords.cur.timeStamp}:t.coords.cur;return h.page=Z({},b.page),h.client=Z({},b.client),h.rect=Z({},t.rect),h.timeStamp=b.timeStamp,g||(h.page.x-=p.x,h.page.y-=p.y,h.client.x-=p.x,h.client.y-=p.y),h.ctrlKey=i.ctrlKey,h.altKey=i.altKey,h.shiftKey=i.shiftKey,h.metaKey=i.metaKey,h.button=i.button,h.buttons=i.buttons,h.target=u,h.currentTarget=u,h.preEnd=c,h.type=f||o+(a||""),h.interactable=v,h.t0=y?t.pointers[t.pointers.length-1].downTime:m.t0,h.x0=t.coords.start.page.x-p.x,h.y0=t.coords.start.page.y-p.y,h.clientX0=t.coords.start.client.x-p.x,h.clientY0=t.coords.start.client.y-p.y,h.delta=y||g?{x:0,y:0}:{x:h[d].x-m[d].x,y:h[d].y-m[d].y},h.dt=t.coords.delta.timeStamp,h.duration=h.timeStamp-h.t0,h.velocity=Z({},t.coords.velocity[d]),h.speed=ut(h.velocity.x,h.velocity.y),h.swipe=g||"inertiastart"===a?h.getSwipe():null,h}return a(e,[{key:"getSwipe",value:function(){var t=this._interaction;if(t.prevEvent.speed<600||this.timeStamp-t.prevEvent.timeStamp>150)return null;var n=180*Math.atan2(t.prevEvent.velocityY,t.prevEvent.velocityX)/Math.PI;n<0&&(n+=360);var e=112.5<=n&&n<247.5,i=202.5<=n&&n<337.5;return{up:i,down:!i&&22.5<=n&&n<157.5,left:e,right:!e&&(292.5<=n||n<67.5),angle:n,speed:t.prevEvent.speed,velocity:{x:t.prevEvent.velocityX,y:t.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),e}(Et);Object.defineProperties(_n.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var Dn=a((function t(n,e,i,o,a){r(this,t),s(this,"id",void 0),s(this,"pointer",void 0),s(this,"event",void 0),s(this,"downTime",void 0),s(this,"downTarget",void 0),this.id=n,this.pointer=e,this.event=i,this.downTime=o,this.downTarget=a})),Rn=function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t}({}),An=function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t}({}),Cn=0,Fn=function(){function t(n){var e=this,i=n.pointerType,o=n.scopeFire;r(this,t),s(this,"interactable",null),s(this,"element",null),s(this,"rect",null),s(this,"_rects",void 0),s(this,"edges",null),s(this,"_scopeFire",void 0),s(this,"prepared",{name:null,axis:null,edges:null}),s(this,"pointerType",void 0),s(this,"pointers",[]),s(this,"downEvent",null),s(this,"downPointer",{}),s(this,"_latestPointer",{pointer:null,event:null,eventTarget:null}),s(this,"prevEvent",null),s(this,"pointerIsDown",!1),s(this,"pointerWasMoved",!1),s(this,"_interacting",!1),s(this,"_ending",!1),s(this,"_stopped",!0),s(this,"_proxy",void 0),s(this,"simulation",null),s(this,"doMove",en((function(t){this.move(t)}),"The interaction.doMove() method has been renamed to interaction.move()")),s(this,"coords",{start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}}),s(this,"_id",Cn++),this._scopeFire=o,this.pointerType=i;var a=this;this._proxy={};var u=function(t){Object.defineProperty(e._proxy,t,{get:function(){return a[t]}})};for(var c in Rn)u(c);var f=function(t){Object.defineProperty(e._proxy,t,{value:function(){return a[t].apply(a,arguments)}})};for(var l in An)f(l);this._scopeFire("interactions:new",{interaction:this})}return a(t,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,n,e){var i=this.updatePointer(t,n,e,!0);this._scopeFire("interactions:down",{pointer:t,event:n,eventTarget:e,pointerIndex:i,pointerInfo:this.pointers[i],type:"down",interaction:this})}},{key:"start",value:function(t,n,e){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<("gesture"===t.name?2:1)||!n.options[t.name].enabled)&&(rn(this.prepared,t),this.interactable=n,this.element=e,this.rect=n.getRect(e),this.edges=this.prepared.edges?Z({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(t,n,e){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,n,e,!1);var i,r,o=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(this.pointerWasMoved=ut(i=this.coords.cur.client.x-this.coords.start.client.x,r=this.coords.cur.client.y-this.coords.start.client.y)>this.pointerMoveTolerance);var a,s,u,c=this.getPointerIndex(t),f={pointer:t,pointerIndex:c,pointerInfo:this.pointers[c],event:n,type:"move",eventTarget:e,dx:i,dy:r,duplicate:o,interaction:this};o||(a=this.coords.velocity,s=this.coords.delta,u=Math.max(s.timeStamp/1e3,.001),a.page.x=s.page.x/u,a.page.y=s.page.y/u,a.client.x=s.client.x/u,a.client.y=s.client.y/u,a.timeStamp=u),this._scopeFire("interactions:move",f),o||this.simulation||(this.interacting()&&(f.type=null,this.move(f)),this.pointerWasMoved&<(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||ht(this.coords.delta),(t=Z({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{})).phase="move",this._doPhase(t)}},{key:"pointerUp",value:function(t,n,e,i){var r=this.getPointerIndex(t);-1===r&&(r=this.updatePointer(t,n,e,!1));var o=/cancel$/i.test(n.type)?"cancel":"up";this._scopeFire("interactions:".concat(o),{pointer:t,pointerIndex:r,pointerInfo:this.pointers[r],event:n,eventTarget:e,type:o,curEventTarget:i,interaction:this}),this.simulation||this.end(n),this.removePointer(t,n)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var n;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(n=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,!0===n&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var n=yt(t);return"mouse"===this.pointerType||"pen"===this.pointerType?this.pointers.length-1:St(this.pointers,(function(t){return t.id===n}))}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,n,e,i){var r,o,a,s=yt(t),u=this.getPointerIndex(t),c=this.pointers[u];return i=!1!==i&&(i||/(down|start)$/i.test(n.type)),c?c.pointer=t:(c=new Dn(s,t,n,null,null),u=this.pointers.length,this.pointers.push(c)),function(t,n,e){var i=n.length>1?mt(n):n[0];pt(i,t.page),function(t,n){n=n||{},$.isOperaMobile&&vt(t)?dt("screen",t,n):dt("client",t,n)}(i,t.client),t.timeStamp=e}(this.coords.cur,this.pointers.map((function(t){return t.pointer})),this._now()),(r=this.coords.delta).page.x=(a=this.coords.cur).page.x-(o=this.coords.prev).page.x,r.page.y=a.page.y-o.page.y,r.client.x=a.client.x-o.client.x,r.client.y=a.client.y-o.client.y,r.timeStamp=a.timeStamp-o.timeStamp,i&&(this.pointerIsDown=!0,c.downTime=this.coords.cur.timeStamp,c.downTarget=e,ft(this.downPointer,t),this.interacting()||(lt(this.coords.start,this.coords.cur),lt(this.coords.prev,this.coords.cur),this.downEvent=n,this.pointerWasMoved=!1)),this._updateLatestPointer(t,n,e),this._scopeFire("interactions:update-pointer",{pointer:t,event:n,eventTarget:e,down:i,pointerInfo:c,pointerIndex:u,interaction:this}),u}},{key:"removePointer",value:function(t,n){var e=this.getPointerIndex(t);-1!==e&&(this._scopeFire("interactions:remove-pointer",{pointer:t,event:n,eventTarget:null,pointerIndex:e,pointerInfo:this.pointers[e],interaction:this}),this.pointers.splice(e,1),this.pointerIsDown=!1)}},{key:"_updateLatestPointer",value:function(t,n,e){this._latestPointer.pointer=t,this._latestPointer.event=n,this._latestPointer.eventTarget=e}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,n,e,i){return new _n(this,t,this.prepared.name,n,this.element,e,i)}},{key:"_fireEvent",value:function(t){var n;null==(n=this.interactable)||n.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var n=t.event,e=t.phase,i=t.preEnd,r=t.type,o=this.rect;if(o&&"move"===e&&(rt(this.edges,o,this.coords.delta[this.interactable.options.deltaSource]),o.width=o.right-o.left,o.height=o.bottom-o.top),!1===this._scopeFire("interactions:before-action-".concat(e),t))return!1;var a=t.iEvent=this._createPreparedEvent(n,e,i,r);return this._scopeFire("interactions:action-".concat(e),t),"start"===e&&(this.prevEvent=a),this._fireEvent(a),this._scopeFire("interactions:after-action-".concat(e),t),!0}},{key:"_now",value:function(){return Date.now()}}]),t}();function Xn(t){Yn(t.interaction)}function Yn(t){if(!function(t){return!(!t.offset.pending.x&&!t.offset.pending.y)}(t))return!1;var n=t.offset.pending;return Ln(t.coords.cur,n),Ln(t.coords.delta,n),rt(t.edges,t.rect,n),n.x=0,n.y=0,!0}function $n(t){var n=t.x,e=t.y;this.offset.pending.x+=n,this.offset.pending.y+=e,this.offset.total.x+=n,this.offset.total.y+=e}function Ln(t,n){var e=t.page,i=t.client,r=n.x,o=n.y;e.x+=r,e.y+=o,i.x+=r,i.y+=o}An.offsetBy="";var Un={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=$n},listeners:{"interactions:new":function(t){t.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(t){return function(t){t.pointerIsDown&&(Ln(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(t.interaction)},"interactions:before-action-start":Xn,"interactions:before-action-move":Xn,"interactions:before-action-end":function(t){var n=t.interaction;if(Yn(n))return n.move({offset:!0}),n.end(),!1},"interactions:stop":function(t){var n=t.interaction;n.offset.total.x=0,n.offset.total.y=0,n.offset.pending.x=0,n.offset.pending.y=0}}},Nn=function(){function t(n){r(this,t),s(this,"active",!1),s(this,"isModified",!1),s(this,"smoothEnd",!1),s(this,"allowResume",!1),s(this,"modification",void 0),s(this,"modifierCount",0),s(this,"modifierArg",void 0),s(this,"startCoords",void 0),s(this,"t0",0),s(this,"v0",0),s(this,"te",0),s(this,"targetOffset",void 0),s(this,"modifiedOffset",void 0),s(this,"currentOffset",void 0),s(this,"lambda_v0",0),s(this,"one_ve_v0",0),s(this,"timeout",void 0),s(this,"interaction",void 0),this.interaction=n}return a(t,[{key:"start",value:function(t){var n=this.interaction,e=Vn(n);if(!e||!e.enabled)return!1;var i=n.coords.velocity.client,r=ut(i.x,i.y),o=this.modification||(this.modification=new On(n));if(o.copyFrom(n.modification),this.t0=n._now(),this.allowResume=e.allowResume,this.v0=r,this.currentOffset={x:0,y:0},this.startCoords=n.coords.cur.page,this.modifierArg=o.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-n.coords.cur.timeStamp<50&&r>e.minSpeed&&r>e.endSpeed)this.startInertia();else{if(o.result=o.setAll(this.modifierArg),!o.result.changed)return!1;this.startSmoothEnd()}return n.modification.result.rect=null,n.offsetBy(this.targetOffset),n._doPhase({interaction:n,event:t,phase:"inertiastart"}),n.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),n.modification.result.rect=null,this.active=!0,n.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,n=this.interaction.coords.velocity.client,e=Vn(this.interaction),i=e.resistance,r=-Math.log(e.endSpeed/this.v0)/i;this.targetOffset={x:(n.x-r)/i,y:(n.y-r)/i},this.te=r,this.lambda_v0=i/this.v0,this.one_ve_v0=1-e.endSpeed/this.v0;var o=this.modification,a=this.modifierArg;a.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},o.result=o.setAll(a),o.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+o.result.delta.x,y:this.targetOffset.y+o.result.delta.y}),this.onNextFrame((function(){return t.inertiaTick()}))}},{key:"startSmoothEnd",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame((function(){return t.smoothEndTick()}))}},{key:"onNextFrame",value:function(t){var n=this;this.timeout=Wt((function(){n.active&&t()}))}},{key:"inertiaTick",value:function(){var t,n,e,i=this,r=this.interaction,o=Vn(r).resistance,a=(r._now()-this.t0)/1e3;if(a<this.te){var s,u=1-(Math.exp(-o*a)-this.lambda_v0)/this.one_ve_v0;this.isModified?(0,t=this.targetOffset.y,n=this.modifiedOffset.y,s={x:Bn(e=u,0,this.targetOffset.x,this.modifiedOffset.x),y:Bn(e,0,t,n)}):s={x:this.targetOffset.x*u,y:this.targetOffset.y*u};var c={x:s.x-this.currentOffset.x,y:s.y-this.currentOffset.y};this.currentOffset.x+=c.x,this.currentOffset.y+=c.y,r.offsetBy(c),r.move(),this.onNextFrame((function(){return i.inertiaTick()}))}else r.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,n=this.interaction,e=n._now()-this.t0,i=Vn(n).smoothEndDuration;if(e<i){var r={x:qn(e,0,this.targetOffset.x,i),y:qn(e,0,this.targetOffset.y,i)},o={x:r.x-this.currentOffset.x,y:r.y-this.currentOffset.y};this.currentOffset.x+=o.x,this.currentOffset.y+=o.y,n.offsetBy(o),n.move({skipModifiers:this.modifierCount}),this.onNextFrame((function(){return t.smoothEndTick()}))}else n.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var n=t.pointer,e=t.event,i=t.eventTarget,r=this.interaction;r.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),r.updatePointer(n,e,i,!0),r._doPhase({interaction:r,event:e,phase:"resume"}),lt(r.coords.prev,r.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,Ht(this.timeout)}}]),t}();function Vn(t){var n=t.interactable,e=t.prepared;return n&&n.options&&e.name&&n.options[e.name].inertia}function Bn(t,n,e,i){var r=1-t;return r*r*n+2*r*t*e+t*t*i}function qn(t,n,e,i){return-e*(t/=i)*(t-2)+n}var Gn={id:"inertia",before:["modifiers","actions"],install:function(t){var n=t.defaults;t.usePlugin(Un),t.usePlugin(Pn),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,n.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(t){var n=t.interaction;n.inertia=new Nn(n)},"interactions:before-action-end":function(t){var n=t.interaction;return(!n._interacting||n.simulation||!n.inertia.start(t.event))&&null},"interactions:down":function(t){var n=t.interaction,e=n.inertia;if(e.active)for(var i=t.eventTarget;I(i);){if(i===n.element){e.resume(t);break}i=N(i)}},"interactions:stop":function(t){var n=t.interaction.inertia;n.active&&n.stop()},"interactions:before-action-resume":function(t){var n=t.interaction.modification;n.stop(t),n.start(t,t.interaction.coords.cur.page),n.applyToInteraction(t)},"interactions:before-action-inertiastart":function(t){return t.interaction.modification.setAndApply(t)},"interactions:action-resume":In,"interactions:action-inertiastart":In,"interactions:after-action-inertiastart":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-resume":function(t){return t.interaction.modification.restoreInteractionCoords(t)}}};function Kn(t,n){for(var e=0;e<n.length;e++){var i=n[e];if(t.immediatePropagationStopped)break;i(t)}}var Wn=function(){function t(n){r(this,t),s(this,"options",void 0),s(this,"types",{}),s(this,"propagationStopped",!1),s(this,"immediatePropagationStopped",!1),s(this,"global",void 0),this.options=Z({},n||{})}return a(t,[{key:"fire",value:function(t){var n,e=this.global;(n=this.types[t.type])&&Kn(t,n),!t.propagationStopped&&e&&(n=e[t.type])&&Kn(t,n)}},{key:"on",value:function(t,n){var e=at(t,n);for(t in e)this.types[t]=Tt(this.types[t]||[],e[t])}},{key:"off",value:function(t,n){var e=at(t,n);for(t in e){var i=this.types[t];if(i&&i.length)for(var r=0,o=e[t];r<o.length;r++){var a=i.indexOf(o[r]);-1!==a&&i.splice(a,1)}}}},{key:"getRect",value:function(){return null}}]),t}(),Hn=function(){function t(n){r(this,t),s(this,"currentTarget",void 0),s(this,"originalEvent",void 0),s(this,"type",void 0),this.originalEvent=n,ft(this,n)}return a(t,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),t}();function Jn(t){return E(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function Qn(t,n){return t===n||("boolean"==typeof t?!!n.capture===t&&0==!!n.passive:!!t.capture==!!n.capture&&!!t.passive==!!n.passive)}var Zn={id:"events",install:function(t){var n,e=[],i={},r=[],o={add:a,remove:s,addDelegate:function(t,n,e,o,s){var f=Jn(s);if(!i[e]){i[e]=[];for(var l=0;l<r.length;l++){var h=r[l];a(h,e,u),a(h,e,c,!0)}}var v=i[e],d=zt(v,(function(e){return e.selector===t&&e.context===n}));d||v.push(d={selector:t,context:n,listeners:[]}),d.listeners.push({func:o,options:f})},removeDelegate:function(t,n,e,r,o){var a,f=Jn(o),l=i[e],h=!1;if(l)for(a=l.length-1;a>=0;a--){var v=l[a];if(v.selector===t&&v.context===n){for(var d=v.listeners,p=d.length-1;p>=0;p--){var y=d[p];if(y.func===r&&Qn(y.options,f)){d.splice(p,1),d.length||(l.splice(a,1),s(n,e,u),s(n,e,c,!0)),h=!0;break}}if(h)break}}},delegateListener:u,delegateUseCapture:c,delegatedEvents:i,documents:r,targets:e,supportsOptions:!1,supportsPassive:!1};function a(t,n,i,r){if(t.addEventListener){var a=Jn(r),s=zt(e,(function(n){return n.eventTarget===t}));s||e.push(s={eventTarget:t,events:{}}),s.events[n]||(s.events[n]=[]),zt(s.events[n],(function(t){return t.func===i&&Qn(t.options,a)}))||(t.addEventListener(n,i,o.supportsOptions?a:a.capture),s.events[n].push({func:i,options:a}))}}function s(t,n,i,r){if(t.addEventListener&&t.removeEventListener){var a=St(e,(function(n){return n.eventTarget===t})),u=e[a];if(u&&u.events)if("all"!==n){var c=!1,f=u.events[n];if(f){if("all"===i){for(var l=f.length-1;l>=0;l--){var h=f[l];s(t,n,h.func,h.options)}return}for(var v=Jn(r),d=0;d<f.length;d++){var p=f[d];if(p.func===i&&Qn(p.options,v)){t.removeEventListener(n,i,o.supportsOptions?v:v.capture),f.splice(d,1),0===f.length&&(delete u.events[n],c=!0);break}}}c&&!Object.keys(u.events).length&&e.splice(a,1)}else for(n in u.events)u.events.hasOwnProperty(n)&&s(t,n,"all")}}function u(t,n){for(var e=Jn(n),r=new Hn(t),o=i[t.type],a=Mt(t)[0],s=a;I(s);){for(var u=0;u<o.length;u++){var c=o[u],f=c.context;if(V(s,c.selector)&&L(f,a)&&L(f,s)){var l=c.listeners;r.currentTarget=s;for(var h=0;h<l.length;h++){var v=l[h];Qn(v.options,e)&&v.func(r)}}}s=N(s)}}function c(t){return u(t,!0)}return null==(n=t.document)||n.createElement("div").addEventListener("test",null,{get capture(){return o.supportsOptions=!0},get passive(){return o.supportsPassive=!0}}),t.events=o,o}},te={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var n=0,e=te.methodOrder;n<e.length;n++){var i=te[e[n]](t);if(i)return i}return null},simulationResume:function(t){var n=t.pointerType,e=t.eventTarget,i=t.scope;if(!/down|start/i.test(t.eventType))return null;for(var r=0,o=i.interactions.list;r<o.length;r++){var a=o[r],s=e;if(a.simulation&&a.simulation.allowResume&&a.pointerType===n)for(;s;){if(s===a.element)return a;s=N(s)}}return null},mouseOrPen:function(t){var n,e=t.pointerId,i=t.pointerType,r=t.eventType,o=t.scope;if("mouse"!==i&&"pen"!==i)return null;for(var a=0,s=o.interactions.list;a<s.length;a++){var u=s[a];if(u.pointerType===i){if(u.simulation&&!ne(u,e))continue;if(u.interacting())return u;n||(n=u)}}if(n)return n;for(var c=0,f=o.interactions.list;c<f.length;c++){var l=f[c];if(!(l.pointerType!==i||/down/i.test(r)&&l.simulation))return l}return null},hasPointer:function(t){for(var n=t.pointerId,e=0,i=t.scope.interactions.list;e<i.length;e++){var r=i[e];if(ne(r,n))return r}return null},idle:function(t){for(var n=t.pointerType,e=0,i=t.scope.interactions.list;e<i.length;e++){var r=i[e];if(1===r.pointers.length){var o=r.interactable;if(o&&(!o.options.gesture||!o.options.gesture.enabled))continue}else if(r.pointers.length>=2)continue;if(!r.interacting()&&n===r.pointerType)return r}return null}};function ne(t,n){return t.pointers.some((function(t){return t.id===n}))}var ee=te,ie=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function re(t,n){return function(e){var i=n.interactions.list,r=kt(e),o=Mt(e),a=o[0],s=o[1],u=[];if(/^touch/.test(e.type)){n.prevTouchTime=n.now();for(var c=0,f=e.changedTouches;c<f.length;c++){var l=f[c],h={pointer:l,pointerId:yt(l),pointerType:r,eventType:e.type,eventTarget:a,curEventTarget:s,scope:n},v=oe(h);u.push([h.pointer,h.eventTarget,h.curEventTarget,v])}}else{var d=!1;if(!$.supportsPointerEvent&&/mouse/.test(e.type)){for(var p=0;p<i.length&&!d;p++)d="mouse"!==i[p].pointerType&&i[p].pointerIsDown;d=d||n.now()-n.prevTouchTime<500||0===e.timeStamp}if(!d){var y={pointer:e,pointerId:yt(e),pointerType:r,eventType:e.type,curEventTarget:s,eventTarget:a,scope:n},g=oe(y);u.push([y.pointer,y.eventTarget,y.curEventTarget,g])}}for(var m=0;m<u.length;m++){var b=u[m];b[3][t](b[0],e,b[1],b[2])}}}function oe(t){var n=t.pointerType,e=t.scope,i={interaction:ee.search(t),searchDetails:t};return e.fire("interactions:find",i),i.interaction||e.interactions.new({pointerType:n})}function ae(t,n){var e=t.doc,i=t.scope,r=t.options,o=i.interactions.docEvents,a=i.events,s=a[n];for(var u in i.browser.isIOS&&!r.events&&(r.events={passive:!1}),a.delegatedEvents)s(e,u,a.delegateListener),s(e,u,a.delegateUseCapture,!0);for(var c=r&&r.events,f=0;f<o.length;f++){var l=o[f];s(e,l.type,l.listener,c)}}var se={id:"core/interactions",install:function(t){for(var n={},e=0;e<ie.length;e++){var i=ie[e];n[i]=re(i,t)}var o,s=$.pEventTypes;function c(){for(var n=0,e=t.interactions.list;n<e.length;n++){var i=e[n];if(i.pointerIsDown&&"touch"===i.pointerType&&!i._interacting)for(var r=function(){var n=a[o];t.documents.some((function(t){return L(t.doc,n.downTarget)}))||i.removePointer(n.pointer,n.event)},o=0,a=i.pointers;o<a.length;o++)r()}}(o=X.PointerEvent?[{type:s.down,listener:c},{type:s.down,listener:n.pointerDown},{type:s.move,listener:n.pointerMove},{type:s.up,listener:n.pointerUp},{type:s.cancel,listener:n.pointerUp}]:[{type:"mousedown",listener:n.pointerDown},{type:"mousemove",listener:n.pointerMove},{type:"mouseup",listener:n.pointerUp},{type:"touchstart",listener:c},{type:"touchstart",listener:n.pointerDown},{type:"touchmove",listener:n.pointerMove},{type:"touchend",listener:n.pointerUp},{type:"touchcancel",listener:n.pointerUp}]).push({type:"blur",listener:function(n){for(var e=0,i=t.interactions.list;e<i.length;e++)i[e].documentBlur(n)}}),t.prevTouchTime=0,t.Interaction=function(n){u(i,n);var e=h(i);function i(){return r(this,i),e.apply(this,arguments)}return a(i,[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(n){t.interactions.pointerMoveTolerance=n}},{key:"_now",value:function(){return t.now()}}]),i}(Fn),t.interactions={list:[],new:function(n){n.scopeFire=function(n,e){return t.fire(n,e)};var e=new t.Interaction(n);return t.interactions.list.push(e),e},listeners:n,docEvents:o,pointerMoveTolerance:1},t.usePlugin(Mn)},listeners:{"scope:add-document":function(t){return ae(t,"add")},"scope:remove-document":function(t){return ae(t,"remove")},"interactable:unset":function(t,n){for(var e=t.interactable,i=n.interactions.list.length-1;i>=0;i--){var r=n.interactions.list[i];r.interactable===e&&(r.stop(),n.fire("interactions:destroy",{interaction:r}),r.destroy(),n.interactions.list.length>2&&n.interactions.list.splice(i,1))}}},onDocSignal:ae,doOnInteractions:re,methodNames:ie},ue=function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t}(ue||{}),ce=function(){function t(n,e,i,o){r(this,t),s(this,"target",void 0),s(this,"options",void 0),s(this,"_actions",void 0),s(this,"events",new Wn),s(this,"_context",void 0),s(this,"_win",void 0),s(this,"_doc",void 0),s(this,"_scopeEvents",void 0),this._actions=e.actions,this.target=n,this._context=e.context||i,this._win=b(Q(n)?this._context:n),this._doc=this._win.document,this._scopeEvents=o,this.set(e)}return a(t,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,n){return T(n.onstart)&&this.on("".concat(t,"start"),n.onstart),T(n.onmove)&&this.on("".concat(t,"move"),n.onmove),T(n.onend)&&this.on("".concat(t,"end"),n.onend),T(n.oninertiastart)&&this.on("".concat(t,"inertiastart"),n.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,n,e){var i,r=this,o=null==(i=this._actions.map[t])?void 0:i.filterEventType,a=function(t){return(null==o||o(t))&&En(t,r._actions)};(j(n)||E(n))&&this._onOff(ue.Off,t,n,void 0,a),(j(e)||E(e))&&this._onOff(ue.On,t,e,void 0,a)}},{key:"setPerAction",value:function(t,n){var e=this._defaults;for(var i in n){var r=i,o=this.options[t],a=n[r];"listeners"===r&&this.updatePerActionListeners(t,o.listeners,a),j(a)?o[r]=Ot(a):P(a)?(o[r]=Z(o[r]||{},Tn(a)),E(e.perAction[r])&&"enabled"in e.perAction[r]&&(o[r].enabled=!1!==a.enabled)):S(a)&&E(e.perAction[r])?o[r].enabled=a:o[r]=a}}},{key:"getRect",value:function(t){return t=t||(I(this.target)?this.target:null),z(this.target)&&(t=t||this._context.querySelector(this.target)),H(t)}},{key:"rectChecker",value:function(t){var n=this;return T(t)?(this.getRect=function(e){var i=Z({},t.apply(n,e));return"width"in i||(i.width=i.right-i.left,i.height=i.bottom-i.top),i},this):null===t?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,n){if(Q(n)||E(n)){for(var e in this.options[t]=n,this._actions.map)this.options[e][t]=n;return this}return this.options[t]}},{key:"origin",value:function(t){return this._backCompatOption("origin",t)}},{key:"deltaSource",value:function(t){return"page"===t||"client"===t?(this.options.deltaSource=t,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var t=this.target;return z(t)?Array.from(this._context.querySelectorAll(t)):T(t)&&t.getAllElements?t.getAllElements():I(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||L(this._context,t)}},{key:"testIgnoreAllow",value:function(t,n,e){return!this.testIgnore(t.ignoreFrom,n,e)&&this.testAllow(t.allowFrom,n,e)}},{key:"testAllow",value:function(t,n,e){return!t||!!I(e)&&(z(t)?G(e,t,n):!!I(t)&&L(t,e))}},{key:"testIgnore",value:function(t,n,e){return!(!t||!I(e))&&(z(t)?G(e,t,n):!!I(t)&&L(t,e))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,n,e,i,r){E(n)&&!j(n)&&(i=e,e=null);var o=at(n,e,r);for(var a in o){"wheel"===a&&(a=$.wheelEvent);for(var s=0,u=o[a];s<u.length;s++){var c=u[s];En(a,this._actions)?this.events[t===ue.On?"on":"off"](a,c):z(this.target)?this._scopeEvents[t===ue.On?"addDelegate":"removeDelegate"](this.target,this._context,a,c,i):this._scopeEvents[t===ue.On?"add":"remove"](this.target,a,c,i)}}return this}},{key:"on",value:function(t,n,e){return this._onOff(ue.On,t,n,e)}},{key:"off",value:function(t,n,e){return this._onOff(ue.Off,t,n,e)}},{key:"set",value:function(t){var n=this._defaults;for(var e in E(t)||(t={}),this.options=Tn(n.base),this._actions.methodDict){var i=e,r=this._actions.methodDict[i];this.options[i]={},this.setPerAction(i,Z(Z({},n.perAction),n.actions[i])),this[r](t[i])}for(var o in t)"getRect"!==o?T(this[o])&&this[o](t[o]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(z(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var n=this._scopeEvents.delegatedEvents[t],e=n.length-1;e>=0;e--){var i=n[e],r=i.listeners;i.selector===this.target&&i.context===this._context&&n.splice(e,1);for(var o=r.length-1;o>=0;o--)this._scopeEvents.removeDelegate(this.target,this._context,t,r[o][0],r[o][1])}else this._scopeEvents.remove(this.target,"all")}}]),t}(),fe=function(){function t(n){var e=this;r(this,t),s(this,"list",[]),s(this,"selectorMap",{}),s(this,"scope",void 0),this.scope=n,n.addListeners({"interactable:unset":function(t){var n=t.interactable,i=n.target,r=z(i)?e.selectorMap[i]:i[e.scope.id],o=St(r,(function(t){return t===n}));r.splice(o,1)}})}return a(t,[{key:"new",value:function(t,n){n=Z(n||{},{actions:this.scope.actions});var e=new this.scope.Interactable(t,n,this.scope.document,this.scope.events);return this.scope.addDocument(e._doc),this.list.push(e),z(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(e)):(e.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(e)),this.scope.fire("interactable:new",{target:t,options:n,interactable:e,win:this.scope._win}),e}},{key:"getExisting",value:function(t,n){var e=n&&n.context||this.scope.document,i=z(t),r=i?this.selectorMap[t]:t[this.scope.id];if(r)return zt(r,(function(n){return n._context===e&&(i||n.inContext(t))}))}},{key:"forEachMatch",value:function(t,n){for(var e=0,i=this.list;e<i.length;e++){var r=i[e],o=void 0;if((z(r.target)?I(t)&&V(t,r.target):t===r.target)&&r.inContext(t)&&(o=n(r)),void 0!==o)return o}}}]),t}();function le(t){return t&&t.replace(/\/.*$/,"")}var he=new(function(){function t(){var n=this;r(this,t),s(this,"id","__interact_scope_".concat(Math.floor(100*Math.random()))),s(this,"isInitialized",!1),s(this,"listenerMaps",[]),s(this,"browser",$),s(this,"defaults",Tn(jn)),s(this,"Eventable",Wn),s(this,"actions",{map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}}),s(this,"interactStatic",function(t){var n=function n(e,i){var r=t.interactables.getExisting(e,i);return r||((r=t.interactables.new(e,i)).events.global=n.globalEvents),r};return n.getPointerAverage=mt,n.getTouchBBox=bt,n.getTouchDistance=wt,n.getTouchAngle=xt,n.getElementRect=H,n.getElementClientRect=W,n.matchesSelector=V,n.closest=U,n.globalEvents={},n.version="1.10.25",n.scope=t,n.use=function(t,n){return this.scope.usePlugin(t,n),this},n.isSet=function(t,n){return!!this.scope.interactables.get(t,n&&n.context)},n.on=en((function(t,n,e){if(z(t)&&-1!==t.search(" ")&&(t=t.trim().split(/ +/)),j(t)){for(var i=0,r=t;i<r.length;i++)this.on(r[i],n,e);return this}if(E(t)){for(var o in t)this.on(o,t[o],n);return this}return En(t,this.scope.actions)?this.globalEvents[t]?this.globalEvents[t].push(n):this.globalEvents[t]=[n]:this.scope.events.add(this.scope.document,t,n,{options:e}),this}),"The interact.on() method is being deprecated"),n.off=en((function(t,n,e){if(z(t)&&-1!==t.search(" ")&&(t=t.trim().split(/ +/)),j(t)){for(var i=0,r=t;i<r.length;i++)this.off(r[i],n,e);return this}if(E(t)){for(var o in t)this.off(o,t[o],n);return this}var a;return En(t,this.scope.actions)?t in this.globalEvents&&-1!==(a=this.globalEvents[t].indexOf(n))&&this.globalEvents[t].splice(a,1):this.scope.events.remove(this.scope.document,t,n,e),this}),"The interact.off() method is being deprecated"),n.debug=function(){return this.scope},n.supportsTouch=function(){return $.supportsTouch},n.supportsPointerEvent=function(){return $.supportsPointerEvent},n.stop=function(){for(var t=0,n=this.scope.interactions.list;t<n.length;t++)n[t].stop();return this},n.pointerMoveTolerance=function(t){return O(t)?(this.scope.interactions.pointerMoveTolerance=t,this):this.scope.interactions.pointerMoveTolerance},n.addDocument=function(t,n){this.scope.addDocument(t,n)},n.removeDocument=function(t){this.scope.removeDocument(t)},n}(this)),s(this,"InteractEvent",_n),s(this,"Interactable",void 0),s(this,"interactables",new fe(this)),s(this,"_win",void 0),s(this,"document",void 0),s(this,"window",void 0),s(this,"documents",[]),s(this,"_plugins",{list:[],map:{}}),s(this,"onWindowUnload",(function(t){return n.removeDocument(t.target)}));var e=this;this.Interactable=function(t){u(i,t);var n=h(i);function i(){return r(this,i),n.apply(this,arguments)}return a(i,[{key:"_defaults",get:function(){return e.defaults}},{key:"set",value:function(t){return v(c(i.prototype),"set",this).call(this,t),e.fire("interactable:set",{options:t,interactable:this}),this}},{key:"unset",value:function(){v(c(i.prototype),"unset",this).call(this);var t=e.interactables.list.indexOf(this);t<0||(e.interactables.list.splice(t,1),e.fire("interactable:unset",{interactable:this}))}}]),i}(ce)}return a(t,[{key:"addListeners",value:function(t,n){this.listenerMaps.push({id:n,map:t})}},{key:"fire",value:function(t,n){for(var e=0,i=this.listenerMaps;e<i.length;e++){var r=i[e].map[t];if(r&&!1===r(n,this,t))return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(t,n){return t.isInitialized=!0,k(n)&&m(n),X.init(n),$.init(n),Jt(n),t.window=n,t.document=n.document,t.usePlugin(se),t.usePlugin(Zn),t}(this,t)}},{key:"pluginIsInstalled",value:function(t){var n=t.id;return n?!!this._plugins.map[n]:-1!==this._plugins.list.indexOf(t)}},{key:"usePlugin",value:function(t,n){if(!this.isInitialized)return this;if(this.pluginIsInstalled(t))return this;if(t.id&&(this._plugins.map[t.id]=t),this._plugins.list.push(t),t.install&&t.install(this,n),t.listeners&&t.before){for(var e=0,i=this.listenerMaps.length,r=t.before.reduce((function(t,n){return t[n]=!0,t[le(n)]=!0,t}),{});e<i;e++){var o=this.listenerMaps[e].id;if(o&&(r[o]||r[le(o)]))break}this.listenerMaps.splice(e,0,{id:t.id,map:t.listeners})}else t.listeners&&this.listenerMaps.push({id:t.id,map:t.listeners});return this}},{key:"addDocument",value:function(t,n){if(-1!==this.getDocIndex(t))return!1;var e=b(t);n=n?Z({},n):{},this.documents.push({doc:t,options:n}),this.events.documents.push(t),t!==this.document&&this.events.add(e,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:e,scope:this,options:n})}},{key:"removeDocument",value:function(t){var n=this.getDocIndex(t),e=b(t),i=this.documents[n].options;this.events.remove(e,"unload",this.onWindowUnload),this.documents.splice(n,1),this.events.documents.splice(n,1),this.fire("scope:remove-document",{doc:t,window:e,scope:this,options:i})}},{key:"getDocIndex",value:function(t){for(var n=0;n<this.documents.length;n++)if(this.documents[n].doc===t)return n;return-1}},{key:"getDocOptions",value:function(t){var n=this.getDocIndex(t);return-1===n?null:this.documents[n].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),t}()),ve=he.interactStatic,de="undefined"!=typeof globalThis?globalThis:window;he.init(de);var pe=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(t){var n=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter((function(n){return n[0]in t||n[1]in t})),e=function(e,i){for(var r=t.limits,o=void 0===r?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:r,a=t.offset,s=void 0===a?{x:0,y:0}:a,u={range:t.range,grid:t,x:null,y:null},c=0;c<n.length;c++){var f=n[c],l=f[0],h=f[1],v=Math.round((e-s.x)/t[l]),d=Math.round((i-s.y)/t[h]);u[l]=Math.max(o.left,Math.min(o.right,v*t[l]+s.x)),u[h]=Math.max(o.top,Math.min(o.bottom,d*t[h]+s.y))}return u};return e.grid=t,e.coordFields=n,e}}),ye={id:"snappers",install:function(t){var n=t.interactStatic;n.snappers=Z(n.snappers||{},pe),n.createSnapGrid=n.snappers.grid}};function ge(t,n,e){var i=t.startCoords,r=t.edgeSign;n?e.y=i.y+(e.x-i.x)*r.y:e.x=i.x+(e.y-i.y)*r.x}function me(t,n,e,i){var r=t.startRect,o=t.startCoords,a=t.ratio,s=t.edgeSign;n?e.y=o.y+(i.width/a-r.height)*s.y:e.x=o.x+(i.height*a-r.width)*s.x}var be=zn({start:function(t){var n=t.state,i=t.rect,r=t.edges,o=n.options,a=o.ratio,s=o.enabled,u=n.options,c=u.equalDelta,f=u.modifiers;"preserve"===a&&(a=i.width/i.height),n.startCoords=Z({},t.pageCoords),n.startRect=Z({},i),n.ratio=a,n.equalDelta=c;var l=n.linkedEdges={top:r.top||r.left&&!r.bottom,left:r.left||r.top&&!r.right,bottom:r.bottom||r.right&&!r.top,right:r.right||r.bottom&&!r.left};if(n.xIsPrimaryAxis=!(!r.left&&!r.right),n.equalDelta){var h=(l.left?1:-1)*(l.top?1:-1);n.edgeSign={x:h,y:h}}else n.edgeSign={x:l.left?-1:1,y:l.top?-1:1};if(!1!==s&&Z(r,l),null!=f&&f.length){var v=new On(t.interaction);v.copyFrom(t.interaction.modification),v.prepareStates(f),n.subModification=v,v.startAll(e({},t))}},set:function(t){var n=t.state,i=t.rect,r=t.coords,o=n.linkedEdges,a=Z({},r),s=n.equalDelta?ge:me;if(Z(t.edges,o),s(n,n.xIsPrimaryAxis,r,i),!n.subModification)return null;var u=Z({},i);rt(o,u,{x:r.x-a.x,y:r.y-a.y});var c=n.subModification.setAll(e(e({},t),{},{rect:u,edges:o,pageCoords:r,prevCoords:r,prevRect:u})),f=c.delta;return c.changed&&(s(n,Math.abs(f.x)>Math.abs(f.y),c.coords,c.rect),Z(r,c.coords)),c.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}},"aspectRatio"),we=function(){};we._defaults={};var xe=we;function ke(t,n,e){return T(t)?nt(t,n.interactable,n.element,[e.x,e.y,n]):nt(t,n.interactable,n.element)}var Me={start:function(t){var n=t.rect,e=t.startOffset,i=t.state,r=t.interaction,o=t.pageCoords,a=i.options,s=a.elementRect,u=Z({left:0,top:0,right:0,bottom:0},a.offset||{});if(n&&s){var c=ke(a.restriction,r,o);if(c){var f=c.right-c.left-n.width,l=c.bottom-c.top-n.height;f<0&&(u.left+=f,u.right+=f),l<0&&(u.top+=l,u.bottom+=l)}u.left+=e.left-n.width*s.left,u.top+=e.top-n.height*s.top,u.right+=e.right-n.width*(1-s.right),u.bottom+=e.bottom-n.height*(1-s.bottom)}i.offset=u},set:function(t){var n=t.coords,e=t.state,i=e.offset,r=ke(e.options.restriction,t.interaction,n);if(r){var o=function(t){return!t||"left"in t&&"top"in t||((t=Z({},t)).left=t.x||0,t.top=t.y||0,t.right=t.right||t.left+t.width,t.bottom=t.bottom||t.top+t.height),t}(r);n.x=Math.max(Math.min(o.right-i.right,n.x),o.left+i.left),n.y=Math.max(Math.min(o.bottom-i.bottom,n.y),o.top+i.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Ee=zn(Me,"restrict"),Te={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Oe={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Se(t,n){for(var e=0,i=["top","left","bottom","right"];e<i.length;e++){var r=i[e];r in t||(t[r]=n[r])}return t}var ze={noInner:Te,noOuter:Oe,start:function(t){var n,e=t.interaction,i=t.startOffset,r=t.state,o=r.options;o&&(n=et(ke(o.offset,e,e.coords.start.page))),r.offset={top:(n=n||{x:0,y:0}).y+i.top,left:n.x+i.left,bottom:n.y-i.bottom,right:n.x-i.right}},set:function(t){var n=t.coords,e=t.edges,i=t.interaction,r=t.state,o=r.offset,a=r.options;if(e){var s=Z({},n),u=ke(a.inner,i,s)||{},c=ke(a.outer,i,s)||{};Se(u,Te),Se(c,Oe),e.top?n.y=Math.min(Math.max(c.top+o.top,s.y),u.top+o.top):e.bottom&&(n.y=Math.max(Math.min(c.bottom+o.bottom,s.y),u.bottom+o.bottom)),e.left?n.x=Math.min(Math.max(c.left+o.left,s.x),u.left+o.left):e.right&&(n.x=Math.max(Math.min(c.right+o.right,s.x),u.right+o.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Ie=zn(ze,"restrictEdges"),Pe=Z({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},Me.defaults),je=zn({start:Me.start,set:Me.set,defaults:Pe},"restrictRect"),_e={width:-1/0,height:-1/0},De={width:1/0,height:1/0},Re=zn({start:function(t){return ze.start(t)},set:function(t){var n=t.interaction,e=t.state,i=t.rect,r=t.edges,o=e.options;if(r){var a=it(ke(o.min,n,t.coords))||_e,s=it(ke(o.max,n,t.coords))||De;e.options={endOnly:o.endOnly,inner:Z({},ze.noInner),outer:Z({},ze.noOuter)},r.top?(e.options.inner.top=i.bottom-a.height,e.options.outer.top=i.bottom-s.height):r.bottom&&(e.options.inner.bottom=i.top+a.height,e.options.outer.bottom=i.top+s.height),r.left?(e.options.inner.left=i.right-a.width,e.options.outer.left=i.right-s.width):r.right&&(e.options.inner.right=i.left+a.width,e.options.outer.right=i.left+s.width),ze.set(t),e.options=o}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Ae={start:function(t){var n,e=t.interaction,i=t.interactable,r=t.element,o=t.rect,a=t.state,s=t.startOffset,u=a.options,c=u.offsetWithOrigin?function(t){var n=t.interaction.element;return et(nt(t.state.options.origin,null,null,[n]))||ot(t.interactable,n,t.interaction.prepared.name)}(t):{x:0,y:0};if("startCoords"===u.offset)n={x:e.coords.start.page.x,y:e.coords.start.page.y};else{var f=nt(u.offset,i,r,[e]);(n=et(f)||{x:0,y:0}).x+=c.x,n.y+=c.y}var l=u.relativePoints;a.offsets=o&&l&&l.length?l.map((function(t,e){return{index:e,relativePoint:t,x:s.left-o.width*t.x+n.x,y:s.top-o.height*t.y+n.y}})):[{index:0,relativePoint:null,x:n.x,y:n.y}]},set:function(t){var n=t.interaction,e=t.coords,i=t.state,r=i.options,o=i.offsets,a=ot(n.interactable,n.element,n.prepared.name),s=Z({},e),u=[];r.offsetWithOrigin||(s.x-=a.x,s.y-=a.y);for(var c=0,f=o;c<f.length;c++)for(var l=f[c],h=s.x-l.x,v=s.y-l.y,d=0,p=r.targets.length;d<p;d++){var y,g=r.targets[d];(y=T(g)?g(h,v,n._proxy,l,d):g)&&u.push({x:(O(y.x)?y.x:h)+l.x,y:(O(y.y)?y.y:v)+l.y,range:O(y.range)?y.range:r.range,source:g,index:d,offset:l})}for(var m={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},b=0;b<u.length;b++){var w=u[b],x=w.range,k=w.x-s.x,M=w.y-s.y,E=ut(k,M),S=E<=x;x===1/0&&m.inRange&&m.range!==1/0&&(S=!1),m.target&&!(S?m.inRange&&x!==1/0?E/x<m.distance/m.range:x===1/0&&m.range!==1/0||E<m.distance:!m.inRange&&E<m.distance)||(m.target=w,m.distance=E,m.range=x,m.inRange=S,m.delta.x=k,m.delta.y=M)}return m.inRange&&(e.x=m.target.x,e.y=m.target.y),i.closest=m,m},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Ce=zn(Ae,"snap"),Fe={start:function(t){var n=t.state,e=t.edges,i=n.options;if(!e)return null;t.state={options:{targets:null,relativePoints:[{x:e.left?0:1,y:e.top?0:1}],offset:i.offset||"self",origin:{x:0,y:0},range:i.range}},n.targetFields=n.targetFields||[["width","height"],["x","y"]],Ae.start(t),n.offsets=t.state.offsets,t.state=n},set:function(t){var n=t.interaction,e=t.state,i=t.coords,r=e.options,o=e.offsets,a={x:i.x-o[0].x,y:i.y-o[0].y};e.options=Z({},r),e.options.targets=[];for(var s=0,u=r.targets||[];s<u.length;s++){var c=u[s],f=void 0;if(f=T(c)?c(a.x,a.y,n):c){for(var l=0,h=e.targetFields;l<h.length;l++){var v=h[l],d=v[0],p=v[1];if(d in f||p in f){f.x=f[d],f.y=f[p];break}}e.options.targets.push(f)}}var y=Ae.set(t);return e.options=r,y},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Xe=zn(Fe,"snapSize"),Ye={aspectRatio:be,restrictEdges:Ie,restrict:Ee,restrictRect:je,restrictSize:Re,snapEdges:zn({start:function(t){var n=t.edges;return n?(t.state.targetFields=t.state.targetFields||[[n.left?"left":"right",n.top?"top":"bottom"]],Fe.start(t)):null},set:Fe.set,defaults:Z(Tn(Fe.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Ce,snapSize:Xe,spring:xe,avoid:xe,transform:xe,rubberband:xe},$e={id:"modifiers",install:function(t){var n=t.interactStatic;for(var e in t.usePlugin(Pn),t.usePlugin(ye),n.modifiers=Ye,Ye){var i=Ye[e],r=i._defaults;r._methods=i._methods,t.defaults.perAction[e]=r}}},Le=function(t){u(e,t);var n=h(e);function e(t,i,o,a,s,u){var c;if(r(this,e),ft(l(c=n.call(this,s)),o),o!==i&&ft(l(c),i),c.timeStamp=u,c.originalEvent=o,c.type=t,c.pointerId=yt(i),c.pointerType=kt(i),c.target=a,c.currentTarget=null,"tap"===t){var f=s.getPointerIndex(i);c.dt=c.timeStamp-s.pointers[f].downTime,c.double=!!s.prevTap&&"doubletap"!==s.prevTap.type&&s.prevTap.target===c.target&&c.timeStamp-s.tapTime<500}else"doubletap"===t&&(c.dt=i.timeStamp-s.tapTime,c.double=!0);return c}return a(e,[{key:"_subtractOrigin",value:function(t){var n=t.x,e=t.y;return this.pageX-=n,this.pageY-=e,this.clientX-=n,this.clientY-=e,this}},{key:"_addOrigin",value:function(t){var n=t.x,e=t.y;return this.pageX+=n,this.pageY+=e,this.clientX+=n,this.clientY+=e,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),e}(Et),Ue={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=Ue,t.defaults.actions.pointerEvents=Ue.defaults,Z(t.actions.phaselessTypes,Ue.types)},listeners:{"interactions:new":function(t){var n=t.interaction;n.prevTap=null,n.tapTime=0},"interactions:update-pointer":function(t){var n=t.pointerInfo;!t.down&&n.hold||(n.hold={duration:1/0,timeout:null})},"interactions:move":function(t,n){var e=t.interaction,i=t.pointer,r=t.event,o=t.eventTarget;t.duplicate||e.pointerIsDown&&!e.pointerWasMoved||(e.pointerIsDown&&Be(t),Ne({interaction:e,pointer:i,event:r,eventTarget:o,type:"move"},n))},"interactions:down":function(t,n){!function(t,n){for(var e=t.interaction,i=t.pointer,r=t.event,o=t.eventTarget,a=e.pointers[t.pointerIndex].hold,s=J(o),u={interaction:e,pointer:i,event:r,eventTarget:o,type:"hold",targets:[],path:s,node:null},c=0;c<s.length;c++)u.node=s[c],n.fire("pointerEvents:collect-targets",u);if(u.targets.length){for(var f=1/0,l=0,h=u.targets;l<h.length;l++){var v=h[l].eventable.options.holdDuration;v<f&&(f=v)}a.duration=f,a.timeout=setTimeout((function(){Ne({interaction:e,eventTarget:o,pointer:i,event:r,type:"hold"},n)}),f)}}(t,n),Ne(t,n)},"interactions:up":function(t,n){Be(t),Ne(t,n),function(t,n){var e=t.interaction;e.pointerWasMoved||Ne({interaction:e,eventTarget:t.eventTarget,pointer:t.pointer,event:t.event,type:"tap"},n)}(t,n)},"interactions:cancel":function(t,n){Be(t),Ne(t,n)}},PointerEvent:Le,fire:Ne,collectEventTargets:Ve,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function Ne(t,n){var e=t.interaction,i=t.pointer,r=t.event,o=t.eventTarget,a=t.type,s=t.targets,u=void 0===s?Ve(t,n):s,c=new Le(a,i,r,o,e,n.now());n.fire("pointerEvents:new",{pointerEvent:c});for(var f={interaction:e,pointer:i,event:r,eventTarget:o,targets:u,type:a,pointerEvent:c},l=0;l<u.length;l++){var h=u[l];for(var v in h.props||{})c[v]=h.props[v];var d=ot(h.eventable,h.node);if(c._subtractOrigin(d),c.eventable=h.eventable,c.currentTarget=h.node,h.eventable.fire(c),c._addOrigin(d),c.immediatePropagationStopped||c.propagationStopped&&l+1<u.length&&u[l+1].node!==c.currentTarget)break}if(n.fire("pointerEvents:fired",f),"tap"===a){var p=c.double?Ne({interaction:e,pointer:i,event:r,eventTarget:o,type:"doubletap"},n):c;e.prevTap=p,e.tapTime=p.timeStamp}return c}function Ve(t,n){var e=t.interaction,i=t.pointer,r=t.event,o=t.eventTarget,a=t.type,s=e.getPointerIndex(i),u=e.pointers[s];if("tap"===a&&(e.pointerWasMoved||!u||u.downTarget!==o))return[];for(var c=J(o),f={interaction:e,pointer:i,event:r,eventTarget:o,type:a,path:c,targets:[],node:null},l=0;l<c.length;l++)f.node=c[l],n.fire("pointerEvents:collect-targets",f);return"hold"===a&&(f.targets=f.targets.filter((function(t){var n,i;return t.eventable.options.holdDuration===(null==(n=e.pointers[s])||null==(i=n.hold)?void 0:i.duration)}))),f.targets}function Be(t){var n=t.interaction.pointers[t.pointerIndex].hold;n&&n.timeout&&(clearTimeout(n.timeout),n.timeout=null)}var qe=Object.freeze({__proto__:null,default:Ue});function Ge(t){var n=t.interaction;n.holdIntervalHandle&&(clearInterval(n.holdIntervalHandle),n.holdIntervalHandle=null)}var Ke={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin(Ue);var n=t.pointerEvents;n.defaults.holdRepeatInterval=0,n.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce((function(t,n){return t["pointerEvents:".concat(n)]=Ge,t}),{"pointerEvents:new":function(t){var n=t.pointerEvent;"hold"===n.type&&(n.count=(n.count||0)+1)},"pointerEvents:fired":function(t,n){var e=t.interaction,i=t.pointerEvent,r=t.eventTarget,o=t.targets;if("hold"===i.type&&o.length){var a=o[0].eventable.options.holdRepeatInterval;a<=0||(e.holdIntervalHandle=setTimeout((function(){n.pointerEvents.fire({interaction:e,eventTarget:r,type:"hold",pointer:i,event:i},n)}),a))}}})},We={id:"pointer-events/interactableTargets",install:function(t){var n=t.Interactable;n.prototype.pointerEvents=function(t){return Z(this.events.options,t),this};var e=n.prototype._backCompatOption;n.prototype._backCompatOption=function(t,n){var i=e.call(this,t,n);return i===this&&(this.events.options[t]=n),i}},listeners:{"pointerEvents:collect-targets":function(t,n){var e=t.targets,i=t.node,r=t.type,o=t.eventTarget;n.interactables.forEachMatch(i,(function(t){var n=t.events;n.types[r]&&n.types[r].length&&t.testIgnoreAllow(n.options,i,o)&&e.push({node:i,eventable:n,props:{interactable:t}})}))},"interactable:new":function(t){var n=t.interactable;n.events.getRect=function(t){return n.getRect(t)}},"interactable:set":function(t,n){var e=t.interactable,i=t.options;Z(e.events.options,n.pointerEvents.defaults),Z(e.events.options,i.pointerEvents||{})}}},He={id:"pointer-events",install:function(t){t.usePlugin(qe),t.usePlugin(Ke),t.usePlugin(We)}},Je={id:"reflow",install:function(t){var n=t.Interactable;t.actions.phases.reflow=!0,n.prototype.reflow=function(n){return function(t,n,e){for(var i=t.getAllElements(),r=e.window.Promise,o=r?[]:null,a=function(){var a=i[s],u=t.getRect(a);if(!u)return 1;var c,f=zt(e.interactions.list,(function(e){return e.interacting()&&e.interactable===t&&e.element===a&&e.prepared.name===n.name}));if(f)f.move(),o&&(c=f._reflowPromise||new r((function(t){f._reflowResolve=t})));else{var l=it(u),h=function(t){return{coords:t,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:l.x,y:l.y},client:{x:l.x,y:l.y},timeStamp:e.now()});c=function(t,n,e,i,r){var o=t.interactions.new({pointerType:"reflow"}),a={interaction:o,event:r,pointer:r,eventTarget:e,phase:"reflow"};o.interactable=n,o.element=e,o.prevEvent=r,o.updatePointer(r,r,e,!0),ht(o.coords.delta),rn(o.prepared,i),o._doPhase(a);var s=t.window.Promise,u=s?new s((function(t){o._reflowResolve=t})):void 0;return o._reflowPromise=u,o.start(i,n,e),o._interacting?(o.move(a),o.end(r)):(o.stop(),o._reflowResolve()),o.removePointer(r,r),u}(e,t,a,n,h)}o&&o.push(c)},s=0;s<i.length&&!a();s++);return o&&r.all(o).then((function(){return t}))}(this,n,t)}},listeners:{"interactions:stop":function(t,n){var e=t.interaction;"reflow"===e.pointerType&&(e._reflowResolve&&e._reflowResolve(),function(t,n){t.splice(t.indexOf(n),1)}(n.interactions.list,e))}}};if(ve.use(Mn),ve.use(Un),ve.use(He),ve.use(Gn),ve.use($e),ve.use(wn),ve.use(Gt),ve.use(nn),ve.use(Je),ve.default=ve,"object"===i(t)&&t)try{t.exports=ve}catch(n){}return ve.default=ve,ve}()}));export{e as i}
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as e,c as i,h as t,H as s,F as o}from"./p-14b44491.js";import{e as n,t as a,u as l,f as r,h as d,i as h}from"./p-5a91bf23.js";import{R as c}from"./p-05788c2b.js";import{e as u,a as p,b as v}from"./p-3cd894ff.js";import{V as g}from"./p-0bf08021.js";import{i as m,a as f}from"./p-e8ce0b6f.js";import{f as x,i as b}from"./p-5e808a0b.js";import{a as w,u as y,b as k,r as S,c as N}from"./p-ee159b14.js";import{a as I}from"./p-839f6f0d.js";import{V as G}from"./p-ed416acf.js";import{S as j}from"./p-7a1b2643.js";import{f as F}from"./p-c220af42.js";import"./p-7d5dbd9a.js";import"./p-aa124212.js";const D=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}],R=[{id:"print",label:"Print"},{id:"download",label:"Download"}],z=class{constructor(t){e(this,t),this.sdkError=i(this,"sdkError",7),this.envelopeLoaded=i(this,"envelopeLoaded",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.endpoint=null,this.recipientIndex=-1,this.envelopeId=null,this.roleId=null,this.inviteCode=null,this.headerTargetId=null,this.envelope=null,this.roleNames=[],this.sortedRecipients=[],this.recipient=null,this.signerToken=null,this.hasSignature=!1,this.nextButtonLabel="Start",this.nextSubmits=!1,this.errorMessage="",this.focusedField="",this.submitting=!1,this.isDone=!1,this.showDone=!1,this.showLoadError=!1,this.finishLater=!1,this.showFinishLater=!1,this.agreed=!1,this.documentsSingularPlural="document"}componentWillLoad(){this.endpoint=new g({sessionType:"signing"})}async componentWillRender(){var e,i,t,s,o,l,r;if(this.envelopeId)if(this.roleId)if(this.inviteCode)try{console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);const{session:e,recipient:i,signerToken:t}=await n(this.endpoint,{envelopeId:this.envelopeId,roleId:this.roleId,inviteCode:this.inviteCode});console.log(`[SIGN] Loaded signing session ${e.email} / ${e.profile_id}`),this.recipient=i,console.log("[SIGN] We are recipient",this.recipient),this.signerToken=t,this.endpoint.setToken(t),this.agreed&&(this.nextButtonLabel="Next"),this.envelope=await a(this.endpoint,this.envelopeId),this.sortedRecipients=[...this.envelope.recipients],this.sortedRecipients.sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence)),this.roleNames=this.sortedRecipients.map((e=>e.role_name)),this.envelope.documents.length>0&&(this.documentsSingularPlural="document(s)"),this.recipientIndex=this.roleNames.findIndex((e=>e==this.roleId)),this.recipientIndex>-1?(this.recipient=this.sortedRecipients[this.recipientIndex],this.agreed=this.recipient.agreed,console.log("[SIGN] Found our recipient in the envelope",this.recipientIndex,this.recipient)):console.log("[SIGN] Could not find our recipient record",this.roleId,this.sortedRecipients),this.isDone=["submitted","canceled","declined"].includes(this.recipient.status),this.checkRecipientFields(),null===(s=this.envelopeLoaded)||void 0===s||s.emit({endpoint:this.endpoint,envelope:this.envelope})}catch(e){console.log("Error with signing session",e),null===(o=this.sdkError)||void 0===o||o.emit(new j(e.message,null===(l=e.response)||void 0===l?void 0:l.status,null===(r=e.response)||void 0===r?void 0:r.data)),this.showLoadError=!0}else null===(t=this.sdkError)||void 0===t||t.emit(new j("[SIGN] Missing required inviteCode",500,""));else null===(i=this.sdkError)||void 0===i||i.emit(new j("[SIGN] Missing required roleId",500,""));else null===(e=this.sdkError)||void 0===e||e.emit(new j("[SIGN] Missing required envelopId",500,""))}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null,i=document.getElementById("verdocs-sign-header");e&&i&&(console.log("[SIGN] Moving header"),i.remove(),e.append(i))}handleClickAgree(){this.submitting=!0,u(this.endpoint,this.envelopeId,this.roleId,!0).then((()=>{var e;this.nextButtonLabel="Next",this.recipient.agreed=!0,this.submitting=!1,this.agreed=!0,null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"agreed"})})).catch((e=>{var i,t,s;console.log("Update failure",e),this.submitting=!1,null===(i=this.sdkError)||void 0===i||i.emit(new j(e.message,null===(t=e.response)||void 0===t?void 0:t.status,null===(s=e.response)||void 0===s?void 0:s.data))}))}async handleOptionSelected(e){var i,t,s,o,n;switch(e.detail.id){case"later":this.finishLater=!0,this.showFinishLater=!0,null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});break;case"claim":G("This feature will be available in an upcoming release."),null===(t=this.envelopeUpdated)||void 0===t||t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"claimed"});break;case"decline":{this.submitting=!0;const e=await p(this.endpoint,this.envelopeId,this.roleId);console.log("Decline result",e),null===(s=this.envelopeUpdated)||void 0===s||s.emit({endpoint:this.endpoint,envelope:this.envelope,event:"declined"}),this.submitting=!1,this.isDone=!0}break;case"print":window.print(),null===(o=this.envelopeUpdated)||void 0===o||o.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":w(this.endpoint,this.envelope,this.envelope.envelope_document_id).catch((e=>{console.log("Error downloading PDF",e)})),null===(n=this.envelopeUpdated)||void 0===n||n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})}}updateRecipientFieldValue(e,i){console.log("[SIGN] updateRecipientFieldValue",e),this.recipient.fields.forEach((t=>{t.name===e&&(t.settings=i.settings,y(t),this.checkRecipientFields())}))}saveFieldChange(e,i){console.log("[SIGN] updateRecipientFieldValue",e),l(this.endpoint,this.envelopeId,e,i).then((i=>this.updateRecipientFieldValue(e,i))).catch((e=>{var i,t,s,o,n,a;401===(null===(i=e.response)||void 0===i?void 0:i.status)&&"jwt expired"===(null===(s=null===(t=e.response)||void 0===t?void 0:t.data)||void 0===s?void 0:s.error)?(console.log("[SIGN] Signing session expired"),this.errorMessage="Signing session expired. Please reload your browser to continue."):console.log("[SIGN] Server error",e),null===(o=this.sdkError)||void 0===o||o.emit(new j(e.message,null===(n=e.response)||void 0===n?void 0:n.status,null===(a=e.response)||void 0===a?void 0:a.data))}))}async handleFieldChange(e,i){const{value:t,checked:s}=i.target;switch(e.type){case"textbox":return this.saveFieldChange(e.name,{prepared:!1,value:t});case"checkbox_group":{const t=e.settings.options.map((e=>({id:e.id,checked:i.target.checked})));return this.saveFieldChange(e.name,{prepared:!1,value:{options:t}})}case"radio_button_group":{const t=e.settings.options.map((e=>({id:e.id,selected:i.target.value===e.id})));return this.saveFieldChange(e.name,{prepared:!1,value:{options:t}})}case"dropdown":return this.saveFieldChange(e.name,{prepared:!1,value:i.detail});case"initial":if(!i.detail)return;const l=await(await fetch(i.detail)).blob();return(o=this.endpoint,"initial",n=l,a=new FormData,a.append("initial",n,"initial"),o.api.post("/initials",a).then((function(e){return e.data}))).then((async i=>{const t=await d(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)}));case"signature":if(!i.detail)return;const h=await(await fetch(i.detail)).blob();return function(e,i,t){var s=new FormData;return s.append("signature",t,"signature"),e.api.post("/signatures",s).then((function(e){return e.data}))}(this.endpoint,0,h).then((async i=>{console.log("Signature update result",i);const t=await r(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)})).catch((e=>{console.warn("Error updating signature",e)}));case"date":const c=i.target.getAttribute("iso"),u=F(new Date(c),I);if("1970-12-31"!==u)return this.saveFieldChange(e.name,{prepared:!1,value:u});break;case"timestamp":console.log("Updating timestamp",{value:t,ts:i.target.getAttribute("timestamp")});break;default:console.log("Unhandled field update",{value:t,checked:s},e)}var o,n,a}isFieldValid(e){var i,t,s,o,n,a,l;const{required:r=!1}=e,{result:d="",value:h="",base64:c=""}=e.settings||{};switch(e.type){case"textbox":switch((null===(i=e.settings)||void 0===i?void 0:i.validator)||""){case"email":return f(d);case"phone":return m(d);default:return!r||""!==d}case"signature":case"initial":return!r||""!==c;case"timestamp":return!0;case"textarea":case"date":case"attachment":return console.log("Date-type field valid",{required:r,result:d,output:!r||""!==d}),!r||""!==d;case"dropdown":return!r||""!==h;case"checkbox_group":const u=((null===(s=null===(t=e.settings)||void 0===t?void 0:t.options)||void 0===s?void 0:s.filter((e=>e.checked)))||[]).length;return!r||u>=((null===(o=e.settings)||void 0===o?void 0:o.minimum_checked)||0)&&u<=((null===(n=e.settings)||void 0===n?void 0:n.maximum_checked)||999);case"radio_button_group":return!r||((null===(l=null===(a=e.settings)||void 0===a?void 0:a.options)||void 0===l?void 0:l.filter((e=>e.selected)))||[]).length>0;default:return!1}}async handleNext(){var e;if(this.nextSubmits){try{this.submitting=!0;const e=await v(this.endpoint,this.envelopeId,this.roleId);console.log("[SIGN] Submitted successfully",e),this.recipient.status="submitted",this.showDone=!0,this.isDone=!0}catch(e){console.log("[SIGN] Error submitting",e)}return void(this.submitting=!1)}const i=this.recipient.fields.filter((e=>e.required));let t=i.findIndex((e=>e.name===this.focusedField))+1;t>=i.length&&(t=0);let s=i[t],o=0;if(o<i.length&&["signature","initial"].includes(s.type)&&"signed"===(null===(e=s.settings)||void 0===e?void 0:e.result)&&(o++,t++,t>=i.length&&(t=0),s=i[t]),o>=i.length&&(s=null),s){const e=N(s),i=document.getElementById(e);null==i||i.focusField(),this.focusedField=s.name}}checkRecipientFields(){const e=this.recipient.fields.filter((e=>!this.isFieldValid(e)));e.length<1?(this.nextButtonLabel="Finish",this.nextSubmits||(this.nextSubmits=!0)):(console.log("[SIGN] Remaining invalid fields",e),this.nextButtonLabel="Next",this.nextSubmits=!1)}attachFieldAttributes(e,i,t,s){var o;s.addEventListener("input",(e=>{console.log("[SIGN] onfieldInput",e.detail,e.target.value),e.target.name.includes("checkbox_group")||e.target.name.includes("radio_button_group")?(console.log("CB",e.target),this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))):this.checkRecipientFields()})),s.addEventListener("attached",(async e=>{console.log("[SIGN] onAttached",e.detail,e.target.value);const t=await h(this.endpoint,this.envelopeId,this.roleId,i.name,e.detail);console.log("upload result",t),this.checkRecipientFields()})),s.addEventListener("removed",(e=>{console.log("[SIGN] onRemoved",e.detail,e.target.value)})),s.addEventListener("focusout",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields())))),s.addEventListener("fieldChange",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields())))),s.setAttribute("page",e.pageNumber),s.setAttribute("roleindex",t),s.setAttribute("xScale",e.xScale),s.setAttribute("yScale",e.yScale),s.setAttribute("initials",this.recipient?x(this.recipient.full_name):""),s.setAttribute("name",(null===(o=this.recipient)||void 0===o?void 0:o.full_name)||"")}handlePageRendered(e){const i=e.detail,t=k(this.roleNames,this.recipient.role_name);this.recipient.fields.filter((e=>e.page===i.pageNumber)).filter((e=>e.page===i.pageNumber)).forEach((e=>{const s=S(e,i,t,{disabled:!1,editable:!1,draggable:!1,done:this.isDone});s&&(Array.isArray(s)?s.map((s=>this.attachFieldAttributes(i,e,t,s))):this.attachFieldAttributes(i,e,t,s))})),this.sortedRecipients.filter((e=>e.role_name!==this.recipient.role_name&&(e.status===c.INVITED||e.status===c.OPENED||e.status===c.PENDING))).forEach((e=>{const t=k(this.roleNames,e.role_name);e.fields.filter((e=>e.page===i.pageNumber)).forEach((e=>{const s=S(e,i,t,{disabled:!0,editable:!1,draggable:!1,done:this.isDone});s&&(Array.isArray(s)?s.map((s=>this.attachFieldAttributes(i,e,t,s))):this.attachFieldAttributes(i,e,t,s))}))})),this.checkRecipientFields()}render(){return this.envelope?this.isDone?t(s,{class:{agreed:this.agreed}},t("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:e=>{var i;return null===(i=this.sdkError)||void 0===i?void 0:i.emit(e.detail)}}),this.errorMessage&&t("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:()=>this.errorMessage=""}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:()=>{this.showDone=!1,this.isDone=!0}}),this.submitting&&t("div",{class:"loading-indicator"},t("verdocs-loader",null))):t(s,{class:{agreed:this.agreed}},t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name),t("div",{style:{flex:"1"}}),!this.finishLater&&t("verdocs-button",{size:"small",label:this.nextButtonLabel,disabled:!this.agreed,onClick:()=>this.handleNext()}),t("div",{style:{marginLeft:"10px"}}),t("verdocs-dropdown",{options:this.isDone||this.finishLater?R:D,onOptionSelected:e=>this.handleOptionSelected(e)}))),t("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(this.envelope.documents||[]).map((e=>{const i=b(1,e.page_numbers);return t(o,null,i.map((i=>t("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:i,onPageRendered:e=>this.handlePageRendered(e),type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}))),this.showFinishLater&&t("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`,onNext:()=>this.showFinishLater=!1}),this.errorMessage&&t("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:()=>this.errorMessage=""}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:()=>{this.showDone=!1,this.isDone=!0}}),this.showLoadError&&t("verdocs-ok-dialog",{heading:"Error Loading Document",message:"Please check with the sender to ensure it has not been canceled, and try again later.",buttonLabel:"Retry",onNext:()=>{this.showLoadError=!1,window.location.reload()}}),this.submitting&&t("div",{class:"loading-indicator"},t("verdocs-loader",null)),!this.agreed&&t("div",{class:"cover"},t("div",{class:"agree"},t("verdocs-checkbox",{name:"agree",label:"By checking this box, you:",onInput:()=>this.handleClickAgree()}),t("ul",null,t("li",null,"Agree to use electronic records and signatures, and confirm you have read the"," ",t("a",{href:"https://verdocs.com/en/electronic-record-signature-disclosure/",target:"_blank"},"Electronic Record and Signatures Disclosure"),"."),t("li",null,"Agree to Verdocs"," ",t("a",{href:"https://verdocs.com/en/eula",target:"_blank"},"End User License Agreement")," ","and confirm you have read Verdocs'"," ",t("a",{href:"https://verdocs.com/en/privacy-policy/",target:"_blank"},"Privacy Policy"),"."))))):t(s,null,t("verdocs-loader",null))}};z.style='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign .agree{-ms-flex:0;flex:0;width:600px;display:-ms-flexbox;display:flex;max-width:90%;padding:30px 15px;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign .agree li{margin:0.5em 0}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}';export{z as verdocs_sign}
|