(function(t){function e(e){for(var r,s,o=e[0],c=e[1],u=e[2],l=0,m=[];l2&&void 0!==s[2]?s[2]:null,n=s.length>3&&void 0!==s[3]?s[3]:null,navigator.sendBeacon){t.next=4;break}return t.abrupt("return");case 4:a=new FormData,null!==r&&a.append("data",r),null!==n&&a.append("targetId",n),navigator.sendBeacon(p+"/dashboard/action/"+e+(i?"/"+i:""),a);case 8:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}(),getImage:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",y("/api/micrio/info/"+e));case 1:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),getImageData:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",y("/api/micrio/getJSON",{id:e,culture:i}));case 1:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}(),getImagesData:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",y("/api/micrio/getJSONMultiple?culture=".concat(i,"&ids=").concat(e)));case 1:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}(),setImageData:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i,r){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",fetch(p+"/micrio/setJSON/"+e+"/"+i,{method:"POST",credentials:l,headers:{Accept:"application/json","Content-Type":"application/json;charset=UTF-8",EditSessionId:h},body:JSON.stringify(r)}));case 1:case"end":return t.stop()}}),t)})));function e(e,i,r){return t.apply(this,arguments)}return e}(),deleteImage:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/api/micrio/delete",{id:e}));case 1:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),renameImage:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/api/micrio/setTitle",{id:e,title:i},!0));case 1:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}(),moveImage:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/api/micrio/moveImage",{id:e,folderId:i}));case 1:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}(),upgradeImage:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/api/micrio/upgradeImage",{id:e}));case 1:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),retryTiling:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/api/micrio/retryTiling",{id:e},!0));case 1:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),cloneImage:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i,r){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/api/micrio/cloneImage",{id:e,folderId:i,includeData:r}));case 1:case"end":return t.stop()}}),t)})));function e(e,i,r){return t.apply(this,arguments)}return e}(),createImageFromIIIF:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i,r,n,a,s){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/api/micrio/createFromIIIFManifest",{manifestUrl:e,title:i,folderId:a,organisationId:s,width:r,height:n}));case 1:case"end":return t.stop()}}),t)})));function e(e,i,r,n,a,s){return t.apply(this,arguments)}return e}(),createImageFromUrl:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/api/micrio/createFromUrl",{folderId:i,url:e}));case 1:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}(),renameFolder:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){k("/api/micrio/renameFolder",{id:e,title:i}).then((function(n){if(n){var a=T.state.folders.find((function(t){return t.id==e}));a&&(a.title=i),t(n)}else r("Could not be renamed!")})).catch(r)})));case 1:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}(),removeFolder:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,i){k("/api/micrio/removeFolder",{id:e}).then((function(r){r?(T.state.folders.splice(T.state.folders.findIndex((function(t){return t.id==e})),1),t()):i("Could not be deleted!")})).catch(i)})));case 1:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),moveFolder:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){k("/api/micrio/moveFolder",{id:e,parentId:i}).then((function(n){n?(T.state.folders.find((function(t){return t.id==e})).parentId=i,t()):r("Could not be moved!")})).catch(r)})));case 1:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}(),getFullPath:function(t){var e=[],i=null;while(t&&(i=T.state.folders.find((function(e){return e.id==t}))))e.push(i.slug),t=i.parentId;return e.reverse().join("/")},set360:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/api/micrio/set360",{id:e,is360:i},!0));case 1:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}(),setSettings:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/api/micrio/setSettings",{id:e,json:JSON.stringify(i)},!0));case 1:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}(),setStartView:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/api/micrio/setStartView",{id:e,view:i},!0));case 1:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}(),setPublished:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){var r,n,a=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r=a.length>2&&void 0!==a[2]?a[2]:void 0,n={id:e},r&&(n.culture=r),t.abrupt("return",k(i?"/api/micrio/publish":"/api/micrio/unpublish",n,!0));case 4:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}(),resetVersion:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/api/micrio/resetVersion",{id:e},!0));case 1:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),publishShortId:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/api/micrio/publishShortId",{shortId:e,culture:i},!0));case 1:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}(),getInvoices:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",y("/dashboard/getInvoices",{userId:f,organisationId:T.state.currentOrgId||void 0}));case 1:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}(),getImages:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i,r){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",y("/api/micrio/",{folderId:e,offset:i,numPerPage:r,organisationId:T.state.currentOrgId||void 0}));case 1:case"end":return t.stop()}}),t)})));function e(e,i,r){return t.apply(this,arguments)}return e}(),readNotification:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/dashboard/readNotification",{id:e},!0));case 1:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),getOrganisationSettings:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",y("/dashboard/organisationSettings",{id:e}));case 1:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),getLanguages:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",y("/api/micrio/getLangs",{micrioId:e}));case 1:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),getAssets:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){var r,n,a,s,o=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r=o.length>2&&void 0!==o[2]&&o[2],n=o.length>3&&void 0!==o[3]&&o[3],a=o.length>4&&void 0!==o[4]?o[4]:null,s=o.length>5&&void 0!==o[5]?o[5]:null,t.abrupt("return","micrio"==i?y("/api/micrio/getEmbeds",{micrioId:e,no360:r,includeMaps:n,searchType:a,query:s}):y("/api/asset/"+i+"/"+e));case 5:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}(),removeAsset:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/api/asset/remove",{assetId:e},!0));case 1:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),removeLogo:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/api/asset/removeLogo",{organisationId:e},!0));case 1:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),uploadFile:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return new Promise(function(){var n=Object(r["a"])(regeneratorRuntime.mark((function r(n,a){var s;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,k("/api/asset/StartUpload",t).catch((function(t){console.error("Error",t),a&&a(t)}));case 2:if(s=r.sent,!s){r.next=12;break}return r.next=6,x(s.url,e,{"Content-Type":e.type||t.mimeType||"application/octet-stream"}).catch((function(t){console.error("Error",t),a&&a(t)}));case 6:if("00000000-0000-0000-0000-000000000000"==s.id){r.next=9;break}return r.next=9,k("/api/asset/finishUpload",{id:s.id},!0).catch((function(t){a&&a(t)}));case 9:n(i?s.resultUrl:s.id),r.next=13;break;case 12:a&&a("Nowhere to upload!");case 13:case"end":return r.stop()}}),r)})));return function(t,e){return n.apply(this,arguments)}}())},tileAsset:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){var i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return i=T.state.organisation&&T.state.organisation.id,t.abrupt("return",k("/api/asset/TileAssetImage",{id:e,orgId:i},!1,!0));case 2:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),getImageDimensions:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",y("/api/asset/ImageDimensions?url="+e.src));case 1:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),setOrganisationLink:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/dashboard/setOrganisationLink",{organisationId:e,url:i},!0));case 1:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}(),setDefaultLang:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/dashboard/setDefaultCulture",{culture:e},!0));case 1:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),claimedInvitations:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",y("/dashboard/ClaimedInvitations"));case 1:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}(),sendInvitation:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i,r){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/dashboard/AddInvitation",{email:e,message:i,duration:r}));case 1:case"end":return t.stop()}}),t)})));function e(e,i,r){return t.apply(this,arguments)}return e}(),setFolderSorting:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/dashboard/SetFolderSort",{folderId:e,type:i},!0));case 1:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}(),setImagePassword:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/dashboard/SetImagePassword",{imageId:e,password:i},!0));case 1:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}(),setFolderPassword:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/dashboard/SetFolderPassword",{folderId:e,password:i},!0));case 1:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}(),deleteAccount:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/dashboard/deleteAccount",{},!1,!0));case 1:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}(),search:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",k("/search",{query:e,organisationId:i}));case 1:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}()},b=v;function w(t,e,i){if(t.id){var r=T.state.projects.find((function(t){return t.id==e}));r?(r.isActive=t.isActive,r.hasStripeSubscription=t.hasStripeSubscription,r.trialDaysLeft=t.trialDaysLeft,r.isTrial=t.isTrial):console.warn("Project not found to update!",e)}i(t)}function _(t){return t.startsWith("/api")&&(t=t.substr(4)),p+t}function k(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=new FormData;for(var a in e)n.append(a,e[a]);return fetch(_(t),{method:"POST",credentials:l,body:n,headers:{EditSessionId:h}}).catch((function(t){return{ok:!1,error:t,statusText:"An API error occurred"}})).then(i?null:r?function(t){return t.text()}:S)}function y(t,e){return e&&(e=JSON.parse(JSON.stringify(e))),fetch(_(t)+(e?"?"+new URLSearchParams(e).toString():""),{method:"GET",credentials:l,headers:{EditSessionId:h}}).catch((function(t){return{ok:!1,error:t,statusText:"An API error occurred"}})).then(S)}function x(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=T.state.organisation&&T.state.organisation.isAzure;return r&&(i["x-ms-blob-type"]="BlockBlob",i["cache-control"]="max-age=31536000"),fetch(t,{method:"PUT",headers:i,body:e})}function S(t){return I.apply(this,arguments)}function I(){return I=Object(r["a"])(regeneratorRuntime.mark((function t(e){var i,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.ok){t.next=6;break}if(204==e.status){t.next=5;break}return t.abrupt("return",e.json());case 5:return t.abrupt("return",null);case 6:if(401!=e.status){t.next=10;break}location.href="https://".concat(u?"micrio.dev":"micr.io","/login?ReturnUrl=")+encodeURIComponent(location.href),t.next=19;break;case 10:if(t.t0=e.error,t.t0){t.next=15;break}return t.next=14,e.text();case 14:t.t0=t.sent;case 15:throw i=t.t0,r=e.statusText+(i?": ".concat(i):""),console.error(r),Error(r);case 19:case"end":return t.stop()}}),t)}))),I.apply(this,arguments)}var C=u?"pk_test_einIvYOhPVlvk1GFLQWi8Fl5":"pk_live_kTdQ849bhFCOHmxNqGx5uWMj";function $(){return j.apply(this,arguments)}function j(){return j=Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){if(window.Stripe)t(new window.Stripe(C));else{var e=document.createElement("script");e.type="text/javascript",e.onload=function(){return t(new window.Stripe(C))},e.src="https://js.stripe.com/v3/",document.head.appendChild(e)}})));case 1:case"end":return t.stop()}}),t)}))),j.apply(this,arguments)}var P=["ttBWO","IicaE","KLTce","xjQrB","pfhXT","rNIPa","rdFIY","mvRXc"];n["default"].use(o["a"]);var O=!/micr\.io/.test(location.hostname)&&!/live/.test(location.search),R=O?"//b.micrio.dev/":"//b.micr.io/",M=new o["a"].Store({state:{langs:{en:"English",nl:"Dutch",ar:"Arabic",de:"German",es:"Spanish",fr:"French",id:"Indonesian",it:"Italian",ja:"日本語",ln:"Lingala",pt:"Portugese",se:"Swedish",sk:"Slovak"},isEditor:window._dashboard&&/id=/.test(location.search),loaded:!1,isAdmin:!1,validOrg:!0,currentOrg:null,currentOrgId:null,currentOrgName:null,showOrgDrawer:!1,showUserPrivateAccount:!1,projectsLoaded:!1,organisations:[],projects:[],folders:[],user:null,organisation:null,activeTab:null,editing:!1,baseUrl:R,autoOpenedTrial:!1,isLocalDev:!1,showTutorials:"0"!==localStorage.getItem("editor_showTutorials"),finishedTutorials:[],trialSubId:null,iiifUrl:O?"https://iiif.micrio.dev/":"https://iiif.micr.io/",hasIIIF:!0,canCreate:!1},getters:{currentCulture:function(t){return t.user&&t.user.defaultCulture||t.organisation&&t.organisation.defaultLanguage||"en"},showPayments:function(t){var e=t.projects.every((function(t){return t.isTrial})),i=!!t.projects.find((function(t){return t.customInvoiced}))||t.organisation&&t.organisation.customPayments,r=!i&&t.projects.every((function(t){return t.subscription&&!t.subscription.monthlyAmount}));return t.isAdmin&&(!t.organisation&&!(e||r)||t.organisation&&(!i&&!t.organisation.isFree||t.organisation.hasStripeSource))},isFreeOrg:function(t){return t.organisation&&t.organisation.isFree},isSharedLimit:function(t,e){return e.subscriptionOrg&&t.canCreate&&t.projects.length>1},usage:function(t){return t.projects.length?{images:t.projects.map((function(t){return t.numberOfImages})).reduce((function(t,e){return t+e})),bandwidth:t.projects.map((function(t){return t.bandwidth})).reduce((function(t,e){return t+e})),storage:t.projects.map((function(t){return t.fileSize})).reduce((function(t,e){return t+e})),visitors:t.projects.map((function(t){return t.visitors})).reduce((function(t,e){return t+e}))}:{}},subscriptionOrg:function(t){var e=t.organisation?t.organisation.id:t.projects.length?t.projects[0].subscriptionId:null;return e?t.subscriptions.find((function(t){return t.id==e})):null},isLimitReached:function(t,e){var i=e.subscriptionOrg,r=e.usage;return i&&i.maxImages>0?r.images>=i.maxImages:null},canUploadJSCSS:function(t){return t.organisation&&t.organisation.hasCustomJSCSS||t.user&&t.user.canUploadJSCSS}},actions:{organisation:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){var r,n,a,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=e.state,r.currentOrg!=i){t.next=3;break}return t.abrupt("return");case 3:if(r.organisation=r.user.organisations.find((function(t){return t.slug==i})),r.showUserPrivateAccount=r.isLocalDev||!r.user.organisations.find((function(t){return!t.isShared})),r.showOrgDrawer=!(1==r.user.organisations.length&&!r.showUserPrivateAccount)&&r.user.organisations.length>0,r.validOrg="s"==i&&r.showUserPrivateAccount||r.organisation,n="editor_orgId-"+r.user.id,r.validOrg){t.next=23;break}console.warn("Invalid organisation: "+i),r.projects=[],r.folders=[],r.subscriptions=[],r.currentOrg=i,r.currentOrgId=null,r.currentOrgName="",r.isAdmin=!1,localStorage.removeItem(n),localStorage.removeItem("editor_orgId"),r.loaded=!0,r.projectsLoaded=!0,t.next=40;break;case 23:return r.loaded=!1,r.currentOrg=i,r.currentOrgId=r.organisation?r.organisation.id:null,r.currentOrgName=r.organisation?r.organisation.name:"",r.projectsLoaded=!1,t.next=30,b.initialize();case 30:a=t.sent,r.projects=a.projects,r.folders=a.folders,r.subscriptions=a.subscriptions,r.projects.forEach((function(t){!t.subscription||r.subscriptions.find((function(e){return e.id==t.subscription.id}))||r.subscriptions.find((function(e){return e.id==t.subscription.parentId}))||r.subscriptions.push(t.subscription)})),r.isAdmin=!r.organisation||r.organisation.isAdmin,r.hasIIIF=!!r.organisation||!r.user.noIIIF,r.projectsLoaded=!0,r.loaded=!0,r.organisation?(r.baseUrl=r.organisation.baseUrl||R,localStorage.setItem(n,r.organisation.id),document.title=r.organisation.name+" - Micrio Dashboard",r.canCreate=!r.organisation.customPayments):(r.baseUrl=R,localStorage.removeItem(n),localStorage.removeItem("editor_orgId"),document.title="Micrio Dashboard",r.canCreate=r.isLocalDev||!r.projects.length);case 40:r.trialSubId||(s=r.projects.find((function(t){return t.trialSubOrg})),s&&(r.trialSubId=s.subscriptionOrgId));case 41:case"end":return t.stop()}}),t)})));function e(e,i){return t.apply(this,arguments)}return e}()}});M.stripe={api:null,style:{base:{color:"#32325d",fontFamily:'"Helvetica Neue", Helvetica, sans-serif',fontSmoothing:"antialiased",fontSize:"16px","::placeholder":{color:"#aab7c4"}},invalid:{color:"#fa755a",iconColor:"#fa755a"}}};var T=M,D=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("md-dialog",{attrs:{"md-active":!0}},[i("md-dialog-title",[t._v(t._s(t.title))]),i("md-dialog-content",t._l(t.tree,(function(e){return i("Tree",{key:e.id,attrs:{node:e,main:t.self,noSelf:t.noSelf,self:t.selfId,disabledId:t.disabledId}})})),1),i("md-dialog-actions",[i("md-button",{staticClass:"md-primary",on:{click:function(e){return t.$emit("cancel")}}},[t._v("Cancel")]),i("md-button",{staticClass:"md-primary",attrs:{disabled:!this.selected},on:{click:function(e){return t.$emit("selected",t.selected)}}},[t._v("Move")])],1)],1)],1)},A=[],E=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("ul",{staticClass:"node"},[i("li",[i("md-button",{staticClass:"md-icon-button",attrs:{disabled:!t.hasChildren||t.node.disabled},on:{click:t.toggle}},[i("md-icon",[t._v("\r\n\t\t\t\t"+t._s(t.hasChildren?t.expanded?"remove":"add":"folder")+"\r\n\t\t\t")])],1),i("md-button",{class:[t.main.selected==t.node.id&&"md-primary"],attrs:{disabled:t.node.id==t.disabledId||t.node.disabled||t.noSelf&&t.isSelf},on:{click:t.select}},[t._v(t._s(t.node.title))]),t.expanded&&t.hasChildren?t._l(t.node.children,(function(e){return i("node",{key:e.id,attrs:{main:t.main,noChildren:t.noChildren,noSelf:t.noSelf,self:t.self,disabledId:t.disabledId,root:!1,node:e}})})):t._e()],2)])},L=[],U={name:"node",props:{node:Object,main:Object,disabledId:String,noChildren:Boolean,noSelf:Boolean,self:String,root:{type:Boolean,default:!0}},data:function(){return{expanded:!1}},computed:{isSelf:function(){return this.node.id==this.self},hasChildren:function(){return this.node.children.length&&!(this.noSelf&&this.isSelf)&&!(this.noChildren&&this.disabledId==this.node.id)}},methods:{select:function(){this.node.id==this.disabledId||this.noSelf&&this.isSelf||(this.main.selected=this.main.selected==this.node.id?null:this.node.id)},toggle:function(){this.expanded&&this.deselectChildren(this.node),this.hasChildren&&(this.expanded=!this.expanded)},deselectChildren:function(t){var e=this;t.children.forEach((function(t){t.id==e.main.selected&&(e.main.selected=null),e.deselectChildren(t)}))}}},N=U,V=(i("fbbb"),i("2877")),z=Object(V["a"])(N,E,L,!1,null,null,null),F=z.exports,J={components:{Tree:F},props:{disabledId:String,noSelf:Boolean,selfId:String,projectId:String,title:{type:String,default:"Projects"}},data:function(){return{selected:null,self:this,state:T.state}},computed:{tree:function(){var t=this,e=!T.state.organisation||T.state.subscriptions.findIndex((function(e){return e.id==t.projectId}))>=0;return T.state.projects.filter((function(i){return T.getters.isFreeOrg||!e||i.id==t.projectId})).map((function(e){return t.getNode(e.id,!0)})).filter((function(t){return!!t}))}},methods:{getNode:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=T.state.folders.find((function(e){return e.id==t}));if(null==r&&(r=T.state.projects.find((function(e){return e.id==t}))),!r)return null;var n=i&&!r.isActive;return{title:r.title,id:r.id,disabled:n,children:n?[]:T.state.folders.filter((function(e){return e.parentId==t})).map((function(t){return e.getNode(t.id)})).filter((function(t){return!!t}))}}}},B=J,G=Object(V["a"])(B,D,A,!1,null,null,null),Y=G.exports,W={name:"Dashboard",components:{SelectFolder:Y},created:function(){this.$root.main=this,document.addEventListener("visibilitychange",this.visibilityChange)},data:function(){return{showMessage:!1,message:null,showPopup:!1,popupMessage:null,state:T.state,confirmDialog:{show:!1,title:null,content:null,textYes:"Yes",textNo:"No",cancel:null,confirm:null},promptDialog:{show:!1,title:null,content:null,cancel:null,confirm:null,current:""},folderDialog:{show:!1,title:null,projectId:null,disabledId:null,noSelf:!1,selfId:null,cancel:null,confirm:null}}},methods:{visibilityChange:function(){switch(document.visibilityState){case"visible":b.action(42);break;case"hidden":b.action(43);break}},setMessage:function(t){this.message=t,this.showMessage=!0},setPopup:function(t){this.popupMessage=t,this.showPopup=!0},confirm:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){var r,n,a=this,s=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r=s.length>2&&void 0!==s[2]?s[2]:"Yes",n=s.length>3&&void 0!==s[3]?s[3]:"No",this.confirmDialog.title=e,this.confirmDialog.content=i,this.confirmDialog.show=!0,this.confirmDialog.textYes=r,this.confirmDialog.textNo=n,t.abrupt("return",new Promise((function(t,e){a.confirmDialog.confirm=t,a.confirmDialog.cancel=e})));case 8:case"end":return t.stop()}}),t,this)})));function e(e,i){return t.apply(this,arguments)}return e}(),confirmCancel:function(){this.confirmDialog.show=!1,this.confirmDialog.cancel&&this.confirmDialog.cancel()},confirmOk:function(){this.confirmDialog.show=!1,this.confirmDialog.confirm&&this.confirmDialog.confirm()},prompt:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){var r=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.promptDialog.title=e,this.promptDialog.current=i,this.promptDialog.show=!0,t.abrupt("return",new Promise((function(t,e){r.promptDialog.confirm=t,r.promptDialog.cancel=e})));case 4:case"end":return t.stop()}}),t,this)})));function e(e,i){return t.apply(this,arguments)}return e}(),promptCancel:function(){this.promptDialog.show=!1,this.promptDialog.cancel&&this.promptDialog.cancel(this.promptDialog.current),this.promptDialog.current=""},promptOk:function(){this.promptDialog.show=!1,this.promptDialog.confirm&&this.promptDialog.confirm(this.promptDialog.current),this.promptDialog.current=""},folder:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i,r){var n,a,s=this,o=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=o.length>3&&void 0!==o[3]&&o[3],a=o.length>4?o[4]:void 0,this.folderDialog.title=e,this.folderDialog.projectId=i,this.folderDialog.disabledId=r,this.folderDialog.noSelf=n,this.folderDialog.selfId=a,this.folderDialog.show=!0,t.abrupt("return",new Promise((function(t,e){s.folderDialog.confirm=t,s.folderDialog.cancel=e})));case 9:case"end":return t.stop()}}),t,this)})));function e(e,i,r){return t.apply(this,arguments)}return e}(),folderCancel:function(){this.folderDialog.show=!1,this.folderDialog.cancel&&this.folderDialog.cancel(this.folderDialog.folderId),this.folderDialog.projectId=null,this.folderDialog.disabledId=null,this.folderDialog.noSelf=!1,this.folderDialog.selfId=null},folderOk:function(t){this.folderDialog.show=!1,this.folderDialog.confirm&&this.folderDialog.confirm(t),this.folderDialog.projectId=null,this.folderDialog.disabledId=null,this.folderDialog.noSelf=!1,this.folderDialog.selfId=null},thumbSrc:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t.mapType>0)return"https://static.micr.io/home/img/editor/maptypes/1.png";for(var i=t.originalShortId||t.shortId,r=1,n=e?0:-1,a=t.tileSize;a0&&t.usage.images>=t.sub.maxImages?i("span",{staticClass:"limit-reached"},[t._v("Limit reached")]):t._e()]),i("p",[t._v("\r\n\t\t\t\t\t"+t._s(t.$root.getFileSize(t.usage.storage))+" used\r\n\t\t\t\t")])]),t.usage.visitors||t.usage.bandwidth?i("div",{staticClass:"md-layout-item md-size-15 md-small-size-30"},[i("h3",[t._v("Usage last 12 months")]),t.usage.visitors?i("p",[t._v("\r\n\t\t\t\t\tViews: "+t._s(t.$root.getReadable(t.usage.visitors))+"\r\n\t\t\t\t")]):t._e(),t.usage.bandwidth?i("p",[t._v("\r\n\t\t\t\t\tBandwidth: "+t._s(t.$root.getFileSize(t.usage.bandwidth))+"\r\n\t\t\t\t")]):t._e()]):t._e()]):t._e()],2):i("md-empty-state",{attrs:{"md-icon":"collections","md-label":"No projects yet","md-description":"Please contact someone who can create new projects in this organisation"}})],1):t._e()},Et=[],Lt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("md-card",{class:["project-card tile",t.project.isActive&&"active",t.project.isTrial&&"trial"]},[i("md-card-media",{staticClass:"md-layout md-ratio-16-9",class:{"tile-image-placeholder":!t.project.numberOfImages}},[i("router-link",{staticClass:"image-link",attrs:{to:"./"+t.project.slug+"/"}},[t.store.state.hasIIIF?t._l(t.project.previewImages,(function(e,r){return i("div",{key:r,staticClass:"image-wrapper md-layout-item",class:{"multiple-lines":t.project.numberOfImages>2}},[i("img",{attrs:{src:""+t.store.state.iiifUrl+e+"/full/^,400/0/default.jpg"}})])})):t._e(),t.project.numberOfImages?i("md-icon",{staticClass:"image-count"},[t._v(t._s(t.project.numberOfImages>9?"filter_9_plus":"filter_"+t.project.numberOfImages))]):i("md-icon",{staticClass:"folder"},[t._v("folder")])],2)],1),i("md-card-header",[i("md-card-header-text",[i("router-link",{staticClass:"image-link",attrs:{to:"./"+t.project.slug+"/"}},[i("p",{staticClass:"card-title"},[t._v(t._s(t.project.title))])]),i("div",{staticClass:"card-subtitles"},[i("p",{staticClass:"card-subtitle"},[t.project.isActive?t._e():i("span",[t._v(t._s(t.status)+",")]),t.project.trialDaysLeft>0&&t.project.isActive?i("span",[t._v("\r\n\t\t\t\t\t"+t._s(t.project.trialDaysLeft)+" "),t.project.hasStripeSubscription?i("span",[t._v("days until first billing")]):i("span",[t._v("trial days left")])]):t.project.endDate?i("span",[t._v(" until "+t._s(t.project.endDate.split("T")[0]))]):0!=t.project.trialDaysLeft||t.project.isActive?i("span",[t._v(" "+t._s(t.project.created.split("T")[0]))]):i("span",[t._v(", "+t._s(t.project.inactiveReason))]),t.project.isPrivate?i("span",{staticClass:"md-accent"},[t._v(", non-public")]):t._e()]),i("p",{staticClass:"card-subtitle"},[t._v(t._s(t.project.numberOfImages)+" image"+t._s(1==t.project.numberOfImages?"":"s"))])])],1),t.isProjectAdmin?i("md-menu",{attrs:{"md-size":"big","md-direction":"bottom-end"}},[i("md-button",{staticClass:"md-icon-button",attrs:{"md-menu-trigger":""}},[i("md-icon",[t._v("more_vert")])],1),i("md-menu-content",[t.project.isActive?i("md-menu-item",{on:{click:function(e){t.showRename=!0}}},[t._v("Rename")]):t._e(),t.project.isActive&&t.canUpgrade?i("md-menu-item",{attrs:{to:"./"+t.project.slug+"/"+(t.project.isTrial?"activate":"upgrade")}},[t._v(t._s(t.project.isTrial?"Activate":"Change")+" plan")]):t._e(),t.store.state.organisation&&t.store.state.organisation.customPayments?t._e():[t.project.hasStripeSubscription?i("md-menu-item",{staticClass:"md-accent",attrs:{to:"./"+t.project.slug+"/deactivate"}},[t._v("Deactivate")]):t.project.isTrial?t._e():i("md-menu-item",{staticClass:"md-accent",attrs:{to:"./"+t.project.slug+"/delete"}},[t._v("Delete")])]],2),i("md-dialog-prompt",{attrs:{"md-active":t.showRename,"md-title":"Set a new project title","md-input-maxlength":"100","md-input-placeholder":"Type a title...","md-confirm-text":"Done"},on:{"update:mdActive":function(e){t.showRename=e},"update:md-active":function(e){t.showRename=e},"md-confirm":t.doRename},model:{value:t.title,callback:function(e){t.title=e},expression:"title"}})],1):t._e()],1),i("md-card-actions",[t.project.customInvoiced?t.project.isActive?t._e():[i("md-button",{staticClass:"md-accent",attrs:{to:"./"+t.project.slug+"/activate"}},[t._v("Activate")])]:[t.project.hasStripeSubscription?i("md-button",{staticClass:"md-grey",attrs:{to:"./"+t.project.slug+"/deactivate"}},[t._v("Deactivate")]):t.project.isActive&&t.canUpgrade?i("md-button",{staticClass:"md-grey",attrs:{to:"./"+t.project.slug+"/activate"}},[t._v("Activate")]):t._e()],i("md-button",{staticClass:"md-primary",attrs:{to:"./"+t.project.slug+"/"}},[t._v("Open")])],2)],1)},Ut=[],Nt={props:{id:String},data:function(){var t=this;return{store:T,showRename:!1,title:T.state.projects.find((function(e){return e.id==t.id})).title,project:T.state.projects.find((function(e){return e.id==t.id})),images:[]}},computed:{status:function(){return this.project.isActive?"active":"inactive"},numImages:function(){var t=this.project.numberOfImages;return"".concat(t," image").concat(1!=t?"s":"")},subscription:function(){var t=this;return this.project.subscription||this.project.subscriptionOrgId&&T.state.subscriptions.find((function(e){return e.id==t.project.subscriptionOrgId}))},canUpgrade:function(){var t=!T.state.organisation||!T.state.organisation.isFree,e=!1,i=!1;return(!T.state.organisation||!T.state.organisation.customPayments)&&(this.subscription&&(e=this.subscription.monthlyAmount>0||this.subscription.trialDays>0,i=e),t&&e&&i)},isProjectAdmin:function(){return T.state.isAdmin||T.state.organisation&&!T.state.organisation.isShared}},methods:{doRename:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.title){t.next=4;break}return this.$root.main.setPopup("Please enter a title"),this.title=this.project.title,t.abrupt("return");case 4:return this.project.title=this.title,t.next=7,b.renameFolder(this.id,this.title);case 7:e=t.sent,this.project.slug=e.slug;case 9:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()}},Vt=Nt,zt=(i("ee37"),Object(V["a"])(Vt,Lt,Ut,!1,null,null,null)),Ft=zt.exports,Jt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("tr",[i("td",{staticClass:"pre title"},[i("router-link",{attrs:{to:"./"+t.project.slug+"/"}},[t._v(t._s(t.project.title))])],1),i("td",{staticClass:"pre right no-mobile"},[t.project.numberOfImages?i("span",{attrs:{title:t.project.numberOfImages+" images"}},[t._v(t._s(t.project.numberOfImages)+" image"+t._s(1==t.project.numberOfImages?"":"s"))]):t._e()]),i("td",{staticClass:"pre right no-mobile"},[t.project.created?i("span",{attrs:{title:t.project.created}},[t._v(t._s(t.$root.timeAgo(t.project.created)))]):t._e()]),i("td",{staticClass:"pre right no-mobile"},[t.project.fileSize&&!t.project.mapType?i("span",[t._v(t._s(t.$root.getFileSize(t.project.fileSize)))]):t._e()]),i("td",{staticClass:"menu"},[i("md-menu",[i("md-button",{staticClass:"md-icon-button md-primary",attrs:{"md-menu-trigger":""}},[i("md-icon",[t._v("more_vert")])],1),i("md-menu-content",[t.project.isActive?i("md-menu-item",{on:{click:function(e){t.showRename=!0}}},[t._v("Rename")]):t._e(),t.project.isActive&&t.canUpgrade?i("md-menu-item",{attrs:{to:"./"+t.project.slug+"/"+(t.project.isTrial?"activate":"upgrade")}},[t._v(t._s(t.project.isTrial?"Activate":"Change")+" plan")]):t._e(),t.store.state.organisation&&t.store.state.organisation.customPayments?t._e():[t.project.hasStripeSubscription?i("md-menu-item",{staticClass:"md-accent",attrs:{to:"./"+t.project.slug+"/deactivate"}},[t._v("Deactivate")]):t.project.isTrial?t._e():i("md-menu-item",{staticClass:"md-accent",attrs:{to:"./"+t.project.slug+"/delete"}},[t._v("Delete")])],t.project.isActive?t._e():i("md-menu-item",{staticClass:"md-primary",attrs:{to:"./"+t.project.slug+"/activate"}},[t._v("Activate")])],2)],1)],1)])},Bt=[],Gt={props:{id:String},data:function(){var t=this;return{store:T,showRename:!1,title:T.state.projects.find((function(e){return e.id==t.id})).title,project:T.state.projects.find((function(e){return e.id==t.id})),images:[]}},computed:{status:function(){return this.project.isActive?"active":"inactive"},numImages:function(){var t=this.project.numberOfImages;return"".concat(t," image").concat(1!=t?"s":"")},subscription:function(){var t=this;return this.project.subscription||this.project.subscriptionOrgId&&T.state.subscriptions.find((function(e){return e.id==t.project.subscriptionOrgId}))},canUpgrade:function(){var t=!T.state.organisation||!T.state.organisation.isFree,e=!1,i=!1;return(!T.state.organisation||!T.state.organisation.customPayments)&&(this.subscription&&(e=this.subscription.monthlyAmount>0||this.subscription.trialDays>0,i=e),t&&e&&i)},isProjectAdmin:function(){return T.state.isAdmin||T.state.organisation&&!T.state.organisation.isShared}},methods:{doRename:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.title){t.next=4;break}return this.$root.main.setPopup("Please enter a title"),this.title=this.project.title,t.abrupt("return");case 4:return this.project.title=this.title,t.next=7,b.renameFolder(this.id,this.title);case 7:e=t.sent,this.project.slug=e.slug;case 9:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()}},Yt=Gt,Wt=(i("1bc2"),Object(V["a"])(Yt,Jt,Bt,!1,null,null,null)),qt=Wt.exports,Kt={components:{ProjectCard:Ft,ProjectListItem:qt},data:function(){return{store:T,state:T.state,g:T.getters,listView:!1}},computed:{canCreate:function(){return T.state.canCreate&&(T.state.isAdmin||T.getters.isFreeOrg)},sub:function(){return T.getters.subscriptionOrg},usage:function(){return T.getters.usage},activeProjects:function(){return T.state.projects.filter((function(t){return t.isActive}))},inactiveProjects:function(){return T.state.projects.filter((function(t){return!t.isActive}))}},mounted:function(){T.state.activeTab="tab-projects";var t=localStorage.getItem("projectListView");t&&(this.listView="true"===t)},created:function(){if(!T.state.autoOpenedTrial){var t=T.state.projects[0];"s"==this.$route.params.organisation&&1==T.state.projects.length&&t.isTrial&&0==t.numberOfImages&&(T.state.autoOpenedTrial=!0,this.$router.push({path:"/s/projects/"+t.slug+"/"}))}},methods:{setListView:function(t){this.listView=t,localStorage.setItem("projectListView",t.toString())}}},Xt=Kt,Ht=(i("8ea9"),Object(V["a"])(Xt,At,Et,!1,null,null,null)),Qt=Ht.exports,Zt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.loaded?i("form",{staticClass:"invitation-form",attrs:{novalidate:""},on:{submit:function(e){return e.stopPropagation(),e.preventDefault(),t.submit(e)}}},[i("h1",{staticClass:"md-headline"},[t._v("Send an invitation")]),t.hasTrial?i("p",[t._v("Send your friends or co-workers an invitation to create a Micrio-account\r\n\t\t\tand get "),i("b",[t._v("30 days added")]),t._v(" to your existing trial project if they create an account\r\n\t\t\tusing your invitation link!\r\n\t\t")]):i("p",[t._v("Invite your friends or colleagues to Micrio!")]),!t.hasTrial||t.numClaimed0?i("span",[t._v("Thank you for supporting us!")]):t._e()]):i("p",[t._v("The maximum number of claimed invites to add free trial days\r\n\t\t\thas been reached for your account. Thank you for helping us! Of course, you can\r\n\t\t\tsend more invitations, but it won't add more days to your trial period.\r\n\t\t")]),t.daysOk?i("p",[t._v("Because you're such a cool person, you can also specify\r\n\t\t\tthe number of days this person's trial period will be, instead of the 15 default days!\r\n\t\t")]):t._e(),i("p",[t.daysOk?i("md-field",[i("label",{attrs:{for:"duration"}},[t._v("Number of days for trial period")]),i("md-select",{attrs:{id:"duration"},model:{value:t.duration,callback:function(e){t.duration=e},expression:"duration"}},[i("md-option",{attrs:{value:"15"}},[t._v("15 (default)")]),i("md-option",{attrs:{value:"30"}},[t._v("30 days")]),i("md-option",{attrs:{value:"60"}},[t._v("60 days")]),i("md-option",{attrs:{value:"90"}},[t._v("90 days")])],1)],1):t._e(),i("md-field",{class:[!t.valid&&"md-invalid"],attrs:{disabled:t.sending}},[i("label",{attrs:{for:"email"}},[t._v("E-mail address to send invitation to")]),i("md-input",{attrs:{id:"email",name:"email"},model:{value:t.email,callback:function(e){t.email=e},expression:"email"}}),i("span",{staticClass:"md-error"},[t._v(t._s(t.error))])],1),i("md-field",[i("label",[t._v("Optional additional message")]),i("md-textarea",{model:{value:t.message,callback:function(e){t.message=e},expression:"message"}})],1)],1),t.sending?i("md-progress-bar",{attrs:{"md-mode":"indeterminate"}}):t._e(),i("md-button",{staticClass:"md-primary md-accent md-raised",attrs:{type:"submit",disabled:t.sending||!t.email.length}},[t._v("Send invitation")])],1):i("div",{staticClass:"micrio-loader"})},te=[],ee={data:function(){return{sending:!1,valid:!0,error:null,loaded:!1,email:"",message:"",duration:null,numClaimed:0,max:5}},watch:{email:function(t){this.error=null,this.valid=!!t.length}},computed:{hasTrial:function(){return!!T.state.projects.find((function(t){return t.isTrial}))},daysOk:function(){return!!T.state.user.organisations.find((function(t){return"540dd32f-9822-bdbb-7a09-e9daffaf473f"==t.id}))}},mounted:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return T.state.activeTab="tab-invitations",t.next=3,b.claimedInvitations();case 3:this.numClaimed=t.sent,this.loaded=!0;case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),methods:{submit:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e,i=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.error=null,this.valid=!0,t.next=4,b.sendInvitation(this.email,this.message,this.duration).catch((function(t){i.error=t.toString().replace("Error: Bad Request: ",""),i.valid=!1}));case 4:e=t.sent,"OK"==e&&(this.$root.main.setMessage("Invitation succesfully sent to "+this.email+", thank you!"),this.email="",this.$router.push("../"));case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()}},ie=ee,re=(i("8a29"),Object(V["a"])(ie,Zt,te,!1,null,null,null)),ne=re.exports,ae=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("section",{staticClass:"invoices"},[i("div",[i("h2",[t._v("Payment history")]),t.store.state.organisation&&t.store.state.organisation.billingAccount?i("md-content",[t._v("\r\n\t\t\tThis organisation's billing is handled by "),i("b",[t._v(t._s(t.store.state.organisation.billingAccount))]),t.store.state.organisation.billingAccount==t.store.state.user.email?i("span",[t._v("(you)")]):t._e()]):t._e(),t.hasStripeSource?i("md-button",{staticClass:"md-primary md-accent md-raised update-card",attrs:{to:"/"+t.$route.params.organisation+"/user/updateCard"}},[t._v("Update your card")]):t.store.state.user.invoicePayments?t._e():i("md-button",{attrs:{to:"/"+t.$route.params.organisation+"/user/updateCard"}},[t._v("Link your credit card for automatic payments")]),t.loading?i("div",{staticClass:"micrio-loader"}):i("md-table",{attrs:{"md-card":""}},[i("md-table-row",[i("md-table-head",[t._v("Invoice date")]),i("md-table-head",[t._v("Project")]),i("md-table-head",[t._v("Description")]),i("md-table-head",[t._v("Period")]),i("md-table-head",[t._v("Amount")]),i("md-table-head",[t._v("Status")]),i("md-table-head",[t._v("Invoices and receipts")])],1),t._l(t.invoices,(function(e){return i("md-table-row",{key:e.id,class:e.voided?"voided":null},[i("md-table-cell",[t._v(t._s(t.getDate(e.date)))]),i("md-table-cell",[e.projectDeleted?i("span",[i("b",[t._v(t._s(e.projectName))]),t._v(" (deleted)")]):i("router-link",{attrs:{to:"/"+t.$route.params.organisation+"/projects/"+e.projectShortId}},[i("b",[t._v(t._s(e.projectName))])])],1),i("md-table-cell",[t._v(t._s(e.description))]),i("md-table-cell",[t._v(t._s(t.getDate(e.startDate))+" - "+t._s(t.getDate(e.endDate)))]),i("md-table-cell",[i("span",{staticClass:"no-break"},[t._v(t._s(e.currency.toUpperCase())+" "+t._s(e.amount/100))])]),i("md-table-cell",[t._v(t._s(e.voided?"Voided":e.received?"Received":"Open"))]),i("md-table-cell",[e.downloadURL?i("a",{staticClass:"download-invoice no-break",attrs:{href:e.downloadURL,target:"_blank"}},[i("md-icon",[t._v("link")]),t._v(" Download at Stripe")],1):t._e()])],1)}))],2)],1)])},se=[],oe={mounted:function(){var t=this;T.state.activeTab="tab-payments",b.getInvoices().then((function(e){t.invoices=e,t.loading=!1})).catch((function(e){t.$root.main.setPopup(String(e))}))},computed:{hasStripeSource:function(){return!(T.state.organisation?!T.state.organisation.hasStripeSource:!T.state.user.hasStripeSource||T.state.user.invoicePayments)}},data:function(){return{store:T,loading:!0,invoices:[]}},methods:{getDate:function(t){var e=new Date(t);return e.getDate()+"/"+(e.getMonth()+1)+"/"+e.getFullYear()}}},ce=oe,ue=(i("9e35"),Object(V["a"])(ce,ae,se,!1,null,null,null)),de=ue.exports,le=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.drawerOpen&&"drawer-open",attrs:{id:"editor"}},[t.image?[i("KeyboardControls"),i("md-tabs",{ref:"editMenu",staticClass:"md-primary",attrs:{id:"editor-menu","md-active-tab":t.activeSection}},[i("md-tab",{attrs:{id:"none"}}),i("md-tab",{attrs:{id:"settings","md-label":"Image"},on:{click:function(e){return t.setSection("settings")}}}),i("md-tab",{attrs:{id:"markers","md-label":"Markers"},on:{click:function(e){return t.setSection("markers")}}}),i("md-tab",{attrs:{id:"tours","md-label":"Tours"},on:{click:function(e){return t.setSection("tours")}}}),i("md-tab",{attrs:{id:"audio","md-label":"Audio"},on:{click:function(e){return t.setSection("audio")}}}),t.canEmbed?i("md-tab",{attrs:{id:"embeds","md-label":"Embeds"},on:{click:function(e){return t.setSection("embeds")}}}):t._e(),i("md-tab",{attrs:{id:"customPages","md-label":"Custom Pages"},on:{click:function(e){return t.setSection("customPages")}}})],1),i("md-menu",{ref:"toolbarIcons"},[i("a",{staticClass:"md-button md-icon-button",attrs:{title:"Preview"},on:{click:t.preview}},[i("md-icon",[t._v("pageview")])],1),i("a",{staticClass:"md-button md-icon-button",attrs:{title:"Publish"},on:{click:t.publish}},[i("md-icon",[t._v("publish")])],1),i("a",{staticClass:"md-button md-icon-button",attrs:{title:"Public link",href:"https://i."+(t.isDevEnv?"micrio.dev":"micr.io")+"/"+t.image.shortId+"/"+("en"!=t.$root.editor.lang?t.$root.editor.lang:""),target:"_blank"}},[i("md-icon",[t._v("link")])],1)]),t.saving?i("md-progress-bar",{attrs:{"md-mode":"indeterminate"}}):t._e(),i("div",{ref:"micrioContainer",class:"micrio-container"+(this.imageVersion>=4.2?"":" v3"),on:{click:t.printCoo}},[i("micr-io",{ref:"micrio",attrs:{id:t.image.originalShortId||t.image.shortId,iiif:t.image.iiifManifest,width:t.image.width,height:t.image.height,path:t.image.path||t.baseUrl,tileSize:t.image.tileSize||1024,png:t.image.isPng,format:t.image.format,extension:t.image.tileExtension,legacy:t.image.legacyTiles,skipmeta:"",ui:"false"}},[!t.showMarkers&&!t.currentMarkerTour||t.currentVideoTour?t._e():i("div",{staticClass:"micrio-markers main"},t._l(t.data.markers,(function(t){return i("MMarker",{key:t.id,attrs:{data:t}})})),1)]),t.showSettings&&t.$refs.settings.showStartView?i("Rectangle",{ref:"viewRect",attrs:{boundless:t.image.is360,area:t.startView},on:{change:t.svChanged}}):t._e(),t.showSettings&&t.$refs.settings.showMapLimit?i("Rectangle",{ref:"mapLimitRect",attrs:{area:t.settings.mapLimit}}):t._e(),t.showSettings&&t.$refs.settings.showFocusPoint?i("Focus",{attrs:{position:t.settings.focus}}):t._e(),t.currentVideoTour?i("VideoTour",{attrs:{data:t.currentVideoTour}}):t._e(),t.showPositional?t._l(t.data.audio.locations,(function(t){return i("AudioLocation",{key:t.id,attrs:{sample:t}})})):t._e(),t.showEmbeds?t._l(t.data.children,(function(t){return i("MEmbed",{key:t.guid,attrs:{embed:t}})})):t._e()],2),i("md-app-drawer",{staticClass:"editor-drawer",attrs:{"md-right":!0,"md-active":t.showSidebar},on:{"update:mdActive":function(e){t.showSidebar=e},"update:md-active":function(e){t.showSidebar=e}}},[i("ImageSettings",{ref:"settings",attrs:{image:t.image,meta:t.data}}),i("MarkerEditor",{ref:"markers"}),i("Tours",{ref:"tours"}),i("AudioEditor",{ref:"audio"}),i("EmbedEditor",{ref:"embeds"}),i("CustomPages",{ref:"customPages"}),i("md-button",{staticClass:"md-icon-button",attrs:{id:"close-drawer-button"},on:{click:function(e){return t.setSection("none")}}},[i("md-icon",[t._v("close")])],1)],1),t.showAssetPicker?i("AssetPicker",{key:t.assetPickerType,ref:"assetPicker",attrs:{no360:t.no360Picker,maps:t.mapsPicker,type:t.assetPickerType}}):t._e(),i("Tutorial")]:t._e()],2)},me=[],he=(i("5df3"),i("c5f6"),i("d3bd")),pe=i.n(he),ge=i("d225"),fe=i("b0b4"),ve=function(){function t(e,i,r){var n=this;Object(ge["a"])(this,t),this.guid=e,this.lang=i,this.onmessage=r,this.socket=new WebSocket("wss://live.micr.io/image/".concat(e,"/").concat(i)),this.socket.addEventListener("message",(function(t){if(t&&t.data){var e=Number(t.data.substr(0,1)),i=JSON.parse(t.data.substr(1));i&&n.onmessage(e,i)}}))}return Object(fe["a"])(t,[{key:"send",value:function(t,e){1==this.socket.readyState&&this.socket.send(t+JSON.stringify(e))}},{key:"close",value:function(){this.socket.close()}}]),t}(),be=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:["rectangle",t.active&&"active",t.dark&&"dark",t.rounded&&"rounded",t.className],style:t.style,on:{click:t.click}},[t.icon?i("md-icon",{staticClass:"main-icon"},[t._v(t._s(t.icon))]):t._e(),i("md-icon",{ref:"resize",staticClass:"resize"},[t._v("aspect_ratio")]),void 0!=t.slider?i("input",{ref:"slider",attrs:{type:"range",min:"0",max:"2",step:"0.01"},domProps:{value:t.slider},on:{input:t.setSlider}}):t._e(),null!=t.label?i("div",{staticClass:"label"},[t._v(t._s(t.label))]):t._e(),t._t("default")],2)},we=[],_e={props:{area:{type:Array,default:function(){return[.4,.4,.6,.6]}},offset:{type:Array,default:function(){return[0,0]}},dark:Boolean,background:String,ratio:Number,label:String,className:String,rounded:Boolean,icon:String,slider:Number,boundless:Boolean,centered:Boolean,outsideBlurs:Boolean,x:Number,y:Number,radius:Number,limited:Boolean,id:{type:String,default:function(){return this.$root.createGuid()}}},data:function(){return{px:[0,0],wh:[0,0],dStartCoo:[0,0],dOrigArea:[0,0,0,0],rStartCoo:[0,0],manipulating:!1,mx:0,my:0,mradius:0}},mounted:function(){if(this.mx=this.x,this.my=this.y,this.mradius=this.radius,this.micrio=this.$root.editor.$refs.micrio,this.micrio.addEventListener("draw",this.place),this.ratio){var t=this.limitSize(),e=[this.area[0]+(this.area[2]-this.area[0])/2,this.area[1]+(this.area[3]-this.area[1])/2];this.area[0]=e[0]-t[0]/2,this.area[1]=e[1]-t[1]/2,this.area[2]=e[0]+t[0]/2,this.area[3]=e[1]+t[1]/2}this.limited&&(this.dOrigArea=this.area.slice(),this.limit()),this.place()},beforeDestroy:function(){this.micrio&&this.micrio.removeEventListener("draw",this.place),this.$el.removeEventListener("mousedown",this.dStart),this.dEnd(),this.rEnd()},computed:{style:function(){return"\n\t\t\t\ttransform:translate3d(".concat(this.px[0]-this.offset[0],"px,").concat(this.px[1]-this.offset[1],"px,0);\n\t\t\t\twidth:").concat(this.wh[0],"px;\n\t\t\t\theight:").concat(this.wh[1],"px;\n\t\t\t\tbackground-image:").concat(this.background?"url("+this.background+")":"none",";\n\t\t\t")},active:function(){return this.$root.editor.activeRect==this.id}},watch:{active:function(){this.active?(this.$el.addEventListener("mousedown",this.dStart),this.$refs.resize.$el.addEventListener("mousedown",this.rStart),this.outsideBlurs&&this.micrio.addEventListener("mousedown",this.blur),addEventListener("keydown",this.move)):(this.$el.removeEventListener("mousedown",this.dStart),this.$refs.resize.$el.removeEventListener("mousedown",this.rStart),this.outsideBlurs&&this.micrio.removeEventListener("mousedown",this.blur),removeEventListener("keydown",this.move)),this.$emit("active",this.active)}},methods:{move:function(t){var e=1,i=(39==t.keyCode?1:37==t.keyCode?-1:0)*e,r=(40==t.keyCode?1:38==t.keyCode?-1:0)*e,n=this.micrio,a=n.camera.getScale(),s=Number(n.getAttribute("width")),o=Number(n.getAttribute("height"));this.area[0]+=i/s/a,this.area[1]+=r/o/a,this.area[2]+=i/s/a,this.area[3]+=r/o/a,this.$emit("change",this.area),this.place()},place:function(){if(this.rounded){var t=this.micrio;this.px=t.camera.getXY(this.mx,this.my);var e=Number(this.micrio.getAttribute("width")),i=this.mradius*e*t.camera.getScale();this.offset[0]=i/2,this.offset[1]=i/2,this.wh=[i,i]}else{this.px=this.micrio.camera.getXY(this.area[0],this.area[1]);var r=this.micrio.camera.getXY(this.area[2],this.area[3]);this.wh[0]=r[0]-this.px[0],this.ratio?this.wh[1]=this.wh[0]/this.ratio:this.wh[1]=r[1]-this.px[1]}},click:function(t){t&&"INPUT"==t.target.tagName||this.manipulating||(this.$root.editor.activeRect=this.active?null:this.id)},blur:function(t){"CANVAS"==t.target.tagName&&(this.$root.editor.activeRect=null)},setSlider:function(){this.$emit("change")},limitSize:function(){var t=[this.area[2]-this.area[0],this.area[3]-this.area[1]],e=Number(this.micrio.getAttribute("width"))/Number(this.micrio.getAttribute("height"));return this.ratio&&this.limited&&(t[1]=t[0]/this.ratio*e,t[1]>1&&(this.area[1]-=t[1]-1,t[1]=1,t[0]=t[1]*this.ratio/e)),t},limit:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0],e=this.limitSize(),i=[this.dOrigArea[0]+t[0],this.dOrigArea[1]+t[1]];this.boundless||(i[0]=Math.max(0,Math.min(i[0],1-e[0])),i[1]=Math.max(0,Math.min(i[1],1-e[1]))),this.area[0]=i[0],this.area[1]=i[1],this.area[2]=i[0]+e[0],this.area[3]=i[1]+e[1]},dStart:function(t){"INPUT"!=t.target.tagName&&(this.dStartCoo=this.micrio.camera.getCoo(t.clientX,t.clientY,!0),this.dOrigArea=this.area.slice(),addEventListener("mousemove",this.dMove,!0),addEventListener("mouseup",this.dEnd,!0))},dMove:function(t){var e=this.micrio.camera.getCoo(t.clientX,t.clientY,!0),i=[e[0]-this.dStartCoo[0],e[1]-this.dStartCoo[1]];0==i[0]&&0==i[1]||(this.centered?(this.mx=e[0],this.my=e[1]):this.limit(i),this.manipulating=!0,this.$emit("change",this.area),this.place())},dEnd:function(t){var e=this;t&&(t.stopPropagation(),t.preventDefault()),setTimeout((function(){return e.manipulating=!1})),removeEventListener("mousemove",this.dMove,!0),removeEventListener("mouseup",this.dEnd,!0)},rStart:function(t){t&&(t.stopPropagation(),t.preventDefault()),this.rStartCoo=this.micrio.camera.getCoo(t.clientX,t.clientY,!0,!0),this.dOrigArea=this.area.slice(),this.startRadius=this.mradius+0,addEventListener("mousemove",this.rMove),addEventListener("mouseup",this.rEnd)},rMove:function(t){var e=this.micrio.camera.getCoo(t.clientX,t.clientY,!0,!0),i=[e[0]-this.rStartCoo[0],e[1]-this.rStartCoo[1]];this.manipulating=!0,this.rounded?this.mradius=this.startRadius+Math.min(i[0],i[1]):(this.boundless?(this.area[2]=this.dOrigArea[2]+i[0],this.area[3]=this.dOrigArea[3]+i[1]):(this.area[2]=Math.min(1,this.dOrigArea[2]+i[0]),this.area[3]=Math.min(1,this.dOrigArea[3]+i[1])),this.limited&&this.limit()),this.$emit("change",this.area),this.place()},rEnd:function(t){var e=this;t&&(t.stopPropagation(),t.preventDefault()),setTimeout((function(){return e.manipulating=!1})),removeEventListener("mousemove",this.rMove),removeEventListener("mouseup",this.rEnd)}}},ke=_e,ye=(i("d646"),Object(V["a"])(ke,be,we,!1,null,null,null)),xe=ye.exports,Se=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"focus",style:"transform: "+t.transform},[i("md-icon",[t._v("center_focus_strong")])],1)},Ie=[],Ce=i("75fc"),$e={props:{position:{type:Array,default:function(){return[.5,.5]}}},data:function(){return{px:[0,0],startCoo:[0,0],delta:[0,0],hasMoved:!1,startRect:[0,0],offset:[0,0]}},mounted:function(){this.micrio=this.$root.editor.$refs.micrio,this.micrio.addEventListener("draw",this.place),this.$el.addEventListener("mousedown",this.mStart),this.place()},beforeDestroy:function(){this.micrio.removeEventListener("draw",this.place),this.$el&&this.$el.removeEventListener("mousedown",this.mStart)},computed:{transform:function(){return"translate3d(".concat(this.px[0],"px,").concat(this.px[1],"px,0)")}},methods:{place:function(){var t;this.px=(t=this.micrio.camera).getXY.apply(t,Object(Ce["a"])(this.position))},mStart:function(t){var e;if(1==t.which){t.stopPropagation(),window.addEventListener("mousemove",this.mMove),window.addEventListener("mouseup",this.mStop),this.startCoo=this.position.slice(0);var i=(e=this.micrio.camera).getXY.apply(e,Object(Ce["a"])(this.position));this.delta=[t.pageX-i[0],t.pageY-i[1]],this.startRect=[t.pageX,t.pageY],this.hasMoved=!1}},mMove:function(t){this.offset=[t.pageX,t.pageY];var e=this.micrio.camera.getCoo(this.offset[0]-this.delta[0],this.offset[1]-this.delta[1]);!this.hasMoved&&Math.abs(this.offset[0]-this.startRect[0])<4&&Math.abs(this.offset[1]-this.startRect[1])<4||(this.hasMoved=!0,this.position[0]=e[0],this.position[1]=e[1],this.place())},mStop:function(){var t=this;setTimeout((function(){return t.hasMoved=!1}),50),window.removeEventListener("mousemove",this.mMove),window.removeEventListener("mouseup",this.mStop)}}},je=$e,Pe=(i("1053"),Object(V["a"])(je,Se,Ie,!1,null,null,null)),Oe=Pe.exports,Re=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t.opened?i("Rectangle",{attrs:{boundless:t.$root.editor.image.is360,area:t.data.view,offset:[0,0],dark:!0},on:{change:t.changed}}):t._e(),i("div",{class:["marker",t.customClasses,t.opened&&"opened",t.data.noMarker&&"invisible"],style:t.transform},[i("button",{ref:"marker",class:["marker",t.tourStep>=0&&"in-tour"],style:t.markerStyle,attrs:{title:t.data.title},on:{click:t.toggle}},[t.showTitle?i("label",{staticClass:"marker"},[t._v(t._s(t.data.title))]):t._e(),t.tourStep>=0?i("span",{staticClass:"tour-step"},[t._v(t._s(t.tourStep+1))]):t._e(),t.tourStep>0?i("button",{staticClass:"tour-control tour-prev",attrs:{title:"change order"},on:{click:t.moveStep}},[i("md-icon",[t._v("skip_previous")])],1):t._e(),t.tourStep>=0&&t.tourStep=0?t.steps.splice(this.tourStep,1):t.steps.push(this.data.id),this.$root.editor.tutorial.step("select-markers");else{if(this.hasMoved)return;this.$root.editor.$refs.markers.activeId=this.opened?null:this.data.id}},open:function(){this.$refs.marker.addEventListener("mousedown",this.mStart)},close:function(){this.$refs.marker.removeEventListener("mousedown",this.mStart),this.save()},save:function(){this.$root.editor.save()},setImageTitle:function(t){this.$root.main.prompt("Set the image title",t.title).then((function(e){t.title=e})).catch((function(){return null}))},mStart:function(t){var e;if(1==t.which){t.stopPropagation(),window.addEventListener("mousemove",this.mMove),window.addEventListener("mouseup",this.mStop),this.startCoo=[this.data.x,this.data.y];var i=(e=this.micrio.camera).getXY.apply(e,Object(Ce["a"])(this.startCoo));this.delta=[t.pageX-i[0],t.pageY-i[1]],this.startRect=[t.pageX,t.pageY],this.hasMoved=!1}},mMove:function(t){this.offset=[t.pageX,t.pageY];var e=this.micrio.camera.getCoo(this.offset[0]-this.delta[0],this.offset[1]-this.delta[1]);!this.hasMoved&&Math.abs(this.offset[0]-this.startRect[0])<4&&Math.abs(this.offset[1]-this.startRect[1])<4||(this.hasMoved=!0,this.data.x=e[0],this.data.y=e[1])},mStop:function(){var t=this;setTimeout((function(){return t.hasMoved=!1}),50),window.removeEventListener("mousemove",this.mMove),window.removeEventListener("mouseup",this.mStop)}}},De=Te,Ae=(i("54ea"),Object(V["a"])(De,Re,Me,!1,null,null,null)),Ee=Ae.exports,Le=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.$root.editor.showMarkers?i("div",{attrs:{id:"marker-settings"}},[t.showColorSelect?i("ColorPicker",{attrs:{value:t.imageSettings.markerColor},on:{input:function(e){return t.imageSettings.markerColor=e},close:function(e){t.showColorSelect=!1}}}):t._e(),i("md-dialog-title",[t._v(t._s(t.marker?"Selected marker":"Settings for all markers"))]),t.marker?i("md-content",[i("md-tabs",[i("md-tab",{attrs:{"md-label":"Popup content"}},[i("md-content",[i("md-field",[i("label",[t._v("Marker title")]),i("md-input",{model:{value:t.marker.title,callback:function(e){t.$set(t.marker,"title",e)},expression:"marker.title"}})],1),t.settings.noPopup?t._e():i("md-field",[i("label",[t._v("Primary text")]),i("md-textarea",{staticClass:"description",on:{input:function(e){return t.setMarkerBody(t.marker)}},model:{value:t.marker.markdown,callback:function(e){t.$set(t.marker,"markdown",e)},expression:"marker.markdown"}}),i("span",{staticClass:"md-helper-text"},[i("a",{attrs:{href:"https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet",target:"_blank"}},[t._v("Markdown")]),t._v(" supported")])],1),t.settings.noPopup?t._e():i("md-field",[i("label",[t._v("Secondary text")]),i("md-textarea",{staticClass:"description",on:{input:function(e){return t.setMarkerBody(t.marker)}},model:{value:t.marker.markdownSecondary,callback:function(e){t.$set(t.marker,"markdownSecondary",e)},expression:"marker.markdownSecondary"}}),i("span",{staticClass:"md-helper-text"},[i("a",{attrs:{href:"https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet",target:"_blank"}},[t._v("Markdown")]),t._v(" supported")])],1)],1),t.settings.noPopup?t._e():[i("md-content",[i("h3",[t._v("Images in popup")]),i("md-field",{staticClass:"images images-popup"},[t._l(t.marker.images,(function(e,r){return i("div",{key:r,staticClass:"popup-image"},[i("md-button",{staticClass:"image-button",style:"background-image:url("+t.$root.editor.getThumb(e.src)+")"}),i("md-input",{attrs:{placeholder:"Image title"},model:{value:e.title,callback:function(i){t.$set(e,"title",i)},expression:"img.title"}}),i("md-button",{staticClass:"image-remove",attrs:{title:"Remove this image"},on:{click:function(e){return t.removeImage(r)}}},[i("md-icon",[t._v("delete")])],1)],1)})),i("md-button",{on:{click:t.addImage}},[i("md-icon",[t._v("add")])],1)],2),t.marker.images.length>0?i("md-list",{staticStyle:{"margin-top":"-30px"}},[i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("No full-window image")]),i("span",[t._v("When clicking an image, it won't show full size")])]),i("md-switch",{model:{value:t.settings.preventImageOpen,callback:function(e){t.$set(t.settings,"preventImageOpen",e)},expression:"settings.preventImageOpen"}})],1)],1):t._e()],1),i("md-content",[i("h3",[t._v("Audio")]),i("md-list",[i("md-list-item",[t.marker.audio?i("md-avatar",[i("md-button",{staticClass:"md-icon-button",on:{click:function(e){return t.playPause(t.marker.audio)}}},[t.audioPlaying?i("md-icon",[t._v("pause")]):i("md-icon",[t._v("play_arrow")])],1)],1):t._e(),i("div",{staticClass:"md-list-item-text"},[t.marker.audio?i("span",[t._v(t._s(t.marker.audio.title))]):i("span",[t._v("No audio selected")]),t.marker.audio&&t.marker.audio.duration?i("span",[t._v(t._s(t.marker.audio.duration)+"s")]):t._e()]),t.marker.audio?i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:t.removeAudio}},[i("md-icon",[t._v("delete")])],1):i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:t.addAudio}},[i("md-icon",[t._v("add")])],1)],1),t.marker.audio?i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Autoplay")]),i("span",[t._v("Autoplay audio when marker opened")])]),i("md-switch",{model:{value:t.marker.audioAutoPlay,callback:function(e){t.$set(t.marker,"audioAutoPlay",e)},expression:"marker.audioAutoPlay"}})],1):t._e()],1)],1),i("md-content",[i("h3",[t._v("Embed")]),i("md-list",{staticClass:"md-double-line"},[i("md-list-item",[i("md-field",[i("label",[t._v("Embed URL")]),i("md-input",{attrs:{placeholder:"Youtube, vimeo URL.."},model:{value:t.marker.embedUrl,callback:function(e){t.$set(t.marker,"embedUrl",e)},expression:"marker.embedUrl"}}),i("span",{staticClass:"md-helper-text"},[t._v("This should be the "),i("b",[t._v("embed-ready")]),t._v(" sharing URL")])],1)],1),t.marker.embedUrl?[i("md-list-item",[i("md-field",[i("label",[t._v("Embed description")]),i("md-textarea",{model:{value:t.marker.embedDescription,callback:function(e){t.$set(t.marker,"embedDescription",e)},expression:"marker.embedDescription"}})],1)],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Open embed in popover")]),i("span",[t._v("When clicking the popup image")])]),i("md-switch",{attrs:{disabled:t.marker.embedInEmbed||t.marker.embedInNewWindow},model:{value:t.marker.embedInPopover,callback:function(e){t.$set(t.marker,"embedInPopover",e)},expression:"marker.embedInPopover"}})],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Open embed in in-image imbed")]),t.marker.embedImages.length?i("span",[t._v("The frame will be placed inside the marker's first in-image embed")]):i("span",[t._v("This marker has no in-image embeds yet")])]),i("md-switch",{attrs:{disabled:!t.marker.embedImages.length||t.marker.embedInPopover||t.marker.embedInNewWindow},model:{value:t.marker.embedInEmbed,callback:function(e){t.$set(t.marker,"embedInEmbed",e)},expression:"marker.embedInEmbed"}})],1),t.marker.embedInEmbed?i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Immediately place embed")]),i("span",[t._v("So the user won't have to open the marker first")])]),i("md-switch",{model:{value:t.marker.embedInEmbedImmediate,callback:function(e){t.$set(t.marker,"embedInEmbedImmediate",e)},expression:"marker.embedInEmbedImmediate"}})],1):t._e(),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Open embed in new window")]),i("span",[t._v("When clicking the popup image")])]),i("md-switch",{attrs:{disabled:t.marker.embedInEmbed||t.marker.embedInPopover},model:{value:t.marker.embedInNewWindow,callback:function(e){t.$set(t.marker,"embedInNewWindow",e)},expression:"marker.embedInNewWindow"}})],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Mute audio when embed is opened")]),i("span",[t._v("Any music or positional audio will stop when this marker is opened")])]),i("md-switch",{model:{value:t.marker.embedMutesAudio,callback:function(e){t.$set(t.marker,"embedMutesAudio",e)},expression:"marker.embedMutesAudio"}})],1)]:t._e()],2)],1)],i("h3",[t._v("Popup display")]),i("md-list",{staticClass:"md-double-line"},[i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("No popup")]),i("span",[t._v("This marker has no popup")])]),i("md-switch",{model:{value:t.settings.noPopup,callback:function(e){t.$set(t.settings,"noPopup",e)},expression:"settings.noPopup"}})],1),t.settings.noPopup||t.$root.editor.imageVersion>=4.2?t._e():i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Static popup")]),i("span",[t._v("The marker popup will have a static position")])]),i("md-switch",{attrs:{disabled:t.imageSettings.staticPopups},model:{value:t.settings.staticPopup,callback:function(e){t.$set(t.settings,"staticPopup",e)},expression:"settings.staticPopup"}})],1),t.settings.noPopup?t._e():i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Always open")]),i("span",[t._v("This marker will be uncloseable")])]),i("md-switch",{model:{value:t.settings.alwaysOpen,callback:function(e){t.$set(t.settings,"alwaysOpen",e)},expression:"settings.alwaysOpen"}})],1)],1)],2),i("md-tab",{attrs:{"md-label":"Marker"}},[i("h3",[t._v("Marker display")]),i("md-list",{staticClass:"md-double-line"},[i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Invisible marker")]),i("span",[t._v("To use as a non-clickable tour step")])]),i("md-switch",{attrs:{disabled:t.settings.embedsAreMarker},model:{value:t.marker.noMarker,callback:function(e){t.$set(t.marker,"noMarker",e)},expression:"marker.noMarker"}})],1),t.marker.noMarker?t._e():[t.$root.editor.imageVersion>=4.2?i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Marker type")]),i("span",[t._v("Adds a standard icon")])]),i("select",{directives:[{name:"model",rawName:"v-model",value:t.marker.type,expression:"marker.type"}],on:{change:function(e){var i=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.$set(t.marker,"type",e.target.multiple?i:i[0])}}},[i("option",{attrs:{value:""}},[t._v("(None)")]),i("option",{attrs:{value:"image"}},[t._v("Image")]),i("option",{attrs:{value:"audio"}},[t._v("Audio")]),i("option",{attrs:{value:"video"}},[t._v("Video")]),i("option",{attrs:{value:"media"}},[t._v("Media")]),i("option",{attrs:{value:"link"}},[t._v("Link")])])]):t._e(),t.marker.type?t._e():i("md-list-item",[t.settings.icon?i("md-avatar",{staticClass:"marker-icon"},[i("img",{attrs:{src:t.settings.icon}})]):t._e(),i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Icon")]),i("span",[t._v("Set a custom marker icon image")])]),i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:function(e){return t.toggleIcon(e,t.settings)}}},[t.settings.icon?i("md-icon",[t._v("delete")]):i("md-icon",[t._v("add")])],1)],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Scale marker")]),i("span",[t._v("The marker size is relative to the image")])]),i("md-switch",{attrs:{disabled:t.$root.editor.settings.markersScale},model:{value:t.settings.scales,callback:function(e){t.$set(t.settings,"scales",e)},expression:"settings.scales"}})],1),t.$root.editor.imageVersion>=4.2?t._e():i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Show title")]),t.imageSettings.showTitles?i("span",[t._v("This setting is overridden in the main marker settings")]):i("span",[t._v("Show the marker title under the marker icon")])]),i("md-switch",{attrs:{disabled:t.settings.embedsAreMarker||t.imageSettings.showTitles},model:{value:t.settings.showTitle,callback:function(e){t.$set(t.settings,"showTitle",e)},expression:"settings.showTitle"}})],1),t.marker.type?t._e():i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Default styling")]),i("span",[t._v("Show as circle")])]),i("md-switch",{model:{value:t.hasDefaultClass,callback:function(e){t.hasDefaultClass=e},expression:"hasDefaultClass"}})],1)]],2),i("md-content",[i("h3",[t._v("Marker actions")]),i("md-list",{staticClass:"md-double-line"},[i("md-list-item",[t.settings.micrioLink&&t.settings.micrioLink.id?i("md-avatar",[i("img",{attrs:{src:t.$root.editor.thumbSrc(t.settings.micrioLink.originalShortId||t.settings.micrioLink.id,t.settings.micrioLink.width,t.settings.micrioLink.height,t.settings.micrioLink.tileSize,t.settings.micrioLink.isPng,t.settings.micrioLink.isWebP,t.settings.micrioLink.mapType)}})]):t._e(),i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Marker is Micrio link")]),t.settings.micrioLink&&t.settings.micrioLink.id?i("span",[t._v(t._s(t.settings.micrioLink.id)+" - "+t._s(t.settings.micrioLink.title))]):i("span",[t._v("Link this marker to another image")])]),i("md-button",{staticClass:"md-icon-button md-list-action",attrs:{disabled:t.marker.micrioSplitLink},on:{click:function(e){return t.toggleMarkerLink(e,t.settings)}}},[t.settings.micrioLink?i("md-icon",[t._v("delete")]):i("md-icon",[t._v("add")])],1)],1),t.settings.micrioLink&&t.settings.micrioLink.id?i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Don't open the popup")]),i("span",[t._v("When following the link, don't open the marker popup")])]),i("md-switch",{model:{value:t.settings.noPopup,callback:function(e){t.$set(t.settings,"noPopup",e)},expression:"settings.noPopup"}})],1):t._e(),t.store.state.organisation&&t.store.state.organisation.hasSplitScreen?[i("md-list-item",[t.settings.micrioSplitLink?i("md-avatar",[i("img",{attrs:{src:t.$root.editor.thumbSrcIIIF(t.settings.micrioSplitLink.split(",")[0])}})]):t._e(),i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Splitscreen linked image/marker")]),t.settings.micrioSplitLink?i("span",[t._v(t._s(t.settings.micrioSplitLink))]):i("span",[t._v("Open a split-screen image / marker when opening this marker")])]),i("md-button",{staticClass:"md-icon-button md-list-action",attrs:{disabled:t.marker.noMarker||t.marker.micrioLink},on:{click:function(e){return t.toggleMarkerSplitLink(e,t.settings)}}},[t.settings.micrioSplitLink?i("md-icon",[t._v("delete")]):i("md-icon",[t._v("add")])],1)],1)]:t._e(),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Force audio fade-out")]),i("span",[t._v("Opening this marker forces all audio to fade out")])]),i("md-switch",{model:{value:t.settings.mute,callback:function(e){t.$set(t.settings,"mute",e)},expression:"settings.mute"}})],1)],2)],1),i("md-content",[i("h3",[t._v("Camera animation")]),i("md-list",{staticClass:"md-double-line"},[i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Don't animate")]),i("span",[t._v("No camera animation when opening/closing")])]),i("md-switch",{model:{value:t.settings.noAnimate,callback:function(e){t.$set(t.settings,"noAnimate",e)},expression:"settings.noAnimate"}})],1),t.$root.editor.image.is360?t._e():i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Camera jump")]),i("span",[t._v("The camera will 'jump' to the marker view in a tour")])]),i("md-switch",{attrs:{disabled:t.settings.noAnimate},model:{value:t.settings.doJump,callback:function(e){t.$set(t.settings,"doJump",e)},expression:"settings.doJump"}})],1)],1)],1)],1),i("md-tab",{attrs:{"md-label":"Advanced"}},[i("md-content",[i("md-list",[i("div",{staticClass:"md-list-item-text"},[i("h3",{staticStyle:{"margin-top":"0"}},[t._v("Marker ID")]),i("span",[t._v(t._s(t.marker.id))])])])],1),i("md-content",[i("h3",[t._v("Custom CSS classes")]),i("md-list",[i("md-list-item",[i("md-field",[i("label",[t._v("Custom class names")]),i("md-input",{model:{value:t.customClasses,callback:function(e){t.customClasses=e},expression:"customClasses"}}),i("span",{staticClass:"md-helper-text"},[t._v("Space separated")])],1)],1)],1)],1),i("md-content",[i("h3",[t._v("Images within main image")]),i("md-field",{staticClass:"images"},[t._l(t.marker.embedImages,(function(e,r){return i("md-button",{key:r,staticClass:"image-button",style:"background-image:url("+t.$root.editor.getThumb(e.fileUrl)+")",attrs:{title:"Remove this image"},on:{click:function(e){return t.removeEmbedImage(r)}}},[i("md-icon",[t._v("delete")])],1)})),i("md-button",{staticStyle:{width:"auto"},on:{click:t.addEmbedImage}},[i("md-icon",[t._v("add")]),t._v("Add an image")],1)],2),t.marker.embedImages.length>0?i("md-list",[i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[1==t.marker.embedImages.length?i("span",[t._v("Embedded image "),i("i",[t._v("is")]),t._v(" the marker")]):i("span",[t._v("Embedded images "),i("i",[t._v("are")]),t._v(" the marker")]),i("span",[t._v("The embeds will always be visible and clickable")])]),i("md-switch",{model:{value:t.settings.embedsAreMarker,callback:function(e){t.$set(t.settings,"embedsAreMarker",e)},expression:"settings.embedsAreMarker"}})],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Keep embedded images open")]),i("span",[t._v("Closing this marker doesn't hide the embedded images")])]),i("md-switch",{attrs:{disabled:t.settings.embedsAreMarker},model:{value:t.settings.keepEmbedsOpen,callback:function(e){t.$set(t.settings,"keepEmbedsOpen",e)},expression:"settings.keepEmbedsOpen"}})],1)],1):t._e()],1),i("md-content",[i("h3",[t._v("Video tour")]),i("div",{staticClass:"md-helper-text"},[t._v("Create a video tour that autoplays when this marker is opened")]),t.marker.videoTour?i("md-list",[i("VideoTourEditor",{ref:"videoTours",attrs:{compact:!0,tour:t.marker.videoTour,removeable:!0},on:{remove:t.removeVideoTour}})],1):[i("md-button",{on:{click:t.addVideoTour}},[i("md-icon",[t._v("add")]),t._v(" Create video tour")],1)]],2),i("md-content",[i("h3",[t._v("Custom JSON")]),i("div",{staticClass:"md-helper-text"},[t._v("For custom implementations, set your own marker JSON values here")]),i("JSONEditor",{attrs:{onChange:t.metaChanged,json:t.custom}}),i("div")],1)],1)],1)],1):i("md-content",{staticStyle:{padding:"0 10px"}},[i("h3",[t._v("Marker settings")]),i("md-list",{staticClass:"md-double-line"},[i("md-list-item",[t.imageSettings.markerIcon?i("md-avatar",[i("img",{attrs:{src:t.imageSettings.markerIcon}})]):t._e(),i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Marker icon")]),i("span",[t._v("Set the default marker icon image")])]),i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:t.toggleMainIcon}},[t.imageSettings.markerIcon?i("md-icon",[t._v("delete")]):i("md-icon",[t._v("add")])],1)],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Marker color")]),i("span",[t._v("The default selected marker color")])]),i("md-button",{staticClass:"md-avatar md-colorpicker",style:"background-color: "+t.imageSettings.markerColor+";",on:{click:function(e){t.showColorSelect=!t.showColorSelect}}})],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Marker size")]),i("span",[t._v("Default marker size in pixels")])]),i("div",{staticClass:"md-icon-button md-number"},[i("md-field",[i("md-input",{attrs:{min:"1",step:"1",type:"number"},model:{value:t.imageSettings.markerSize,callback:function(e){t.$set(t.imageSettings,"markerSize",e)},expression:"imageSettings.markerSize"}})],1)],1)]),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Always show titles")]),i("span",[t._v("Marker titles will always be visible")])]),i("md-switch",{model:{value:t.imageSettings.showTitles,callback:function(e){t.$set(t.imageSettings,"showTitles",e)},expression:"imageSettings.showTitles"}})],1),t.$root.editor.image.is360?t._e():i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Cluster markers")]),i("span",[t._v("Clicking overlapping markers zooms in first")])]),i("md-switch",{model:{value:t.$root.editor.settings.clusterMarkers,callback:function(e){t.$set(t.$root.editor.settings,"clusterMarkers",e)},expression:"$root.editor.settings.clusterMarkers"}})],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Scale all markers")]),i("span",[t._v("All markers are scaled to the image size")])]),i("md-switch",{model:{value:t.$root.editor.settings.markersScale,callback:function(e){t.$set(t.$root.editor.settings,"markersScale",e)},expression:"$root.editor.settings.markersScale"}})],1),t.$root.editor.settings.markersScale?i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Don't scale marker titles")]),i("span",[t._v("Keep marker title labels the same size")])]),i("md-switch",{model:{value:t.imageSettings.titlesNoScale,callback:function(e){t.$set(t.imageSettings,"titlesNoScale",e)},expression:"imageSettings.titlesNoScale"}})],1):t._e(),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Fly back when closing markers")]),i("span",[t._v("Go back to previous view when a marker is closed")])]),i("md-switch",{model:{value:t.imageSettings.zoomOutAfterClose,callback:function(e){t.$set(t.imageSettings,"zoomOutAfterClose",e)},expression:"imageSettings.zoomOutAfterClose"}})],1)],1),i("h3",[t._v("Popup settings")]),i("md-list",{staticClass:"md-double-line"},[i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Static popup")]),i("span",[t._v("All marker popups will have a static position")])]),i("md-switch",{model:{value:t.imageSettings.staticPopups,callback:function(e){t.$set(t.imageSettings,"staticPopups",e)},expression:"imageSettings.staticPopups"}})],1),t.imageSettings.staticPopups?t._e():i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Static mobile popup")]),i("span",[t._v("Only mobile marker popups will be static")])]),i("md-switch",{model:{value:t.imageSettings.staticMobilePopups,callback:function(e){t.$set(t.imageSettings,"staticMobilePopups",e)},expression:"imageSettings.staticMobilePopups"}})],1)],1),t.$root.editor.imageVersion>=4.2?[i("h3",[t._v("Media settings")]),i("md-list",{staticClass:"md-double-line"},[i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Don't autoplay media")]),i("span",[t._v("Video and audio will not autoplay")])]),i("md-switch",{model:{value:t.imageSettings.preventAutoPlay,callback:function(e){t.$set(t.imageSettings,"preventAutoPlay",e)},expression:"imageSettings.preventAutoPlay"}})],1)],1)]:t._e()],2),i("md-toolbar",[t.marker?[i("md-button",{staticClass:"md-accent",attrs:{title:"delete marker"},on:{click:function(e){t.showRemove=!0}}},[i("md-icon",[t._v("delete")]),t._v(" Remove")],1),i("md-button",{staticClass:"md-primary",on:{click:t.save}},[i("md-icon",[t._v("check")]),t._v(" Save")],1)]:[i("md-button",{staticClass:"md-primary md-accent md-raised",attrs:{title:"Add new marker"},on:{click:t.newMarker}},[i("md-icon",[t._v("add")]),t._v(" Create new marker")],1)]],2),i("md-dialog-confirm",{attrs:{"md-active":t.showRemove,"md-title":"Remove marker","md-content":"Remove this marker?","md-confirm-text":"Yes","md-cancel-text":"No"},on:{"update:mdActive":function(e){t.showRemove=e},"update:md-active":function(e){t.showRemove=e},"md-cancel":function(e){t.showRemove=!1},"md-confirm":t.removeConfirm}})],1):t._e()},Ue=[],Ne=i("33c3"),Ve=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("ColorPicker",{model:{value:t.pickerColor,callback:function(e){t.pickerColor=e},expression:"pickerColor"}})},ze=[],Fe=i("c345"),Je={components:{ColorPicker:Fe["Chrome"]},props:{value:String},data:function(){return{color:String}},created:function(){var t=this;this.color=this.value,setTimeout((function(){return addEventListener("click",t.close)}),100)},beforeDestroy:function(){removeEventListener("click",this.close)},computed:{pickerColor:{get:function(){return this.color},set:function(t){this.color=t.hex8,this.$emit("input",this.color)}}},methods:{close:function(t){var e=t.target;do{if(e==this.$el)return;e=e.parentNode}while(e);this.$emit("close")}}},Be=Je,Ge=(i("8388"),Object(V["a"])(Be,Ve,ze,!1,null,null,null)),Ye=Ge.exports,We=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("md-list-item",{attrs:{"md-expand":"","md-expanded":t.opened},on:{"update:mdExpanded":function(e){t.opened=e},"update:md-expanded":function(e){t.opened=e}}},[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v(t._s(t.tour.title))]),i("span",[t._v(t._s(t.tour.description))])]),i("md-content",{attrs:{slot:"md-expand"},slot:"md-expand"},[i("md-list",[t.compact?t._e():i("md-list-item",[i("md-field",[i("label",[t._v("Title")]),i("md-input",{model:{value:t.tour.title,callback:function(e){t.$set(t.tour,"title",e)},expression:"tour.title"}})],1)],1),t.compact?t._e():i("md-list-item",[i("md-field",[i("label",[t._v("Description")]),i("md-textarea",{staticClass:"description",model:{value:t.tour.description,callback:function(e){t.$set(t.tour,"description",e)},expression:"tour.description"}})],1)],1),i("md-list-item",[i("md-field",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Tour duration")]),i("span",[t._v("In seconds")])]),i("div",{staticClass:"md-icon-button md-list-action"},[i("md-input",{attrs:{min:"1",step:"1",type:"number"},model:{value:t.tour.duration,callback:function(e){t.$set(t.tour,"duration",e)},expression:"tour.duration"}})],1)])],1),t.compact?t._e():i("h3",[t._v("Audio track")]),t.compact?t._e():i("md-list-item",[t.tour.audio?i("md-avatar",[i("md-button",{staticClass:"md-icon-button"},[i("md-icon",[t._v("audiotrack")])],1)],1):t._e(),i("div",{staticClass:"md-list-item-text"},[t.tour.audio?i("span",[t._v(t._s(t.tour.audio.title))]):i("span",[t._v("No audio selected")]),t.tour.audio&&t.tour.audio.duration?i("span",[t._v(t._s(t.tour.audio.duration)+"s")]):t._e()]),t.tour.audio?i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:t.removeAudio}},[i("md-icon",[t._v("delete")])],1):i("md-button",{staticClass:"md-icon-button md-accent md-raised md-list-action",on:{click:t.addAudio}},[i("md-icon",[t._v("add")])],1)],1),i("h3",[t._v("Subtitles (SRT)")]),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[t.tour.subtitle?i("span",[t._v(t._s(t.tour.subtitle.title))]):i("span",[t._v("No subtitle selected")]),t.tour.subtitle&&t.tour.subtitle.fileSize?i("span",[t._v(t._s(t.tour.subtitle.fileSize)+"b")]):t._e()]),t.tour.subtitle?i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:t.removeSubtitle}},[i("md-icon",[t._v("delete")])],1):i("md-button",{staticClass:"md-icon-button md-accent md-raised md-list-action",on:{click:t.addSubtitle}},[i("md-icon",[t._v("add")])],1)],1),t.compact?t._e():i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Autostart")]),i("span",[t._v("Autostart this tour on image load")])]),i("md-switch",{model:{value:t.tour.autostart,callback:function(e){t.$set(t.tour,"autostart",e)},expression:"tour.autostart"}})],1),t.compact?t._e():i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Keep markers")]),i("span",[t._v("Don't hide markers when playing")])]),i("md-switch",{model:{value:t.tour.keepMarkers,callback:function(e){t.$set(t.tour,"keepMarkers",e)},expression:"tour.keepMarkers"}})],1),i("md-list",{staticClass:"tour-events md-dense"},[i("h3",[t._v("Custom tour events")]),i("div",{staticClass:"md-helper-text"},[t._v("For custom implementations, create your own timed events here")]),t._l(t.tour.events,(function(e,r){return i("md-list-item",{key:e.id,staticClass:"tour-event",class:t.activeEvents[e.id]&&"event-active"},[i("div",[t._v("\n\t\t\t\t\tActive: "),i("input",{directives:[{name:"model",rawName:"v-model",value:e.start,expression:"event.start"}],attrs:{type:"number",min:"0",max:e.end},domProps:{value:e.start},on:{input:function(i){i.target.composing||t.$set(e,"start",i.target.value)}}}),t._v(" to\n\t\t\t\t\t"),i("input",{directives:[{name:"model",rawName:"v-model",value:e.end,expression:"event.end"}],attrs:{type:"number",min:e.start,max:t.tour.duration},domProps:{value:e.end},on:{input:function(i){i.target.composing||t.$set(e,"end",i.target.value)}}}),t._v(" seconds\n\t\t\t\t\t"),i("br"),i("input",{directives:[{name:"model",rawName:"v-model",value:e.action,expression:"event.action"}],attrs:{placeholder:"Action"},domProps:{value:e.action},on:{input:function(i){i.target.composing||t.$set(e,"action",i.target.value)}}}),i("br"),i("input",{directives:[{name:"model",rawName:"v-model",value:e.data,expression:"event.data"}],attrs:{placeholder:"Value"},domProps:{value:e.data},on:{input:function(i){i.target.composing||t.$set(e,"data",i.target.value)}}})]),r0?i("md-button",{staticClass:"md-icon-button md-list-action",attrs:{title:"Move up"},on:{click:function(e){return t.moveItem(e,r,-1,t.tour.events)}}},[i("md-icon",[t._v("arrow_upward")])],1):t._e(),i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:function(e){return t.removeEvent(r)}}},[i("md-icon",[t._v("delete")])],1)],1)})),i("md-list-item",{on:{click:t.addEvent}},[i("md-icon",{staticClass:"md-primary"},[t._v("add")]),i("div",{staticClass:"md-list-item-text"},[i("span",[i("i",[t._v("Add a new event")])])])],1)],2),i("h3",[t._v("Tour ID")]),t.tour.scrollable?t._e():i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v(t._s(t.tour.id))])])]),t.removeable?i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[t._v("Remove this tour")]),i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:function(e){return t.$emit("remove")}}},[i("md-icon",[t._v("delete")])],1)],1):t._e()],1)],1)],1)},qe=[],Ke={props:{tour:{type:Object,default:function(){return{}}},compact:Boolean,removeable:Boolean},data:function(){return{store:T,audioPlaying:!1,audio:new Audio,activeEvents:{}}},computed:{opened:{get:function(){return this.$root.editor.currentVideoTour==this.tour},set:function(t){this.$root.editor.currentVideoTour=t?this.tour:null,t&&(this.$root.editor.currentVideoTourEditor=this)}}},mounted:function(){var t=this;this.audio.addEventListener("play",(function(){return t.audioPlaying=!0})),this.audio.addEventListener("pause",(function(){return t.audioPlaying=!1})),this.audio.addEventListener("ended",(function(){return t.audioPlaying=!1})),this.$root.editor.$refs.micrio.addEventListener("tour-event",this.tourEvent)},beforeDestroy:function(){this.$root.editor&&(this.$root.editor.currentVideoTour=null,this.$root.editor.currentVideoTourEditor=null,this.$root.editor.$refs.micrio.removeEventListener("tour-event",this.tourEvent)),this.audio&&(this.audio=null)},methods:{addAudio:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$root.editor.getAudio();case 2:e=t.sent,e&&(this.tour.duration=e.duration,this.tour.audio={fileUrl:e.fileUrl,title:e.title,duration:Math.round(10*e.duration)/10,mimeType:e.mimeType});case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),removeAudio:function(){var t=this;this.$root.main.confirm("Do you want to remove the audio for this tour?").then((function(){t.audio.pause(),t.tour.audio=null})).catch((function(){return null}))},addSubtitle:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$root.editor.getSubtitles();case 2:e=t.sent,e&&(this.tour.subtitle={fileUrl:e.fileUrl,title:e.title,fileSize:e.fileSize,mimeType:e.mimeType});case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),removeSubtitle:function(){var t=this;this.$root.main.confirm("Do you want to remove the subtitle for this tour?").then((function(){t.tour.subtitle=null})).catch((function(){return null}))},addEvent:function(){this.tour.events.push({id:this.$root.createGuid(),start:0,end:5,action:null,data:null})},removeEvent:function(t){this.tour.events.splice(t,1)},tourEvent:function(t){n["default"].set(this.activeEvents,t.detail.id,"start"==t.detail.type)},moveItem:function(t,e,i,r){t.stopPropagation(),t.preventDefault();var n=r.splice(e,1);r.splice(e+i,0,n[0])}}},Xe=Ke,He=(i("c8d2"),Object(V["a"])(Xe,We,qe,!1,null,null,null)),Qe=He.exports,Ze={components:{JSONEditor:Ne["a"],ColorPicker:Ye,VideoTourEditor:Qe},data:function(){return{loading:!1,store:T,isDev:!!window._isDashDev,settings:{_meta:{},micrioLink:{},icon:null},audioPlaying:!1,audio:new Audio,showRemove:!1,activeTab:"tab-markers-selected",showColorSelect:!1,addingMarker:!1,activeId:null,currentTour:null,classes:[],custom:{},assetPicker:null}},watch:{settings:{handler:function(t){this.marker&&(this.marker.data=t)},deep:!0},classes:function(){this.marker&&(this.marker.class=this.classes.join(" "))},activeTab:function(){this.showColorSelect=!1,this.currentTOur=null,this.$root.editor.showMarkers&&("tab-markers-selected"==this.activeTab&&this.$root.editor.tutorial.show("markers"),"tab-markers-main"==this.activeTab&&this.$root.editor.tutorial.show())},activeId:function(){this.read()},marker:function(){this.$root.editor.currentMarkerEditor=this.marker?this:null,this.marker&&(this.activeTab="tab-markers-selected",this.$root.editor.tutorial.step("select-marker"))},"marker.title":function(t){t&&this.$root.editor.tutorial.step("set-title")},"marker.markdown":function(t){"New marker text"==t&&this.$root.editor.tutorial.step("set-description")},"$root.editor.activeSection":function(){this.activeId=null,this.activeTab="tab-markers-selected"},"imageSettings.staticPopups":function(t){t&&(this.imageSettings.staticMobilePopups=!0),this.settings.staticPopup=t,this.$root.editor.data.markers.forEach((function(e){e.data.staticPopup=t}))},"imageSettings.showTitles":function(t){this.settings.showTitle=t,this.$root.editor.data.markers.forEach((function(e){e.data.showTitle=t}))},"imageSettings.markerIcon":function(){this.setDefaultStyles()},"imageSettings.markerColor":function(){this.setDefaultStyles()},"imageSettings.markerSize":function(){this.setDefaultStyles()},"settings.embedsAreMarker":function(t){this.marker.noMarker=t}},mounted:function(){var t=this;this.audio.addEventListener("play",(function(){return t.audioPlaying=!0})),this.audio.addEventListener("pause",(function(){return t.audioPlaying=!1})),this.audio.addEventListener("ended",(function(){return t.audioPlaying=!1})),this.setDefaultStyles()},beforeDestroy:function(){this.$root.editor&&(this.$root.editor.currentMarkerEditor=null)},computed:{imageSettings:function(){return this.$root.editor.settings._markers},marker:function(){var t=this;return this.$root.editor.data.markers.find((function(e){return e.id==t.activeId}))},hasDefaultClass:{get:function(){return!this.marker.noMarker&&this.classes.indexOf("default")>=0},set:function(t){var e=this.classes.indexOf("default");e>=0&&this.classes.splice(e,1),t&&this.classes.push("default")}},customClasses:{get:function(){return this.classes.filter((function(t){return"default"!=t})).join(" ")},set:function(t){var e=[];this.hasDefaultClass&&e.push("default"),t.trim().split(" ").forEach((function(t){return e.push(t)})),this.classes=e}}},methods:{setDefaultStyles:function(){var t=this.$root.editor.$refs.micrioContainer.style,e=this.imageSettings,i=this.$root.imageVersion>=4.2,r={bg:"--micrio-marker-background",col:"--micrio-marker-color"+(i?"":"-hover"),size:"--micrio-marker-size"};e.markerIcon?t.setProperty(r.bg,"url('".concat(e.markerIcon,"')")):t.removeProperty(r.bg),e.markerColor?t.setProperty(r.col,e.markerColor):t.removeProperty(r.col),e.markerSize?t.setProperty(r.size,Number(e.markerSize)+(i?0:7)+"px"):t.removeProperty(r.size)},read:function(){this.marker&&(this.settings=JSON.parse(JSON.stringify(this.marker.data||{})),this.settings._meta||(this.settings._meta={}),this.custom=this.settings._meta,this.marker.class&&(this.classes=this.marker.class.trim().split(" ")))},metaChanged:function(t){this.settings._meta=t},removeConfirm:function(){var t,e=this,i=this.$root.editor.data.markers.findIndex((function(t){return t.id==e.activeId}));i>=0&&function(){var r=e.activeId;e.$root.activeId=null,e.$root.editor.data.markers.splice(i,1),b.action(111,e.$root.editor.imageId,null,e.activeId);for(var n=e.$root.editor.data.markerTours,a=0;a=0&&n[a].steps.splice(t,1);e.$root.editor.save()}()},save:function(){this.$root.editor.save(),this.activeId=null},newMarker:function(){var t=this;this.addingMarker=!0,this.activeId=null,this.$root.main.setMessage("Place your new marker"),this.$root.editor.$el.classList.add("adding-marker"),this.$root.editor.tutorial.step("add-marker"),setTimeout((function(){t.$root.editor.$el.addEventListener("click",t.placedMarker)}),500)},placedMarker:function(t){var e=this,i=this.$root.editor.$refs.micrio,r=i.camera.getCoo(t.clientX,t.clientY,!0);this.addingMarker=!1,this.$root.editor.$el.removeEventListener("click",this.placedMarker),this.$root.editor.$el.classList.remove("adding-marker");var a=i.camera.getView(),s=a[2]-a[0],o=a[3]-a[1],c=.1*Math.min(s,o),u=this.$root.createGuid(),d=[r[0]-c,r[1]-c,r[0]+c,r[1]+c],l=this.getArea(d);b.action(110,this.$root.editor.imageId,null,u),this.$root.editor.data.markers.push({id:u,x:r[0],y:r[1],title:"",body:"",bodySecondary:"",view:d,area:l,data:{showTitle:this.imageSettings.showTitles,staticPopup:this.imageSettings.staticPopups,noAnimate:!1,micrioLink:null,icon:null},class:"default",images:[],embedImages:[],html:"",audio:null,videoTour:null,embedInPopover:!1,embedMutesAudio:!0,audioAutoPlay:!0}),n["default"].nextTick((function(){return e.activeId=u})),this.$root.main.setMessage("Placed marker!"),this.$root.editor.tutorial.step("place-marker"),this.$root.editor.save()},getArea:function(t){var e=this.$root.editor.$refs.micrio.$current.$info;return[Math.round(e.width*t[0]),Math.round(e.height*t[1]),Math.round(e.width*(t[2]-t[0])),Math.round(e.height*(t[3]-t[1]))]},setMarkerBody:function(t){t.body=t.markdown?ft()(t.markdown):"",t.bodySecondary=t.markdownSecondary?ft()(t.markdownSecondary):""},toggleMarkerLink:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.stopPropagation(),e.preventDefault(),!i.micrioLink){t.next=6;break}i.micrioLink=null,t.next=10;break;case 6:return t.next=8,this.$root.editor.getMicrio(void 0,!0);case 8:r=t.sent,r&&(i.micrioLink={id:r.shortId,originalShortId:r.originalShortId,width:r.width,height:r.height,tileSize:r.tileSize,title:r.title,isPng:r.isPng,isWebP:r.isWebP,is360:r.is360,mapType:r.mapType,view:r.startView&&r.startView.split(",").map((function(t){return Number(t)}))||null});case 10:case"end":return t.stop()}}),t,this)})));function e(e,i){return t.apply(this,arguments)}return e}(),toggleMarkerSplitLink:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.stopPropagation(),e.preventDefault(),!i.micrioSplitLink){t.next=6;break}i.micrioSplitLink=null,t.next=13;break;case 6:return r=!1,t.next=9,this.$root.main.confirm("Split image selection","Do you want to link to another image's marker, or an entire image?","Entire image","Marker inside other image").then((function(){return r=!0})).catch((function(){return r=!1}));case 9:return t.next=11,this.$root.editor.getExternalMarker(r);case 11:n=t.sent,n&&(i.micrioSplitLink=n.split(",").reverse().join(","));case 13:case"end":return t.stop()}}),t,this)})));function e(e,i){return t.apply(this,arguments)}return e}(),addImage:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$root.editor.getImage();case 2:e=t.sent,e&&this.marker.images.push({id:e.id,width:e.width,height:e.height,src:e.fileUrl,title:e.title,description:null,micrioId:e.shortId}),b.action(112,this.$root.editor.imageId,e.shortId,this.activeId);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),removeImage:function(t){var e=this.marker.images[t];b.action(113,this.$root.editor.imageId,e.shortId,this.activeId),this.marker.images.splice(t,1)},addEmbedImage:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e,i,r,n,a,s,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$root.editor.getImage();case 2:if(e=t.sent,e){t.next=5;break}return t.abrupt("return");case 5:i=this.$root.editor.$refs.micrio,r=i.camera.getCoo((innerWidth-360)/2,innerHeight/2),n=i.camera.getView(),a=n[2]-n[0],s=n[3]-n[1],o=.1*Math.min(a,s),this.marker.embedImages.push({id:e.id,width:e.width,height:e.height,micrioId:e.shortId,area:[r[0]-o,r[1]-o,r[0]+o,r[1]+o],fileUrl:e.fileUrl,className:"",z:0}),b.action(114,this.$root.editor.imageId,e.shortId,this.activeId);case 13:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),removeEmbedImage:function(t){var e=this.marker.embedImages[t];b.action(115,this.$root.editor.imageId,e.shortId,this.activeId),this.marker.embedImages.splice(t,1)},playPause:function(){this.marker.audio&&this.audio&&(this.audio.paused?this.playAudio():this.pauseAudio())},playAudio:function(){this.audio&&(this.audio.src!=this.marker.audio.fileUrl&&(this.audio.src=this.marker.audio.fileUrl,this.audioPlaying=!0),this.audio.play())},pauseAudio:function(){this.audio&&this.audio.pause()},addAudio:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$root.editor.getAudio();case 2:e=t.sent,e&&(this.marker.audio={fileUrl:e.fileUrl,title:e.title,duration:Math.round(10*e.duration)/10,mimeType:e.mimeType},this.marker.videoTour&&(this.marker.videoTour.duration=e.duration),b.action(118,this.$root.editor.imageId,e.id,this.activeId));case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),removeAudio:function(){var t=this;this.$root.main.confirm("Do you want to remove the audio for this marker?").then((function(){b.action(119,t.$root.editor.imageId,null,t.activeId),t.audio.pause(),t.marker.audio=null})).catch((function(){return null}))},addVideoTour:function(){var t=this,e=this.$root.createGuid();this.marker.videoTour={id:e,duration:this.marker.audio&&this.marker.audio.duration||30,audio:null,title:"Video tour",description:"",timeline:[],events:[]},b.action(116,this.$root.editor.imageId,null,this.activeId),this.$nextTick((function(){t.$refs.videoTours.opened=!0,setTimeout((function(){window.dispatchEvent(new Event("resize"))}),500)}))},removeVideoTour:function(){b.action(117,this.$root.editor.imageId,null,this.activeId),this.marker.videoTour=null},toggleIcon:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.stopPropagation(),e.preventDefault(),!i.icon){t.next=6;break}i.icon=null,t.next=10;break;case 6:return t.next=8,this.$root.editor.getImage();case 8:r=t.sent,r&&(i.icon=r.fileUrl,i.iconMicrioId=r.shortId);case 10:case"end":return t.stop()}}),t,this)})));function e(e,i){return t.apply(this,arguments)}return e}(),toggleMainIcon:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!this.imageSettings.markerIcon){t.next=4;break}this.imageSettings.markerIcon=null,t.next=8;break;case 4:return t.next=6,this.$root.editor.getImage();case 6:e=t.sent,e&&(this.imageSettings.markerIcon=this.$root.editor.getThumb(e.fileUrl));case 8:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()}},ti=Ze,ei=(i("16a0"),Object(V["a"])(ti,Le,Ue,!1,null,null,null)),ii=ei.exports,ri=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.$root.editor.showTours?i("div",[i("md-dialog-title",[t._v("Tours")]),i("md-tabs",{attrs:{"md-active-tab":t.activeTab}},[i("md-tab",{staticClass:"no-padding",attrs:{id:"tab-markertours-selected","md-label":"Marker tours"},on:{click:function(e){t.activeTab="tab-markertours-selected"}}},[t.$root.editor.data.markerTours.length?i("md-list",{staticClass:"md-double-line",attrs:{"md-expand-single":"expandSingle"}},t._l(t.$root.editor.data.markerTours,(function(e){return i("MarkerTourEditor",{key:e.id,attrs:{tour:e,opened:t.currentMarkerTour==e}})})),1):i("md-empty-state",{attrs:{"md-icon":"pageview","md-label":"Create your first marker tour below"}})],1),i("md-tab",{staticClass:"no-padding",attrs:{id:"tab-videotours-selected","md-label":"Video tours"},on:{click:function(e){t.activeTab="tab-videotours-selected"}}},[t.$root.editor.data.tours.length?i("md-list",{staticClass:"md-double-line",attrs:{"md-expand-single":"expandSingle"}},t._l(t.$root.editor.data.tours,(function(e){return i("VideoTourEditor",{key:e.id,attrs:{tour:e,opened:t.currentVideoTour==e}})})),1):i("md-empty-state",{attrs:{"md-icon":"switch_video","md-label":"Create your first video tour below"}})],1)],1),i("md-toolbar",["tab-markertours-selected"==t.activeTab?[t.currentMarkerTour?[i("md-button",{staticClass:"md-accent",attrs:{title:"Delete marker tour"},on:{click:t.removeMarkerTour}},[i("md-icon",[t._v("delete")]),t._v(" Remove")],1),i("md-button",{staticClass:"md-primary md-accent md-raised",attrs:{title:"Save marker tour"},on:{click:t.saveMarkerTour}},[i("md-icon",[t._v("check")]),t._v(" Save")],1)]:i("md-button",{staticClass:"md-primary md-accent md-raised",attrs:{title:"Add new marker tour"},on:{click:t.addMarkerTour}},[i("md-icon",[t._v("add")]),t._v(" New marker tour")],1)]:[t.currentVideoTour?[i("md-button",{staticClass:"md-accent",attrs:{title:"Delete video tour"},on:{click:t.removeVideoTour}},[i("md-icon",[t._v("delete")]),t._v(" Remove")],1),i("md-button",{staticClass:"md-primary md-accent md-raised",attrs:{title:"Save video tour"},on:{click:t.saveVideoTour}},[i("md-icon",[t._v("check")]),t._v(" Save")],1)]:i("md-button",{staticClass:"md-primary md-accent md-raised",attrs:{title:"Add new video tour"},on:{click:t.addVideoTour}},[i("md-icon",[t._v("add")]),t._v(" New video tour")],1)]],2)],1):t._e()},ni=[],ai=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("md-list-item",{attrs:{"md-expand":"","md-expanded":t.opened},on:{"update:mdExpanded":function(e){t.opened=e},"update:md-expanded":function(e){t.opened=e}}},[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v(t._s(t.tour.title))]),i("span",[t._v(t._s(t.tour.description))])]),i("md-list",{attrs:{slot:"md-expand"},slot:"md-expand"},[i("h3",[t._v("Tour content")]),i("md-list-item",[i("md-field",[i("label",[t._v("Title")]),i("md-input",{model:{value:t.tour.title,callback:function(e){t.$set(t.tour,"title",e)},expression:"tour.title"}})],1)],1),i("md-list-item",[i("md-field",[i("label",[t._v("Subtitle")]),i("md-textarea",{staticClass:"description",model:{value:t.tour.description,callback:function(e){t.$set(t.tour,"description",e)},expression:"tour.description"}})],1)],1),i("md-list-item",[i("md-field",[i("label",[t._v("Description")]),i("md-textarea",{staticClass:"description",model:{value:t.tour.body,callback:function(e){t.$set(t.tour,"body",e)},expression:"tour.body"}})],1)],1),i("md-list-item",[t.tour.image?i("md-avatar",[i("img",{attrs:{src:t.$root.editor.getThumb(t.tour.image)}})]):t._e(),i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Tour image")]),i("span",[t._v("Set a cover image for this tour, used for social sharing")])]),i("md-button",{staticClass:"md-icon-button md-list-action ",on:{click:function(e){return t.toggleTourImage(e,t.tour)}}},[t.tour.image?i("md-icon",[t._v("delete")]):i("md-icon",[t._v("add")])],1)],1),[i("h3",[t._v("Tour steps")]),i("div",{staticClass:"md-helper-text"},[t._v("To add tour steps, simply click on the markers on the left in the correct order.")]),i("div",{staticClass:"md-helper-text"},[t._v("Additionally, you can add steps from other images using the button below.")]),i("md-list",t._l(t.steps,(function(e,r){return i("md-list-item",{key:e.id},[i("div",{staticClass:"md-list-item-text"},[i("span",[i("b",[t._v(t._s(r+1)+".")]),t._v(" "+t._s(e.title))]),e.imageId?i("span",[t._v("Image: "),i("a",{attrs:{href:e.editorLink,target:"_blank"}},[t._v(t._s(e.image))])]):t._e()]),r0?i("md-button",{staticClass:"md-icon-button md-list-action",attrs:{title:"Move up"},on:{click:function(e){return t.moveItem(e,r,-1)}}},[i("md-icon",[t._v("arrow_upward")])],1):t._e(),i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:function(e){return t.removeStep(e,r)}}},[i("md-icon",[t._v("delete")])],1)],1)})),1),i("md-button",{staticClass:"md-primary",attrs:{title:"add an external tour step"},on:{click:t.addExternalStep}},[i("md-icon",[t._v("add")]),t._v(" Add an external tour step")],1)],i("h3",[t._v("Tour settings")]),t.tour.scrollable?t._e():i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Only show active marker")]),i("span",[t._v("Hide markers when tour is running")])]),i("md-switch",{model:{value:t.tour.hideMarkers,callback:function(e){t.$set(t.tour,"hideMarkers",e)},expression:"tour.hideMarkers"}})],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Scrolling tour")]),i("span",[t._v("This tour is a scrollable page")])]),i("md-switch",{model:{value:t.tour.scrollable,callback:function(e){t.$set(t.tour,"scrollable",e)},expression:"tour.scrollable"}})],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Keep viewport when exiting tour")]),i("span",[t._v("Don't animate the camera back to the starting view")])]),i("md-switch",{model:{value:t.tour.rememberStep,callback:function(e){t.$set(t.tour,"rememberStep",e)},expression:"tour.rememberStep"}})],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Autostart")]),i("span",[t._v("Autostart this tour on image load")])]),i("md-switch",{model:{value:t.tour.autostart,callback:function(e){t.$set(t.tour,"autostart",e)},expression:"tour.autostart"}})],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Can't exit this tour")]),i("span",[t._v("This tour is uncloseable")])]),i("md-switch",{model:{value:t.tour.cannotClose,callback:function(e){t.$set(t.tour,"cannotClose",e)},expression:"tour.cannotClose"}})],1),i("h3",[t._v("Tour ID")]),t.tour.scrollable?t._e():i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v(t._s(t.tour.id))])])])],2)],1)},si=[],oi=i("768b"),ci={props:{tour:{type:Object,default:function(){return{}}}},data:function(){return{store:T,imageData:this.$root.editor.imageData}},computed:{opened:{get:function(){return this.$root.editor.currentMarkerTour==this.tour},set:function(t){this.$root.editor.currentMarkerTour=t?this.tour:null}},steps:function(){var t=this;if(!this.opened)return[];for(var e=[],i=[],r=function(r){var n=t.tour.steps[r],a=n.split(","),s=Object(oi["a"])(a,2),o=s[0],c=s[1],u=c?t.imageData[c]:t.$root.editor.data;!u&&i.indexOf(c)<0&&i.push(c);var d=u&&u.markers?u.markers.find((function(t){return t.id==o})):null;e.push({title:(d?d.title:"NOT FOUND")||"(No title)",image:u?u.title:null,imageId:c,id:o,editorLink:c?location.href.replace(/\/edit\/[^/]+\/(\w{2})$/,"/edit/".concat(c,"/$1")):null})},n=0;n=0?this.$root.main.setMessage("This marker is already in the tour!"):this.tour.steps.push(e));case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),toggleTourImage:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!i.image){t.next=4;break}i.image=null,t.next=8;break;case 4:return t.next=6,this.$root.editor.getImage();case 6:r=t.sent,r&&(i.image=r.fileUrl);case 8:case"end":return t.stop()}}),t,this)})));function e(e,i){return t.apply(this,arguments)}return e}()}},ui=ci,di=Object(V["a"])(ui,ai,si,!1,null,null,null),li=di.exports,mi={components:{VideoTourEditor:Qe,MarkerTourEditor:li},data:function(){return{activeTab:"tab-markertours-selected"}},computed:{currentVideoTour:function(){return this.$root.editor.currentVideoTour},currentMarkerTour:function(){return this.$root.editor.currentMarkerTour}},watch:{activeTab:function(){this.$root.editor.currentVideoTour=this.$root.editor.currentMarkerTour=null}},methods:{addVideoTour:function(){var t=this;this.$root.editor.currentVideoTour=null,this.$nextTick((function(){var e=t.$root.editor.data.tours,i=t.$root.createGuid(),r={id:i,duration:30,audio:null,title:"New video tour",description:"",timeline:[],autostart:!1,keepMarkers:!1,events:[]};e.push(r),b.action(130,t.$root.editor.imageId,null,i),t.$nextTick((function(){t.$root.editor.currentVideoTour=r}))}))},closeAllVideoTours:function(){this.$root.editor.currentVideoTour=null,this.$root.editor.currentVideoTourEditor=null},saveVideoTour:function(){this.closeAllVideoTours(),this.$root.editor.save()},removeVideoTour:function(){var t=this,e=this.currentVideoTour.id,i=this.$root.editor.data.tours.findIndex((function(t){return t.id==e}));this.$root.main.confirm("Do you want to remove this video tour?").then((function(){b.action(131,t.$root.editor.imageId,null,e),t.$root.editor.data.tours.splice(i,1),t.closeAllVideoTours()})).catch((function(){return null}))},addMarkerTour:function(){var t=this;this.$root.editor.currentMarkerTour=null,this.$nextTick((function(){var e={id:t.$root.createGuid(),title:"New marker tour",description:"",body:"",steps:[],image:null,cannotClose:!1,autostart:!1,scrollable:!1,rememberStep:!1};t.$root.editor.data.markerTours.push(e),t.$root.editor.tutorial.step("add-tour"),b.action(120,t.$root.editor.imageId,null,e.id),t.$nextTick((function(){t.$root.editor.currentMarkerTour=e}))}))},saveMarkerTour:function(){this.$root.editor.currentMarkerTour=null,this.$root.editor.save()},removeMarkerTour:function(){var t=this,e=this.currentMarkerTour.id,i=this.$root.editor.data.markerTours.findIndex((function(t){return t.id==e}));this.$root.main.confirm("Do you want to remove this marker tour?").then((function(){b.action(121,t.$root.editor.imageId,null,e),t.$root.editor.data.markerTours.splice(i,1),t.$root.editor.currentMarkerTour=null})).catch((function(){return null}))}}},hi=mi,pi=Object(V["a"])(hi,ri,ni,!1,null,null,null),gi=pi.exports,fi=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"micrio-videotour",class:!t.paused&&"playing"},[t._l(t.data.timeline,(function(e,r){return i("MRectangle",{key:e.id,ref:"rects",refInFor:!0,attrs:{id:e.id,dark:t.sActive==e,area:e.rect,label:(r+1).toString()}})})),i("div",{staticClass:"tour-timeline"},[i("md-button",{on:{click:t.toggleTourStart}},[t.paused?i("md-icon",[t._v("play_arrow")]):i("md-icon",[t._v("pause")])],1),i("div",{ref:"track",staticClass:"track"},[i("div",{staticClass:"events"},t._l(t.data.events,(function(e,r){return i("div",{key:r,staticClass:"event",style:"--idx:"+r+";right:"+100*(1-e.end/t.data.duration)+"%;left:"+e.start/t.data.duration*100+"%;",attrs:{title:e.action+" / "+e.value+" - "+t.getTime(e.start*t.data.duration,!0)+" - "+t.getTime(e.end*t.data.duration,!0)}})})),0),t._l(t.data.timeline,(function(e,r){return i("div",{key:e.id,class:["segment",t.sActive==e&&"highlighted"],style:"right:"+100*(1-e.end)+"%;left:"+100*e.start+"%;",attrs:{title:t.getTime(e.start*t.data.duration,!0)+" - "+t.getTime(e.end*t.data.duration,!0)},on:{click:function(i){t.sActive=e!=t.sActive||t.moved?e:null},mousedown:function(i){return t.dStart(i,e)}}},[i("span",{staticClass:"index"},[t._v(t._s(r+1))]),i("button",{staticClass:"remove",attrs:{title:"Remove segment"},on:{click:function(e){return t.removeSegment(r)}}},[i("md-icon",[t._v("delete")])],1)])})),i("div",{class:["timebar",t.sDragging||t.tDragging?"dragging":null],style:"left: "+t.timePerc+"%",on:{mousedown:t.pStart}},[i("div",[t._v(t._s(t.timestamp))])])],2),i("md-button",{staticClass:"add",on:{click:t.addSegment}},[i("md-icon",[t._v("add")])],1)],1)],2)},vi=[],bi=(i("55dd"),{components:{MRectangle:xe},props:{data:{type:Object,default:function(){return null}}},data:function(){return{sActive:null,sOrig:null,sDragging:!1,resizingLeft:!1,resizingRight:!1,sStartLeft:0,moved:!1,micrioTour:null,audio:null,timePerc:0,paused:!0,tick:0,tDragging:!1}},computed:{timestamp:function(){return this.getTime(this.data.duration*this.timePerc/100)}},created:function(){this.sort()},mounted:function(){this.micrioTour=new window.MicrioVideoTour(this.$root.editor.$refs.micrio,{duration:this.data.duration,timeline:this.data.timeline,events:this.data.events,keepInteraction:!0})},beforeDestroy:function(){clearInterval(this.tick),this.micrioTour.destroy(),this.micrioTour=null,this.audio&&this.unhookAudio(),this.dEnd(),this.pEnd()},watch:{data:{handler:function(){this.micrioTour&&(isNaN(Number(this.data.duration))||(this.micrioTour.duration=Number(this.data.duration),this.micrioTour.reset()))},deep:!0},sActive:function(t){this.$root.editor.activeRect=t?t.id:null},"$root.editor.activeRect":function(){var t=this;this.sActive=this.data.timeline.find((function(e){return e.id==t.$root.editor.activeRect}))}},methods:{getTime:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=Math.floor(t%60),r=Math.floor(t/60);return r+":"+("0"+i).slice(-2)+(e?(Math.round(t%1*1e3)/1e3).toString().slice(1):"")},toggleTourStart:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e=this.$root.editor.currentMarkerEditor||this.$root.editor.currentVideoTourEditor,this.audio=e&&e.audio,this.$root.editor.currentMarkerEditor&&this.$root.editor.currentMarkerEditor.marker&&(this.data.audio=this.$root.editor.currentMarkerEditor.marker.audio),!this.data.audio){t.next=13;break}if(this.hookAudio(),!this.paused){t.next=10;break}return t.next=8,this.audio.play();case 8:t.next=11;break;case 10:this.audio.pause();case 11:t.next=15;break;case 13:this.unhookAudio(),this.paused?this.micrioTour.play():this.micrioTour.pause();case 15:clearInterval(this.tick),this.paused&&(this.tick=setInterval(this.tourTick,250)),this.paused=this.data.audio?this.audio.paused:this.micrioTour.paused;case 18:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),hookAudio:function(){var t=this;this.data.audio.fileUrl&&this.data.audio.fileUrl!=this.audio.src&&(this.audio.src=this.data.audio.fileUrl,this.audio.onpause=function(){return t.micrioTour.pause()},this.audio.onplay=function(){t.micrioTour.currentTime=t.audio.currentTime,t.micrioTour.play()},this.audio.onseeked=function(){t.micrioTour.currentTime=t.audio.currentTime})},unhookAudio:function(){this.$root.editor&&this.$root.editor.currentMarkerEditor&&delete this.data.audio,this.audio.onpaused=null,this.audio.onseeked=null,delete this.audio.src},tourTick:function(){this.timePerc=100*this.micrioTour.progress,this.micrioTour.ended&&clearInterval(this.tick)},sort:function(){this.data.timeline.sort((function(t,e){return t.starte.start?1:0}))},addSegment:function(){var t=this,e=this.timePerc/100,i=.05,r=e;0==e&&this.data.timeline.length&&(r=this.data.timeline[this.data.timeline.length-1].end);for(var n=-1;n=e.end)&&(e=r))}return e&&e.end||0},getRight:function(t){for(var e=null,i=0;i=t.end&&(!e||r.end<=e.end)&&(e=r))}return e&&e.start||1},isInside:function(t,e){for(var i=0;i=r.end),a=!(e<=r.start||e>=r.end);if(n||a||t<=r.start&&e>=r.end)return!0}}return!1},dStart:function(t,e){if(1==t.which&&this.sActive==e){this.sDragging=!0;var i=t.target.getBoundingClientRect(),r=t.clientX-i.left;this.resizingLeft=r<0,this.resizingRight=!this.resizingLeft&&r>t.target.offsetWidth,this.sStartLeft=t.clientX,this.sActive=e,this.sOrig=JSON.parse(JSON.stringify(this.sActive)),this.moved=!1,addEventListener("mousemove",this.dMove),addEventListener("mouseup",this.dEnd)}},dMove:function(t){var e=(t.clientX-this.sStartLeft)/this.$refs.track.offsetWidth,i=this.sOrig.end-this.sOrig.start,r=this.getLeft(this.sOrig),n=this.getRight(this.sOrig),a=2/this.$refs.track.offsetWidth;if(this.moved=!0,this.resizingLeft)this.sActive.start=Math.max(r,Math.min(this.sOrig.end-a,this.sOrig.start+e));else if(this.resizingRight)this.sActive.end=Math.min(n,Math.max(this.sOrig.start+a,this.sOrig.end+e));else{var s=Math.max(0,this.sOrig.start+e),o=s+i;o>1&&(s=1-i,o=1),this.isInside(s,o)||(this.sActive.start=s,this.sActive.end=o,this.sort())}},dEnd:function(){removeEventListener("mousemove",this.dMove),removeEventListener("mouseup",this.dEnd),this.sOrig=null,this.sort()},pStart:function(t){1==t.which&&(addEventListener("mousemove",this.setProgress),addEventListener("mouseup",this.pEnd),this.setProgress(t),this.tDragging=!0)},setProgress:function(t){var e=this.$refs.track.getBoundingClientRect(),i=(t.clientX-e.left)/e.width;this.micrioTour&&(this.micrioTour.progress=i),this.audio&&this.audio.src&&(this.audio.currentTime=i*this.audio.duration),this.tourTick()},pEnd:function(){this.tDragging=!0,removeEventListener("mousemove",this.setProgress),removeEventListener("mouseup",this.pEnd)}}}),wi=bi,_i=(i("426b"),Object(V["a"])(wi,fi,vi,!1,null,null,null)),ki=_i.exports,yi=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.$root.editor.showSettings?i("div",{attrs:{id:"image-settings"}},[i("md-dialog-title",[t._v("Image Settings")]),t.showColorSelect?i("ColorPicker",{attrs:{value:t.settings.backgroundColor},on:{input:function(e){return t.settings.backgroundColor=e},close:function(e){t.showColorSelect=!1}}}):t._e(),i("md-tabs",[i("md-tab",{staticClass:"tab-content",attrs:{"md-label":"Content"}},[i("md-content",[i("h3",[t._v("Image title")]),i("md-field",[i("md-input",{attrs:{disabled:t.loading,placeholder:"Image title"},model:{value:t.title,callback:function(e){t.title=e},expression:"title"}})],1)],1),i("md-content",{staticClass:"lang-select"},[i("h3",[t._v("Current data language")]),t.isDemo?i("i",[t._v("Demo projects are not multilingual")]):i("div",t._l(t.store.state.langs,(function(e,r){return i("md-button",{key:r,class:t.$route.params.lang==r?"set-lang md-primary md-accent md-raised":"set-lang md-raised",attrs:{value:r,title:e,disabled:t.$route.params.lang==r},on:{click:function(){return t.setLang(r)}}},[t._v(t._s(r))])})),1)]),i("md-content",[i("h3",[t._v("Language-specific content")]),i("md-field",[i("label",[t._v("Image description")]),i("md-textarea",{attrs:{disabled:t.loading},on:{input:t.setDescription},model:{value:t.meta.descriptionMarkdown,callback:function(e){t.$set(t.meta,"descriptionMarkdown",e)},expression:"meta.descriptionMarkdown"}}),i("span",{staticClass:"md-helper-text"},[i("a",{attrs:{href:"https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet",target:"_blank"}},[t._v("Markdown")]),t._v(" supported")])],1),i("md-field",[i("label",[t._v("Copyright")]),i("md-textarea",{attrs:{disabled:t.loading},model:{value:t.meta.copyright,callback:function(e){t.$set(t.meta,"copyright",e)},expression:"meta.copyright"}})],1),i("md-field",[i("label",[t._v("Search engine keywords")]),i("md-input",{attrs:{disabled:t.loading},model:{value:t.meta.keywords,callback:function(e){t.$set(t.meta,"keywords",e)},expression:"meta.keywords"}})],1),i("md-field",[i("label",[t._v("Original Source URL")]),i("md-input",{attrs:{disabled:t.loading},model:{value:t.meta.sourceUrl,callback:function(e){t.$set(t.meta,"sourceUrl",e)},expression:"meta.sourceUrl"}})],1),t.isDemo?t._e():i("md-list",[i("md-list-item",{on:{click:t.copyFromLang}},[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Duplicate language")]),i("span",[t._v("Copy data from another language")])]),i("md-button",{staticClass:"md-icon-button"},[i("md-icon",[t._v("file_copy")])],1)],1),i("md-list-item",{on:{click:t.copyFrom}},[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Duplicate data")]),i("span",[t._v("Copy data from another image")])]),i("md-button",{staticClass:"md-icon-button"},[i("md-icon",[t._v("file_copy")])],1)],1)],1)],1)],1),i("md-tab",{attrs:{"md-label":"Settings"}},[i("md-content",[i("h3",[t._v("Image display")]),i("md-list",{staticClass:"md-double-line"},[i("md-list-item",{on:{click:t.toggleStartView}},[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Set start view")]),i("span",[t._v("Set the image opening view area")])]),i("md-button",{staticClass:"md-icon-button"},[i("md-icon",[t._v("crop_free")])],1)],1),t.$root.editor.svIsFull?t._e():i("md-list-item",{on:{click:t.resetStartView}},[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Reset start view")])])]),t.is360?t._e():i("md-list-item",{on:{click:t.toggleFocusPoint}},[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Set focal point")]),i("span",[t._v("When image is cut off, focus here")])]),i("md-button",{staticClass:"md-icon-button"},[i("md-icon",[t._v("filter_center_focus")])],1)],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Always fill the screen")]),i("span",[t._v("Limit the view to the image boundaries")])]),i("md-switch",{attrs:{disabled:t.loading},model:{value:t.settings.limitToCoverScale,callback:function(e){t.$set(t.settings,"limitToCoverScale",e)},expression:"settings.limitToCoverScale"}})],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Maximum zoom level")]),i("span",[t._v("1 = 100%")])]),i("div",{staticClass:"md-icon-button md-number"},[i("md-field",[i("md-input",{attrs:{disabled:t.loading,min:"0",step:"0.1",type:"number"},model:{value:t.settings.zoomLimit,callback:function(e){t.$set(t.settings,"zoomLimit",e)},expression:"settings.zoomLimit"}})],1)],1)]),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Adjust max zoom to high DPI screens")]),i("span",[t._v("High DPI screens can zoom in as far as regular displays")])]),i("md-switch",{attrs:{disabled:t.loading},model:{value:t.settings.zoomLimitDPRFix,callback:function(e){t.$set(t.settings,"zoomLimitDPRFix",e)},expression:"settings.zoomLimitDPRFix"}})],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Viewer background color")]),i("span",[t._v("Set the main background color")])]),i("md-button",{staticClass:"md-avatar md-colorpicker",style:"background-color: "+t.settings.backgroundColor+";",on:{click:function(e){t.showColorSelect=!t.showColorSelect}}})],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Show title and description")]),i("span",[t._v("Show info within image window")])]),i("md-switch",{attrs:{disabled:t.loading},model:{value:t.settings.showInfo,callback:function(e){t.$set(t.settings,"showInfo",e)},expression:"settings.showInfo"}})],1)],1)],1),i("md-content",[i("h3",[t._v("Controls")]),i("md-list",{staticClass:"md-double-line"},[i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Enable navigation")]),i("span",[t._v("User panning and zooming")])]),i("md-switch",{attrs:{disabled:t.loading},model:{value:t.settings.hookEvents,callback:function(e){t.$set(t.settings,"hookEvents",e)},expression:"settings.hookEvents"}})],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Fullscreen button")]),i("span",[t._v("Show a fullscreen toggle button")])]),i("md-switch",{attrs:{disabled:t.loading},model:{value:t.settings.fullscreen,callback:function(e){t.$set(t.settings,"fullscreen",e)},expression:"settings.fullscreen"}})],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Show the minimap")]),i("span",[t._v("Display a small overview map with navigation")])]),i("md-switch",{attrs:{disabled:t.loading},model:{value:t.settings.minimap,callback:function(e){t.$set(t.settings,"minimap",e)},expression:"settings.minimap"}})],1),t.settings.minimap?i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Don't hide the minimap")]),i("span",[t._v("Keep showing the minimap when the user is fully zoomed out")])]),i("md-switch",{attrs:{disabled:t.loading},model:{value:t.settings.alwaysShowMinimap,callback:function(e){t.$set(t.settings,"alwaysShowMinimap",e)},expression:"settings.alwaysShowMinimap"}})],1):t._e(),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Show social sharing buttons")]),i("span",[t._v("Twitter & facebook buttons")])]),i("md-switch",{attrs:{disabled:t.loading},model:{value:t.settings.social,callback:function(e){t.$set(t.settings,"social",e)},expression:"settings.social"}})],1)],1)],1),t.$root.editor.imageVersion>=4.2?i("md-content",[i("h3",[t._v("UI")]),i("md-list",{staticClass:"md-double-line"},[i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Color theme")]),i("span",[t._v("The UI color scheme")])]),i("select",{directives:[{name:"model",rawName:"v-model",value:t.settings.theme,expression:"settings.theme"}],on:{change:function(e){var i=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.$set(t.settings,"theme",e.target.multiple?i:i[0])}}},[i("option",{attrs:{value:"dark"}},[t._v("Dark")]),i("option",{attrs:{value:"light"}},[t._v("Light")]),i("option",{attrs:{value:"os"}},[t._v("OS")])])])],1)],1):t._e()],1),i("md-tab",{attrs:{"md-label":"Advanced"}},[i("md-content",[i("h3",[t._v("360° image")]),i("div",{staticClass:"md-helper-text"},[t._v("For 360° images")]),i("md-list",{staticClass:"md-double-line"},[i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Image is 360°")]),i("span",[t._v("This image will be shown as a 360° image")])]),i("md-switch",{attrs:{disabled:t.loading},model:{value:t.is360,callback:function(e){t.is360=e},expression:"is360"}})],1),t.is360?[i("md-list-item",{on:{click:t.toggleFocusPoint}},[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Set orientation center")]),i("span",[t._v("Set the "),i("b",[t._v("forward")]),t._v(" X-coordinate")])])]),t.is360?i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Fill 360 screen")]),i("span",[t._v("Stretch the image vertically to fill the sphere")])]),i("md-switch",{attrs:{disabled:t.loading||!t.is360},model:{value:t.settings._360.closeTop,callback:function(e){t.$set(t.settings._360,"closeTop",e)},expression:"settings._360.closeTop"}})],1):t._e()]:t._e()],2)],1),t.hasVideo&&t.is360?i("md-content",[i("h3",[t._v("360° video")]),i("div",{staticClass:"md-helper-text"},[t._v("Full 360° sphere video")]),i("md-list",{staticClass:"md-double-line"},[i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("360° Video")]),t.settings._360.video.video?i("a",{attrs:{target:"_blank",href:t.settings._360.video.video.fileUrl}},[t._v(t._s(t.settings._360.video.video.fileName)+", "+t._s(t.$root.getDuration(t.settings._360.video.video.duration))+", "+t._s(t.$root.getFileSize(t.settings._360.video.video.fileSize)))]):i("span",[t._v("Upload an mp4 360° video")])]),i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:t.toggle360Video}},[t.settings._360.video.video?i("md-icon",[t._v("delete")]):i("md-icon",[t._v("add")])],1)],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Mute 360° video")]),i("span",[t._v("This allows for autoplaying video")])]),i("md-switch",{attrs:{disabled:t.loading},model:{value:t.settings._360.video.muted,callback:function(e){t.$set(t.settings._360.video,"muted",e)},expression:"settings._360.video.muted"}})],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Loop 360° video")]),i("span",[t._v("Loop the video")])]),i("md-switch",{attrs:{disabled:t.loading},model:{value:t.settings._360.video.loop,callback:function(e){t.$set(t.settings._360.video,"loop",e)},expression:"settings._360.video.loop"}})],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Show video controls")]),i("span",[t._v("Show a video control bar to pause/timeskip")])]),i("md-switch",{attrs:{disabled:t.loading},model:{value:t.settings._360.video.controls,callback:function(e){t.$set(t.settings._360.video,"controls",e)},expression:"settings._360.video.controls"}})],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Preview")]),i("span",[t._v("Show preview image while video is loading")])]),i("md-switch",{attrs:{disabled:t.loading},model:{value:t.settings._360.video.preview,callback:function(e){t.$set(t.settings._360.video,"preview",e)},expression:"settings._360.video.preview"}})],1)],1)],1):t._e(),t.store.state.organisation&&t.store.state.organisation.hasSplitScreen?[i("md-content",[i("h3",[t._v("Split screen")]),i("md-list",{staticClass:"md-double-line"},[i("md-list-item",[t.micrioSplitLink?i("md-avatar",[i("img",{attrs:{src:t.$root.editor.thumbSrcIIIF(t.micrioSplitLink)}})]):t._e(),i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Splitscreen linked image")]),t.micrioSplitLink?i("span",[t._v("Image ID: "+t._s(t.micrioSplitLink))]):i("span",[t._v("Set a split-screen secondary image")])]),i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:function(e){return t.toggleSplitLink(e)}}},[t.micrioSplitLink?i("md-icon",[t._v("delete")]):i("md-icon",[t._v("add")])],1)],1),t.micrioSplitLink?[i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("User navigation")]),i("span",[t._v("Allow user navigation in this image")])]),i("md-switch",{model:{value:t.settings.secondaryInteractive,callback:function(e){t.$set(t.settings,"secondaryInteractive",e)},expression:"settings.secondaryInteractive"}})],1),t.settings.secondaryInteractive?t._e():i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Independent camera")]),i("span",[t._v("Don't follow the main image's camera")])]),i("md-switch",{model:{value:t.settings.noFollow,callback:function(e){t.$set(t.settings,"noFollow",e)},expression:"settings.noFollow"}})],1)]:t._e()],2)],1)]:t._e(),i("md-content",[i("h3",[t._v("Custom "),t.store.getters.canUploadJSCSS?i("span",[t._v("JS & ")]):t._e(),t._v("CSS")]),i("div",{staticClass:"md-helper-text"},[t._v("Upload your own "),t.store.getters.canUploadJSCSS?i("span",[t._v("JS & ")]):t._e(),t._v("CSS here which will be bound to this image.")]),t.store.getters.canUploadJSCSS?i("md-list",{staticClass:"md-double-line"},[i("md-list-item",[t.settings.js?i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Custom Javascript")]),i("span",[t._v(t._s(t.settings.js.name)+", "+t._s(t.$root.timeAgo(t.settings.js.created)))])]):i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Upload a custom Javascript file")]),i("span",[t._v("This will always be included in the image")])]),t.settings.js?i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:t.jsRemove}},[i("md-icon",[t._v("delete")])],1):i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:t.jsAdd}},[i("md-icon",[t._v("add")])],1)],1)],1):t._e(),i("md-list",{staticClass:"md-double-line"},[i("md-list-item",[t.settings.css?i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Custom CSS")]),i("span",[i("a",{attrs:{href:t.settings.css.href,download:t.settings.css.name,target:"_blank"}},[t._v(t._s(t.settings.css.name))]),t._v(", "+t._s(t.$root.timeAgo(t.settings.css.created)))])]):i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Upload a custom CSS file")]),i("span",[t._v("This will always be included in the image")])]),t.settings.css?i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:t.cssRemove}},[i("md-icon",[t._v("delete")])],1):i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:t.cssAdd}},[i("md-icon",[t._v("add")])],1)],1)],1)],1),i("md-content",[i("h3",[t._v("Custom JSON")]),i("div",{staticClass:"md-helper-text"},[t._v("For custom implementations, set your own image JSON values here")]),i("JSONEditor",{attrs:{onChange:t.metaChanged,json:t.custom}}),i("div")],1)],2)],1),t.loading?i("md-progress-bar",{attrs:{"md-mode":"indeterminate"}}):t._e()],1):t._e()},xi=[],Si={components:{ColorPicker:Ye,JSONEditor:Ne["a"]},props:{meta:{type:Object,default:function(){return{description:"",copyright:"",keywords:""}}},image:{type:Object,default:function(){return{title:"",is360:!1,settings:{_360:{allowVR:!1,closeTop:!1},_meta:{},focus:[.5,.5],limitToCoverScale:!1,events:!0,fullscreen:!0,loaderbar:!0,zoomLimit:1,minimap:!0,musicVolume:1,mutedVolume:0,repeatX:!1,social:!0,mapLimit:[0,0,1,1],alwaysShowMinimap:!1,alwaysShowZoomControls:!1,micrioSplitLink:null,secondaryInteractive:!1,noFollow:!1,js:null,css:null}}}}},data:function(){return{store:T,loading:!1,title:"",is360:!1,showStartView:!1,showFocusPoint:!1,showMapLimit:!1,showColorSelect:!1,custom:{},micrioSplitLink:null}},watch:{"$root.editor.showSettings":function(){this.read(),this.showStartView=!1,this.showFocusPoint=!1,this.showMapLimit=!1,this.showColorSelect=!1}},mounted:function(){this.read(),this.$root.editor.imageSettings=this},computed:{settings:function(){return this.$root.editor.settings},isDemo:function(){return this.$root.editor.isDemo},hasVideo:function(){return T.state.organisation&&T.state.organisation.hasVideo}},methods:{setLang:function(t){this.$router.push(this.$route.path.replace(/.{2}$/,t))},copyFrom:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e,i,r,n=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$root.editor.getMicrio();case 2:if(e=t.sent,e){t.next=5;break}return t.abrupt("return");case 5:if(e.id!=this.$root.editor.image.id){t.next=8;break}return this.$root.main.setMessage("Cannot copy from myself..."),t.abrupt("return");case 8:return this.loading=!0,t.next=11,b.getImage(e.shortId);case 11:if(i=t.sent,i){t.next=15;break}return this.$root.main.setMessage("Could not find image with id ["+e.shortId+"]..."),t.abrupt("return");case 15:return this.$root.editor.settings=i.settings,t.next=18,b.getImageData(e.id,this.$root.editor.lang).catch((function(){return n.$root.main.setMessage("FAILED: Image has no data for this language!")}));case 18:if(r=t.sent,!r){t.next=24;break}return this.$root.editor.setData(r),t.next=23,this.$root.editor.save();case 23:this.$root.main.setMessage("Succesfully copied data");case 24:this.loading=!1,this.$root.editor.showSettings=!1;case 26:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),copyFromLang:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e,i=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$root.editor.getLangs();case 2:if(e=t.sent,e){t.next=5;break}return t.abrupt("return");case 5:this.$root.main.confirm("Do you want to copy this language?","This means your current language data will be overwritten.").then(Object(r["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return i.loading=!0,t.next=3,b.getImageData(i.image.id,e.culture).catch((function(){return i.$root.main.setMessage("FAILED: Image has no data for this language!")}));case 3:if(r=t.sent,!r){t.next=9;break}return i.$root.editor.setData(r),t.next=8,i.$root.editor.save();case 8:i.$root.main.setMessage("Succesfully copied data");case 9:i.loading=!1;case 10:case"end":return t.stop()}}),t)}))));case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),toggleStartView:function(){var t=this;this.showFocusPoint=!1,this.showMapLimit=!1,this.showStartView=!this.showStartView,this.showStartView&&n["default"].nextTick((function(){t.$root.editor.activeRect=t.$root.editor.$refs.viewRect.id}))},resetStartView:function(){this.showStartView=!1,this.$root.editor.activeRect=null,this.$root.editor.startView[0]=0,this.$root.editor.startView[1]=0,this.$root.editor.startView[2]=1,this.$root.editor.startView[3]=1,this.$root.editor.svChanged()},toggleFocusPoint:function(){this.showStartView=!1,this.showMapLimit=!1,this.showFocusPoint=!this.showFocusPoint},toggleMapLimit:function(){var t=this;this.showStartView=!1,this.showFocusPoint=!1,this.showMapLimit=!this.showMapLimit,this.showMapLimit&&n["default"].nextTick((function(){t.$root.editor.activeRect=t.$root.editor.$refs.mapLimitRect.id}))},metaChanged:function(t){this.settings._meta=t},read:function(){this.title=this.image.title,this.is360=this.image.is360,this.custom=this.settings._meta,this.micrioSplitLink=this.settings.micrioSplitLink},setDescription:function(){this.meta.description=ft()(this.meta.descriptionMarkdown)},toggle360Video:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!this.settings._360.video.video){t.next=4;break}this.settings._360.video.video=null,t.next=8;break;case 4:return t.next=6,this.$root.editor.getVideo();case 6:e=t.sent,e&&(this.settings._360.video.video=e);case 8:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),toggleSplitLink:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.stopPropagation(),e.preventDefault(),!this.micrioSplitLink){t.next=6;break}this.micrioSplitLink=null,t.next=9;break;case 6:return t.next=8,this.$root.editor.getExternalMarker(!0);case 8:this.micrioSplitLink=t.sent;case 9:this.settings.micrioSplitLink=this.micrioSplitLink;case 10:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),jsAdd:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$root.editor.getJS();case 2:e=t.sent,e&&(this.settings.js={created:e.created,name:e.fileName,href:e.fileUrl});case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),jsRemove:function(){this.settings.js=null},cssAdd:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$root.editor.getCSS();case 2:e=t.sent,e&&(this.settings.css={created:e.created,name:e.fileName,href:e.fileUrl});case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),cssRemove:function(){this.settings.css=null}}},Ii=Si,Ci=(i("f9ca"),Object(V["a"])(Ii,yi,xi,!1,null,null,null)),$i=Ci.exports,ji=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("md-dialog",{attrs:{id:"asset-picker","md-active":t.$root.editor.showAssetPicker},on:{"update:mdActive":function(e){return t.$set(t.$root.editor,"showAssetPicker",e)},"update:md-active":function(e){return t.$set(t.$root.editor,"showAssetPicker",e)}}},[i("input",{ref:"file",staticClass:"select-file",attrs:{type:"file"},on:{change:t.fileSelected}}),i("md-dialog-title",[t._v(t._s(t.uploading?"Uploading":"Select")+" "+t._s(t.type))]),"micrio"==t.type?i("md-content",{staticClass:"micrio-search"},[i("md-field",[i("label",{attrs:{for:"micrioSearchType"}},[t._v("Show images from...")]),i("md-select",{attrs:{id:"micrioSearchType"},model:{value:t.micrioSearchType,callback:function(e){t.micrioSearchType=e},expression:"micrioSearchType"}},[i("md-option",{attrs:{value:"folder"}},[t._v("This image's folder")]),i("md-option",{attrs:{value:"project"}},[t._v("This image's project")])],1)],1),i("md-field",[i("label",{attrs:{for:"micrioSearchQuery"}},[t._v("Title search...")]),i("md-input",{attrs:{for:"micrioSearchQuery"},model:{value:t.micrioSearchQuery,callback:function(e){t.micrioSearchQuery=e},expression:"micrioSearchQuery"}})],1)],1):t._e(),t.simpleMode?t._e():i("md-content",{staticClass:"asset-list"},[t.loading||t.itemsPaginated.length||t.items.length?t._e():i("md-empty-state",{attrs:{"md-icon":"audio"==t.type?"volume_up":"image","md-label":t.micrioSearchQuery?"No search results":"No files yet"}}),i("md-list",{staticClass:"md-double-line"},[t._l(t.itemsPaginated,(function(e){return i("md-list-item",{key:e.id,class:t.selected==e.id?"selected":"",attrs:{disabled:t.loading},on:{click:function(i){return t.select(e.id,i)}}},["marker"==t.type?i("md-avatar",[i("img",{staticClass:"marker-thumb",attrs:{src:t.getMarkerThumbSrc(e)}})]):"language"!=t.type&&"subtitle"!=t.type?i("md-avatar",["image"==t.type?i("img",{attrs:{src:t.$root.editor.getThumb(e.fileUrl)}}):"micrio"==t.type?i("img",{attrs:{src:t.$root.editor.thumbSrc(e.originalShortId||e.shortId,e.width,e.height,e.tileSize,e.isPng,e.isWebP,e.mapType)}}):"audio"==t.type?i("md-button",{staticClass:"md-icon-button",on:{click:function(i){return t.playPause(e.fileUrl)}}},[t.audioPlaying&&t.audio.src==e.fileUrl?i("md-icon",{staticClass:"play-pause"},[t._v("pause")]):i("md-icon",{staticClass:"play-pause"},[t._v("play_arrow")])],1):"video"==t.type?i("md-icon",[t._v("videocam")]):t._e()],1):t._e(),"marker"==t.type?i("div",{staticClass:"md-list-item-text"},[i("span",[t._v(t._s(e.title||"(no title)"))]),i("span",[t._v("id: "+t._s(e.id))]),i("span",[t._v("x: "+t._s(e.x)+", y: "+t._s(e.y))])]):"language"==t.type?i("div",{staticClass:"md-list-item-text"},[i("span",[t._v(t._s(t.store.state.langs[e.culture]))]),i("span",[t._v(t._s(e.lastPublished))])]):"subtitle"==t.type?i("div",{staticClass:"md-list-item-text"},[i("span",[t._v(t._s(e.title))]),i("span",{staticClass:"image-info"},[i("span",[t._v(t._s(t.$root.timeAgo(e.created)))]),i("span",[t._v(t._s(t.$root.getFileSize(e.fileSize)))])])]):"micrio"==t.type?i("div",{staticClass:"md-list-item-text"},[i("span",[t._v(t._s(e.title))]),i("span",[t._v(t._s(e.shortId+", "+(e.mapType?"map":e.width+" x "+e.height)))])]):i("div",{staticClass:"md-list-item-text"},[i("span",[t._v(t._s(e.title))]),i("span",{staticClass:"image-info"},[i("span",[t._v(t._s(t.$root.timeAgo(e.created)))]),"image"==t.type||"video"==t.type?i("span",[t._v(t._s(e.width)+" x "+t._s(e.height))]):t._e(),"audio"==t.type||"video"==t.type?i("span",[t._v(t._s(t.$root.getDuration(e.duration)))]):t._e(),"video"==t.type?i("span",[t._v(t._s(t.$root.getFileSize(e.fileSize)))]):t._e()])]),t.simpleMode||"audio"!=t.type?t._e():i("md-button",{staticClass:"md-icon-button md-list-action",attrs:{href:e.fileUrl,target:"_blank",title:"Direct link"}},[i("md-icon",[t._v("link")])],1),"marker"!=t.type&&"micrio"!=t.type&&"language"!=t.type?i("md-button",{staticClass:"md-icon-button md-list-action",attrs:{title:"Delete asset",disabled:t.loading},on:{click:function(i){return t.deleteAsset(e.id)}}},[i("md-icon",[t._v("delete")])],1):t._e()],1)})),t.items.length>0&&"language"!=t.type?i("md-button",{on:{click:t.nextPage}},[t._v("Load more")]):t._e()],2)],1),t.loading?i("md-progress-bar",{attrs:{"md-mode":t.uploading?"determinate":"indeterminate","md-value":t.uploadPerc}}):t._e(),t.simpleMode?t._e():i("md-toolbar",[i("md-button",{attrs:{title:"Cancel",disabled:t.loading},on:{click:t.cancel}},[i("md-icon",[t._v("cancel")])],1),"micrio"!=t.type&&"language"!=t.type?i("md-button",{staticClass:"md-primary",attrs:{title:"Create new",disabled:t.loading},on:{click:t.create}},[i("md-icon",[t._v("add")])],1):t._e(),i("md-button",{staticClass:"md-primary",attrs:{title:"Select",disabled:t.loading||!t.selected},on:{click:t.choose}},[i("md-icon",[t._v("check")])],1)],1)],1)},Pi=[],Oi=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=document.createElement("canvas"),s=a.getContext("2d"),o={};return new Promise(function(){var c=Object(r["a"])(regeneratorRuntime.mark((function r(c){var u,d;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,Ri(t);case 2:if(u=r.sent,!u.width){r.next=13;break}r.t0=regeneratorRuntime.keys(i);case 5:if((r.t1=r.t0()).done){r.next=12;break}return d=r.t1.value,r.next=9,Mi(JSON.parse(JSON.stringify(e)),a,s,u,i[d][0],i[d][1],i[d][2],n);case 9:o[d]=r.sent,r.next=5;break;case 12:c(o);case 13:case"end":return r.stop()}}),r)})));return function(t){return c.apply(this,arguments)}}())},Ri=function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,i){if(!e)return i("No file");var r=new Image;e instanceof Image&&(r.crossOrigin="anonymous"),r.onload=function(){return t(r)},r.onerror=i,r.src=e instanceof Image?e.src:URL.createObjectURL(e)})));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Mi=function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i,r,n,a,s){var o,c,u,d,l=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return o=l.length>6&&void 0!==l[6]&&l[6],c=l.length>7&&void 0!==l[7]?l[7]:"image/jpeg",u=l.length>8&&void 0!==l[8]?l[8]:.87,d=l.length>9&&void 0!==l[9]&&l[9],t.abrupt("return",new Promise((function(t){e&&e.data&&(e.data["fileName"]=e.objectId+"."+a+("image/png"==c?".png":".jpg"),e.data["mimeType"]=c,e.data["forceName"]=!0);var l=n.width/n.height,m=a,h=a/l;(!o&&h>s||o&&h0?t.$root.getDuration(e.duration):""))])]),i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:function(i){return t.removeSample(i,e.id)}}},[i("md-icon",[t._v("delete")])],1)],1)})),1):i("md-empty-state",{attrs:{"md-icon":"queue_music","md-label":"Add your background music below"}})],1),i("md-tab",{attrs:{"md-label":"Positional"},on:{click:function(e){t.showPositional=!0}}},[t.$root.editor.data.audio.locations.length?i("md-list",{staticClass:"md-double-line",attrs:{"md-expand-single":"expandSingle"}},t._l(t.$root.editor.data.audio.locations,(function(e){return i("md-list-item",{key:e.id,attrs:{id:"_"+e.id,"md-expand":"","md-expanded":t.$root.editor.activeRect==e.id},on:{click:function(i){return t.sampleSelect(e.id)}}},[i("md-avatar",[i("md-button",{staticClass:"md-icon-button",on:{click:function(i){return t.playPause(i,e.src)}}},[t.audioPlaying&&t.audio.src==e.src?i("md-icon",[t._v("pause")]):i("md-icon",[t._v("play_arrow")])],1)],1),i("div",{staticClass:"md-list-item-text"},[i("span",[t._v(t._s(e.fileName))]),i("span",[t._v(t._s(e.duration>0?t.$root.getDuration(e.duration):"")+", "+t._s(Math.round(100*e.volume))+"% volume")])]),i("md-list",{attrs:{slot:"md-expand"},slot:"md-expand"},[i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Pause between loops")]),i("span",[t._v("In seconds")])]),i("div",{staticClass:"md-icon-button md-number"},[i("md-field",[i("md-input",{attrs:{min:"0",step:"1",type:"number"},model:{value:e.repeatAfter,callback:function(i){t.$set(e,"repeatAfter",i)},expression:"sample.repeatAfter"}})],1)],1)]),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Don't play on mobile devices")])]),i("md-switch",{model:{value:e.noMobile,callback:function(i){t.$set(e,"noMobile",i)},expression:"sample.noMobile"}})],1),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Remove this sample")])]),i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:function(i){return t.removeSample(i,e.id)}}},[i("md-icon",[t._v("delete")])],1)],1)],1)],1)})),1):i("md-empty-state",{attrs:{"md-icon":"volume_up","md-label":"Add your first positional audio below"}})],1),i("md-tab",{attrs:{"md-label":"Settings"}},[i("md-list",{staticClass:"md-double-line"},[i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Background music volume")]),i("span",[t._v("1 = 100%")])]),i("div",{staticClass:"md-icon-button md-number"},[i("md-field",[i("md-input",{attrs:{min:"0",step:"0.01",type:"number"},model:{value:t.settings.musicVolume,callback:function(e){t.$set(t.settings,"musicVolume",e)},expression:"settings.musicVolume"}})],1)],1)]),i("md-list-item",[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Background fade out volume")]),i("span",[t._v("Fade to this when other audio is playing")])]),i("div",{staticClass:"md-icon-button md-number"},[i("md-field",[i("md-input",{attrs:{min:"0",step:"0.01",type:"number"},model:{value:t.settings.mutedVolume,callback:function(e){t.$set(t.settings,"mutedVolume",e)},expression:"settings.mutedVolume"}})],1)],1)])],1)],1)],1),i("md-toolbar",[i("md-button",{staticClass:"md-primary md-accent md-raised",attrs:{title:"add new"},on:{click:t.add}},[i("md-icon",[t._v("add")]),t._v(" Add audio")],1),i("md-button",{staticClass:"md-primary",attrs:{title:"save new"},on:{click:function(e){return t.$root.editor.setSection("none")}}},[i("md-icon",[t._v("check")]),t._v(" Save")],1)],1)],1):t._e()},Ui=[],Ni={data:function(){return{showPositional:!1,store:T,audioPlaying:!1,audio:new Audio}},watch:{"$root.editor.showAudio":function(){this.showPositional=!1,this.audio&&this.audio.pause()},showPositional:function(t){this.audio.pause(),this.$root.editor.showAudio&&(t?this.$root.editor.tutorial.show("positional-audio"):this.$root.editor.tutorial.show("audio"))}},mounted:function(){var t=this;this.audio.autoplay=!0,this.audio.addEventListener("play",(function(){return t.audioPlaying=!0})),this.audio.addEventListener("pause",(function(){return t.audioPlaying=!1})),this.audio.addEventListener("ended",(function(){return t.audioPlaying=!1}))},beforeDestroy:function(){this.audio.pause(),this.$root.editor&&(this.$root.editor.activeRect=null)},computed:{settings:function(){return this.$root.editor.settings}},methods:{sampleSelect:function(t){var e=this;setTimeout((function(){var i=e.$el.querySelector("#_"+t).firstChild.classList.contains("md-active");(e.$root.editor.activeRect=i?t:null)?e.$root.editor.tutorial.step("add-audio"):e.$root.editor.tutorial.show(null)}),50)},add:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e,i,r,n,a,s=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$root.editor.getAudio();case 2:if(e=t.sent,e){t.next=5;break}return t.abrupt("return");case 5:i=this.$root.createGuid(),r=this.$root.editor.$refs.micrio.camera.getCoo((innerWidth-360)/2,(innerHeight-48)/2),n=Number(this.$root.editor.$refs.micrio.getAttribute("width")),a=.2/r[2]*(innerWidth/n),this.showPositional?(this.$root.editor.data.audio.locations.push({id:i,fileName:e.title,src:e.fileUrl,duration:e.duration,loop:!0,isLocation:!0,volume:1,radius:a,x:r[0],y:r[1],noMobile:!1,repeatAfter:0}),this.$nextTick((function(){s.$root.editor.activeRect=i,s.$nextTick((function(){return s.sampleSelect(i)}))}))):(this.$root.editor.data.audio.playlist.items.push({id:i,src:e.fileUrl,fileName:e.title,duration:e.duration}),this.$root.editor.tutorial.step("add-music"));case 10:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),removeSample:function(t,e){var i=this;t.stopPropagation(),t.preventDefault(),this.$root.main.confirm("Do you want to delete this audio sample?").then(Object(r["a"])(regeneratorRuntime.mark((function t(){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:r=i.showPositional?i.$root.editor.data.audio.locations:i.$root.editor.data.audio.playlist.items,n=r.findIndex((function(t){return t.id==e})),n>=0&&r.splice(n,1);case 3:case"end":return t.stop()}}),t)})))).catch((function(){return null}))},playPause:function(t,e){t.stopPropagation(),t.preventDefault(),this.audio.src!=e?(this.audio.src=e,this.audioPlaying=!0):this.audio.paused?this.audio.play():this.audio.pause()}}},Vi=Ni,zi=Object(V["a"])(Vi,Li,Ui,!1,null,null,null),Fi=zi.exports,Ji=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("Rectangle",{ref:"rect",attrs:{id:t.sample.id,label:t.sample.fileName,className:"no-select",icon:"volume_up",ratio:1,slider:t.sample.volume,rounded:!0,boundless:!0,centered:!0,x:t.sample.x,y:t.sample.y,radius:t.sample.radius},on:{change:t.changed,active:t.activated}})},Bi=[],Gi={components:{Rectangle:xe},props:{sample:{type:Object,default:function(){return{x:.5,y:.5,radius:.1}}}},data:function(){return{micrioItem:null}},beforeDestroy:function(){this.activated(!1)},methods:{activated:function(t){},changed:function(){this.sample.radius=this.$refs.rect.mradius,this.sample.x=this.$refs.rect.mx,this.sample.y=this.$refs.rect.my;var t=this.$refs.rect.$refs.slider;t&&(this.sample.volume=Number(t.value)),this.micrioItem&&(this.micrioItem.read(this.sample),this.micrioItem.update())}}},Yi=Gi,Wi=Object(V["a"])(Yi,Ji,Bi,!1,null,null,null),qi=Wi.exports,Ki=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.$root.editor.showEmbeds?i("div",[i("md-dialog-title",[t._v("Micrio embeds")]),i("md-content",[t.$root.editor.data.children.length?i("md-list",{staticClass:"md-double-line"},t._l(t.$root.editor.data.children,(function(e){return i("md-list-item",{key:e.guid,class:[t.selected==e.guid&&"md-active"],on:{click:function(i){t.selected=t.selected==e.guid?null:e.guid}}},[i("md-avatar",[i("img",{attrs:{src:t.$root.editor.thumbSrc(e.tilesId||e.id,e.width,e.height,e.tileSize,e.isPng,e.isWebP)}})]),i("div",{staticClass:"md-list-item-text"},[i("span",[t._v(t._s(e.title))]),i("span",[t._v(t._s(e.width)+" x "+t._s(e.height))])]),i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:function(i){return t.remove(i,e.guid)}}},[i("md-icon",[t._v("delete")])],1)],1)})),1):i("md-empty-state",{attrs:{"md-icon":"image","md-label":"Create your embedded image below"}})],1),i("md-toolbar",[i("md-button",{staticClass:"md-primary",attrs:{title:"new embed"},on:{click:t.add}},[i("md-icon",[t._v("add")])],1)],1)],1):t._e()},Xi=[],Hi={data:function(){return{selected:null}},watch:{"$root.editor.activeRect":function(t){this.selected=t},selected:function(t){this.$root.editor.activeRect=t}},methods:{add:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e,i,r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.selected=null,t.next=3,this.$root.editor.getMicrio(!0);case 3:if(e=t.sent,e){t.next=6;break}return t.abrupt("return");case 6:i=this.$root.createGuid(),r=.4/(e.width/e.height),n={guid:i,id:e.shortId,title:e.title,width:e.width,height:e.height,tileSize:e.tileSize,isPng:e.isPng,area:[.4,.5-r/2,.6,.5+r/2]},e.originalShortId&&(n.tilesId=e.originalShortId),this.$root.editor.data.children.push(n),this.selected=i;case 12:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),remove:function(t,e){var i=this;t.stopPropagation(),t.preventDefault(),this.$root.main.confirm("Do you want to delete this embed?").then(Object(r["a"])(regeneratorRuntime.mark((function t(){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:r=i.$root.editor.data.children,n=r.findIndex((function(t){return t.guid==e})),n>=0&&(i.selected=null,r.splice(n,1));case 3:case"end":return t.stop()}}),t)})))).catch((function(){return null}))}}},Qi=Hi,Zi=Object(V["a"])(Qi,Ki,Xi,!1,null,null,null),tr=Zi.exports,er=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("Rectangle",{ref:"rect",attrs:{id:t.embed.guid,label:t.embed.title,area:t.embed.area,ratio:t.ratio,className:"embed"}})},ir=[],rr={components:{Rectangle:xe},props:{embed:{type:Object,default:function(){return{id:"",guid:"",title:"",area:[.4,.4,.6,.6],width:100,height:100}}}},mounted:function(){this.$refs.rect.$el.style.backgroundImage="url("+this.$root.editor.thumbSrc(this.embed.tilesId||this.embed.id,this.embed.width,this.embed.height,this.embed.tileSize,!!this.embed.isPng,!!this.embed.isWebP)+")"},computed:{ratio:function(){return this.embed.width/this.embed.height}}},nr=rr,ar=Object(V["a"])(nr,er,ir,!1,null,null,null),sr=ar.exports,or=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.$root.editor.showCustomPages?i("div",[i("md-dialog-title",[t._v("Custom Menus")]),i("md-content",[t.$root.editor.data.pages.length?i("md-list",{attrs:{"md-expand-single":""}},t._l(t.$root.editor.data.pages,(function(e,r){return i("md-list-item",{key:e.id,attrs:{"md-expand":""}},[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v(t._s(e.title)+" "+t._s(t.getNumPages(e)))])]),i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:function(i){return t.removeMenu(i,e.id)}}},[i("md-icon",[t._v("delete")])],1),r0?i("md-button",{staticClass:"md-icon-button md-list-action",attrs:{title:"Move up"},on:{click:function(e){return t.moveItem(e,r,-1)}}},[i("md-icon",[t._v("arrow_upward")])],1):t._e(),i("div",{attrs:{slot:"md-expand"},slot:"md-expand"},[e.isGroup?i("div",[i("md-list",[i("md-list-item",[i("md-field",[i("label",[t._v("Menu title")]),i("md-input",{model:{value:e.title,callback:function(i){t.$set(e,"title",i)},expression:"menu.title"}})],1)],1)],1),i("h3",[t._v("Pages in this menu")]),i("md-list",[t._l(e.children,(function(r,n){return i("md-list-item",{key:r.id,attrs:{"md-expand":""}},[i("div",{staticClass:"md-list-item-text"},[i("span",[t._v(t._s(r.title))])]),n0?i("md-button",{staticClass:"md-icon-button md-list-action",attrs:{title:"Move up"},on:{click:function(i){return t.moveItem(i,n,-1,e.children)}}},[i("md-icon",[t._v("arrow_upward")])],1):t._e(),i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:function(i){return t.removePage(i,r.id,e)}}},[i("md-icon",[t._v("delete")])],1),i("md-list",{staticClass:"md-double-line",attrs:{slot:"md-expand"},slot:"md-expand"},[i("md-list-item",[i("md-field",[i("label",[t._v("Page title")]),i("md-input",{model:{value:r.title,callback:function(e){t.$set(r,"title",e)},expression:"page.title"}})],1)],1),i("md-list-item",[i("md-field",[i("label",[t._v("External link")]),i("md-input",{attrs:{disabled:r.markerId},model:{value:r.link,callback:function(e){t.$set(r,"link",e)},expression:"page.link"}})],1)],1),i("md-list-item",[i("md-field",[i("label",[t._v("On click, open marker with ID..")]),i("md-input",{attrs:{disabled:r.link},model:{value:r.markerId,callback:function(e){t.$set(r,"markerId",e)},expression:"page.markerId"}})],1)],1),i("md-list-item",[i("md-field",[i("label",[t._v("Page content")]),i("md-textarea",{staticClass:"description",attrs:{disabled:t.isLink(r)},on:{input:function(e){return t.setContent(r)}},model:{value:r.markdown,callback:function(e){t.$set(r,"markdown",e)},expression:"page.markdown"}}),i("span",{staticClass:"md-helper-text"},[i("a",{attrs:{href:"https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet",target:"_blank"}},[t._v("Markdown")]),t._v(" supported")])],1)],1),i("md-list-item",[i("md-field",[i("label",[t._v("Embed URL")]),i("md-input",{attrs:{disabled:t.isLink(r)},model:{value:r.embed,callback:function(e){t.$set(r,"embed",e)},expression:"page.embed"}})],1)],1),i("md-list-item",[r.image?i("md-avatar",[i("img",{attrs:{src:t.$root.editor.getThumb(r.image)}})]):t._e(),i("div",{staticClass:"md-list-item-text"},[i("span",[t._v("Page image")]),i("span",[t._v("Set an image for this page")])]),i("md-button",{staticClass:"md-icon-button md-list-action",on:{click:function(e){return t.togglePageIcon(e,r)}}},[r.image?i("md-icon",[t._v("delete")]):i("md-icon",[t._v("add")])],1)],1)],1)],1)})),i("md-button",{on:{click:function(i){return t.addPage(e)}}},[t._v("Add new page")])],2)],1):t._e()])],1)})),1):i("md-empty-state",{attrs:{"md-icon":"list","md-label":"Create your first custom menu below"}})],1),i("md-toolbar",[i("md-button",{staticClass:"md-primary md-accent md-raised",attrs:{title:"add new page"},on:{click:t.addMenu}},[i("md-icon",[t._v("add")]),t._v(" Add a menu")],1)],1)],1):t._e()},cr=[],ur=(i("b54a"),{data:function(){return{store:T}},methods:{getNumPages:function(t){return t.children&&t.children.length?"(".concat(t.children.length," page").concat(1!=t.children.length?"s":"",")"):""},setContent:function(t){t.content=ft()(t.markdown)},isLink:function(t){return!(!t.link&&!t.markerId)},addMenu:function(){this.$root.editor.data.pages.push({id:this.$root.createGuid(),title:"New menu",children:[],isGroup:!0})},addPage:function(t){t.children.push({id:this.$root.createGuid(),title:"New page",content:"",markdown:"",link:null,markerId:null,image:null,children:[],data:{}})},removeMenu:function(t,e){var i=this;t.stopPropagation(),t.preventDefault(),this.$root.main.confirm("Do you want to remove this menu?","Any underlying pages will be removed as well!").then(Object(r["a"])(regeneratorRuntime.mark((function t(){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:r=i.$root.editor.data.pages,n=r.findIndex((function(t){return t.id==e})),n>=0&&r.splice(n,1);case 3:case"end":return t.stop()}}),t)})))).catch((function(){return null}))},removePage:function(t,e,i){t.stopPropagation(),t.preventDefault(),this.$root.main.confirm("Do you want to remove this page?").then(Object(r["a"])(regeneratorRuntime.mark((function t(){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:r=i.children,n=r.findIndex((function(t){return t.id==e})),n>=0&&r.splice(n,1);case 3:case"end":return t.stop()}}),t)})))).catch((function(){return null}))},moveItem:function(t,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.$root.editor.data.pages;t.stopPropagation(),t.preventDefault();var n=r.splice(e,1);r.splice(e+i,0,n[0])},togglePageIcon:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!i.image){t.next=4;break}i.image=null,t.next=8;break;case 4:return t.next=6,this.$root.editor.getImage();case 6:r=t.sent,r&&(i.image=r.fileUrl);case 8:case"end":return t.stop()}}),t,this)})));function e(e,i){return t.apply(this,arguments)}return e}()}}),dr=ur,lr=Object(V["a"])(dr,or,cr,!1,null,null,null),mr=lr.exports,hr=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("span")},pr=[],gr={mounted:function(){addEventListener("keydown",this.keyPress)},beforeDestroy:function(){removeEventListener("keydown",this.keyPress)},methods:{keyPress:function(t){switch(t.key.toUpperCase()){case"P":t.ctrlKey&&(t.preventDefault(),this.$parent.doPublish());break}}}},fr=gr,vr=Object(V["a"])(fr,hr,pr,!1,null,null,null),br=vr.exports,wr=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"tutorial"}},[i("transition",{attrs:{mode:"out-in"}},[t.visible?i("md-card",{key:t.currentID,class:t.position},[i("md-card-header",[i("div",{staticClass:"md-title",domProps:{innerHTML:t._s(t.title)}})]),i("md-card-actions",[i("md-button",{staticClass:"md-icon-button",on:{click:t.close}},[i("md-icon",[t._v("clear")])],1)],1),i("md-card-content",{domProps:{innerHTML:t._s(t.content)}}),i("div",{staticClass:"tutorial-arrow"})],1):t._e()],1)],1)},_r=[],kr=(i("6762"),i("2fdb"),{data:function(){return{active:!1,tutorial:null,currentID:null,dialog:null,store:T}},created:function(){this.$root.editor.tutorial=this},computed:{visible:function(){return this.active&&null!=this.currentDialog},currentDialog:function(){var t=this;return null==this.dialog?null:this.dialog.find((function(e){return e.id===t.currentID}))},title:function(){return this.currentDialog.title},content:function(){return this.currentDialog.content},position:function(){return this.currentDialog.position}},methods:{finish:function(){this.store.state.finishedTutorials.push(this.tutorial),this.active=!1},close:function(){var t=this;this.finish(),this.$root.main.confirm("Disable hints","Do you want to disable all hints? You can always re-enable them in your account settings.").then((function(){t.store.state.showTutorials=!1,localStorage.setItem("editor_showTutorials","0"),b.action(102,null,!1)}))},step:function(t){var e=this;if(this.currentID!==t||null==this.dialog)return!1;var i=this.dialog.findIndex((function(t){return t.id===e.currentID}));null!=this.dialog[i].skip&&(i+=this.dialog[i].skip),i++,i0?"select-marker":"add-marker",this.dialog=[{id:"add-marker",title:"Add Marker",content:'Click add to add a marker',position:"tutorial-drawer-bottom"},{id:"place-marker",title:"Place Marker",content:"Click anywhere on the image to place a marker",position:"tutorial-image",skip:1},{id:"select-marker",title:"Select Marker",content:"Select a marker to edit its settings",position:"tutorial-image"},{id:"set-title",title:"Set Title",content:"Choose a title for this marker",position:"tutorial-drawer-center"},{id:"set-description",title:"Set Description",content:"Set a description for this marker",position:"tutorial-drawer-center"},{id:"save",title:"Save Changes",content:'Click check to save changes to this marker',position:"tutorial-drawer-bottom"}];break;case"markers-tours":this.active=null==this.$root.editor.previous.markerTours.find((function(t){return t.steps.length>0})),this.$root.editor.data.markers.length>0?this.currentID=this.$root.editor.data.markerTours.length>0?"select-tour":"add-tour":this.currentID="add-markers",this.dialog=[{id:"add-markers",title:"First add Markers",content:"Add some markers before making a marker tour",position:"tutorial-drawer-top"},{id:"add-tour",title:"Add Tour",content:'Click add to add a tour',position:"tutorial-drawer-bottom"},{id:"select-tour",title:"Select Tour",content:"Click a tour to edit its settings",position:"tutorial-drawer-center"},{id:"set-title",title:"Set Title",content:"Choose a title for this tour",position:"tutorial-drawer-center"},{id:"select-markers",title:"Select Markers",content:"Click markers to add them to the tour",position:"tutorial-image"}];break;case"audio":this.active=0==this.$root.editor.previous.audio.playlist.items.length,this.currentID=0==this.$root.editor.data.audio.playlist.items.length?"add-music":"save",this.dialog=[{id:"add-music",title:"Add Music",content:'Click add to add background music/audio',position:"tutorial-drawer-bottom"}];break;case"positional-audio":this.active=0==this.$root.editor.previous.audio.locations.length,this.currentID=0==this.$root.editor.data.audio.locations.length?"add-audio":"save",this.dialog=[{id:"add-audio",title:"Add Audio",content:'Click add to add positional audio',position:"tutorial-drawer-bottom"},{id:"position-audio",title:"Positional Audio",content:'Drag the audio source around and use aspect_ratio to set its scale',position:"tutorial-image"}];break;case"publish":this.active=!0,this.currentID="publish",this.dialog=[{id:"publish",title:"Publish",content:'Click on publish to make your changes publicly available',position:"tutorial-publish"}],setTimeout((function(){return e.dialog=null}),5e3);break;default:this.active=!1,this.currentID=null,this.dialog=null;break}}}}),yr=kr,xr=(i("bbb5"),Object(V["a"])(yr,wr,_r,!1,null,null,null)),Sr=xr.exports,Ir={description:"",descriptionMarkdown:"",markers:[],markerTours:[],tours:[],audio:{playlist:{items:[]},locations:[]},children:[],pages:[]},Cr={components:{Rectangle:xe,Focus:Oe,MMarker:Ee,MarkerEditor:ii,Tours:gi,VideoTour:ki,ImageSettings:$i,AudioEditor:Fi,AssetPicker:Ei,AudioLocation:qi,EmbedEditor:tr,MEmbed:sr,CustomPages:mr,KeyboardControls:br,Tutorial:Sr},data:function(){return{store:T,isDevEnv:O,loaded:!1,image:null,imageId:null,menu:null,lang:this.$route.params.lang,data:Ir,settings:{},previousSettings:{},previous:{},saving:!1,drawerOpen:!1,startView:[0,0,1,1],svIsFull:!1,activeRect:null,activeTour:null,showAssetPicker:!1,no360Picker:!1,mapsPicker:!0,assetPickerType:null,currentVideoTour:null,currentMarkerTour:null,pickerMarkerMicrioId:null,isDemo:!1,imageData:{},activeSection:null,savingData:!1,savingSettings:!1}},computed:{showSidebar:{get:function(){return this.showSettings||this.showMarkers||this.showTours||this.showAudio||this.showEmbeds||this.showCustomPages},set:function(){this.activeSection="none"}},showSettings:{get:function(){return"settings"==this.activeSection},set:function(){this.activeSection="none"}},showMarkers:{get:function(){return"markers"==this.activeSection},set:function(){this.activeSection="none"}},showTours:{get:function(){return"tours"==this.activeSection},set:function(){this.activeSection="none"}},showAudio:{get:function(){return"audio"==this.activeSection},set:function(){this.activeSection="none"}},showEmbeds:{get:function(){return"embeds"==this.activeSection},set:function(){this.activeSection="none"}},showCustomPages:{get:function(){return"customPages"==this.activeSection},set:function(){this.activeSection="none"}},showPositional:function(){return this.showAudio&&this.$refs.audio.showPositional},canEmbed:function(){return T.state.organisation&&T.state.organisation.hasEmbeds&&0==this.image.mapType&&!this.image.is360},baseUrl:function(){return"https:"+(window.__baseUrl||T.state.baseUrl)},imageVersion:function(){return Number(this.image.version)}},watch:{showSidebar:function(t){this.drawerOpen=t},"$route.params.id":function(){this.$route.params.id&&this.$route.params.id!=this.imageId&&this.init()},"$route.params.lang":function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(T.getters.currentCulture==e){t.next=4;break}return t.next=3,b.setDefaultLang(e);case 3:T.state.user.defaultCulture=e;case 4:return t.next=6,this.save();case 6:this.lang=e,this.load();case 8:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),activeSection:function(t){b.action(100,this.$route.params.id,t)}},mounted:function(){this.init()},beforeDestroy:function(){this.remove(),this.$root.editor=null,T.state.editing=!1},methods:{init:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e,i,a=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.image&&this.remove(),e=this.$root.main.home.$refs.toolbar,window._importMarkers=this.importMarkers,T.state.editing=!0,this.$root.editor=this,this.imageId=this.$route.params.id,t.next=8,b.getImage(this.$route.params.id);case 8:this.image=t.sent,this.image.startView&&(this.startView=this.image.startView.split(",").map((function(t){return Number(t)}))),this.isDemo=P.indexOf(this.image.shortId)>=0||P.indexOf(this.image.originalShortId)>=0,b.action(40,this.$route.params.id),window._micrioEditor=this,i=JSON.stringify(this.image.settings),this.previousSettings=JSON.parse(i),this.settings=this.image.settings,this.migrateSettings(this.image.settings),n["default"].nextTick(Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,a.load();case 2:a.loaded=!0,T.state.loaded=!0,e.$refs.editMenu.appendChild(a.$refs.editMenu.$el),e.$refs.editIcons.appendChild(a.$refs.toolbarIcons.$el);case 6:case"end":return t.stop()}}),t)}))));case 18:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),remove:function(){this.image=null,this.$refs.editMenu&&(this.$refs.editMenu.$el.parentNode.removeChild(this.$refs.editMenu.$el),this.$refs.toolbarIcons.$el.parentNode.removeChild(this.$refs.toolbarIcons.$el)),this.websocket.close(),window._micrioEditor=void 0},load:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,b.getImageData(this.image.id,this.isDemo?"en":this.lang).catch((function(){}));case 2:e=t.sent,this.svChanged(),this.websocket&&this.websocket.close(),this.websocket=new ve(this.image.id,this.lang,this.dataUpdated),e||(e=JSON.parse(JSON.stringify(Ir))),this.setData(e),this.previous=JSON.parse(JSON.stringify(e)),this.save(!0);case 10:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),svChanged:function(){this.svIsFull="0,0,1,1"==this.startView.toString()},dataUpdated:function(t,e){switch(t){case 1:var i=this.data,r=JSON.stringify(e);if(r==JSON.stringify(this.previous))return;this.updateMarkers(e.markers),this.previous=JSON.parse(r),this.clearData(),this.$nextTick((function(){e.markerTours.forEach((function(t){return i.markerTours.push(t)})),e.tours.forEach((function(t){return i.tours.push(t)})),e.audio.locations.forEach((function(t){return i.audio.locations.push(t)})),e.audio.playlist.items.forEach((function(t){return i.audio.playlist.items.push(t)})),e.children.forEach((function(t){return i.children.push(t)})),e.pages.forEach((function(t){return i.pages.push(t)}))}));break;case 2:this.showSettings=!1,this.image.title=e.title,this.image.is360=e.is360,this.startView=this.image.startView=e.startView,e.settings&&(this.settings=e.settings,this.previousSettings=JSON.parse(JSON.stringify(e.settings)));break}},updateMarkers:function(t){for(var e=this,i=function(i){var r=e.previous.markers[i],n=e.data.markers.find((function(t){return r.id==t.id})),a=t.find((function(t){return r.id==t.id})),s=!n,o=!s&&JSON.stringify(n)!=JSON.stringify(r);if(s||o)return"continue";var c=e.data.markers.indexOf(n);if(!a&&n)e.data.markers.splice(c,1);else if(JSON.stringify(a)!=JSON.stringify(r))for(var u in a)n[u]=a[u]},r=0;r0&&void 0!==o[0]&&o[0],this.loaded){t.next=3;break}return t.abrupt("return");case 3:if(i=[],this.createSlugs(this.data.markers),this.createSlugs(this.data.markerTours),this.createSlugs(this.data.tours),r=JSON.stringify(this.previousSettings)!=JSON.stringify(this.settings),r&&(console.log("settings changed..."),i.push(b.setSettings(this.image.id,this.settings)),this.savingSettings=!0,this.previousSettings=JSON.parse(JSON.stringify(this.settings))),n=JSON.stringify(this.previous)!=JSON.stringify(this.data),n&&(console.log("meta changed..."),i.push(b.setImageData(this.image.id,this.lang,this.data)),this.savingData=!0,this.previous=JSON.parse(JSON.stringify(this.data))),a=this.startView!=this.image.startView,a&&(console.log("start view changed!"),i.push(b.setStartView(this.image.id,this.startView)),this.savingSettings=!0,this.image.startView=this.startView.join(",")),this.imageSettings.title!=this.image.title&&(console.log("title changed!"),i.push(b.renameImage(this.image.id,this.imageSettings.title)),this.savingSettings=!0,this.image.title=this.imageSettings.title),this.imageSettings.is360!=this.image.is360&&(console.log("360 changed!"),i.push(b.set360(this.image.id,this.imageSettings.is360)),this.savingSettings=!0,this.image.is360=this.imageSettings.is360),!i.length){t.next=25;break}return console.log("changed... saving!"),this.websocket&&(this.savingData&&this.websocket.send(1,this.data),this.savingSettings&&this.websocket.send(2,this.image)),this.saving=!0,t.next=21,Promise.all(i);case 21:this.saving=!1,this.savingData=!1,this.savingSettings=!1,e||setTimeout((function(){s.tutorial.active||s.showSidebar||s.tutorial.show("publish")}),500);case 25:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),reset:function(){this.data=this.previous,this.previous=JSON.parse(JSON.stringify(this.data)),this.settings=this.previousSettings,this.startView=this.image.startView?this.image.startView.split(",").map((function(t){return Number(t)})):[0,0,1,1],this.previousSettings=JSON.parse(JSON.stringify(this.settings))},preview:function(){var t=this;this.save().then((function(){return window.open("https://i.".concat(O?"micrio.dev":"micr.io","/").concat(t.image.shortId,"/").concat(t.$root.editor.lang,"?preview"),"_blank")}))},publish:function(){var t=this;this.$root.main.confirm("Do you want to publish this image?","This means your current version will be publicly available.").then((function(){return t.save().then(t.doPublish)})).catch((function(){}))},doPublish:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.tutorial.show(null),this.saving=!0,t.next=4,b.publishShortId(this.image.shortId,this.lang);case 4:this.saving=!1,this.$root.main.setMessage("Succesfully published image! It can take up to a minute before you see the changes.");case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),getAsset:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){var i,r,a,s,o,c=this,u=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return o=function(t){a.$off("chosen",o),s(t)},i=u.length>1&&void 0!==u[1]&&u[1],r=u.length>2&&void 0!==u[2]&&u[2],this.no360Picker=i,this.mapsPicker=r,this.assetPickerType=e,this.showAssetPicker=!0,a=null,s=null,n["default"].nextTick((function(){a=c.$refs.assetPicker,a.$on("chosen",o)})),t.abrupt("return",new Promise((function(t){return s=t})));case 11:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),getAudio:function(){return this.getAsset("audio")},getImage:function(){return this.getAsset("image")},getMicrio:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getAsset("micrio",t,e)},getExternalMarker:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e,i,r,n=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]&&n[0],t.next=3,this.getAsset("micrio",!1,!0);case 3:if(i=t.sent,i){t.next=6;break}return t.abrupt("return",null);case 6:if(!e){t.next=8;break}return t.abrupt("return",i.shortId);case 8:return this.pickerMarkerMicrioId=i.shortId,t.next=11,this.getAsset("marker");case 11:if(r=t.sent,r){t.next=14;break}return t.abrupt("return",null);case 14:return t.abrupt("return","".concat(r.id,",").concat(i.shortId));case 15:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),getVideo:function(){return this.getAsset("video")},getLangs:function(){return this.getAsset("language")},getSubtitles:function(){return this.getAsset("subtitle")},getJS:function(){return this.getAsset("js")},getCSS:function(){return this.getAsset("css")},migrateSettings:function(t){t._360||(t._360={}),t._360.video||(t._360.video={}),t._meta||(t._meta={}),t._markers||(t._markers={}),t.backgroundColor||(t.backgroundColor="#000000"),t.focus||(t.focus=[.5,.5]);var e={markerIcon:null,staticPopups:this.imageVersion>=4.2,staticMobilePopups:!1,showTitles:!1,markerColor:this.imageVersion>=4.2?"#ffffff":"#ffbb00",markerSize:this.imageVersion>=4.2?16:25,zoomOutAfterClose:!0};for(var i in e)void 0===t._markers[i]&&(t._markers[i]=e[i])},importMarkers:function(t){var e=this;t&&(t.forEach((function(t){return e.data.markers.push(t)})),this.save())},migrate:function(t){var e=this;t.markers||(t.markers=[]);for(var i=function(e){var i=t.markers[e];if(i.images||(i.images=[]),i.images.forEach((function(t,e){"string"==typeof t&&(i.images[e]={src:t,title:null,description:null}),t.width&&t.height||b.getImageDimensions(t).then((function(e){e&&(t.id=e.id,t.width=e.width,t.height=e.height)}),null,!0)})),"string"==typeof i.audio){var r=i.audio.split("/");i.audio={fileUrl:i.audio,title:r[r.length-1],mimeType:"audio/mp3",duration:null}}if(i.embedImages||(i.embedImages=[]),i.embedImages.forEach((function(t){void 0===t.rotX&&(t.rotX=0),void 0===t.rotY&&(t.rotY=0)})),void 0===i.audioAutoPlay&&(i.audioAutoPlay=!0),void 0===i.embedInPopover&&(i.embedInPopover=!1),void 0===i.embedInEmbed&&(i.embedInEmbed=!1),void 0===i.embedInEmbedImmediate&&(i.embedInEmbedImmediate=!1),void 0===i.embedMutesAudio&&(i.embedMutesAudio=!0),void 0===i.noMarker&&(i.noMarker=!1),i.markdown||(i.markdown=i.body),i.videoTour||(i.videoTour=null),i.videoTour&&(i.videoTour.subtitle||(i.videoTour.subtitle=null),i.videoTour.events||(i.videoTour.events=[])),void 0===i.data.micrioSplitLink&&(i.data.micrioSplitLink=null),i.data.micrioLink||(i.data.micrioLink=null),i.data.icon||(i.data.icon=null),i.data.micrioLink&&!i.data.micrioLink.id&&(i.data.micrioLink={id:i.data.micrioLink,tileSize:null,width:0,height:0,isPng:!1,isWebP:!1}),i.html&&!i.embedUrl){var n=i.html.replace(/^.*src="([^"]+)".*$/im,"$1");n&&(i.embedUrl=n)}},r=0;r embed in an old format. It only updates that iframe URL to the newly set URL.");var t=this.data.markers.filter((function(t){return t.html&&t.embedUrl&&t.html.indexOf('"'+t.embedUrl+'"')<0}));if(!t.length)return console.warn("No markers with different embed embeds");t.forEach((function(t){console.log("Update [".concat(t.title,"] to ").concat(t.embedUrl)),t.html=t.html.replace(/src="[^"]+"/,'src="'.concat(t.embedUrl,'"'))})),this.save()},thumbSrc:function(t,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:512,n=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;if(s>0)return"https://static.micr.io/home/img/editor/maptypes/1.png";for(var o=1,c=-1,u=r;u=0&&(i=t.title+"-"+n++));e.push(r),t.slug=r}}))}},getThumb:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64;return t.replace(/\.(jpg|png)$/i,"."+e+".$1").replace(/\.JPG$/,".jpg").replace(/\.PNG$/,".png")},getIconThumb:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64;if(!t)return null;var i=t["fileUrl"]||t["icon"];return t.iconMicrioId?"https://iiif.".concat(O?"micrio.dev":"micr.io","/").concat(t.iconMicrioId,"/max/^").concat(e,",/0/default.").concat(/\.png/.test(i)?"png":"jpg"):i.replace(/\.(jpg|png)$/i,"."+e+".$1").replace(/\.JPG$/,".jpg").replace(/\.PNG$/,".png")},printCoo:function(t){console.info("Clicked coords",this.$refs.micrio.camera.getCoo(t.clientX,t.clientY,!0))}}},$r=Cr,jr=(i("5eb7"),Object(V["a"])($r,le,me,!1,null,null,null)),Pr=jr.exports,Or=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.slug&&t.project?i("section",{key:t.slug,staticClass:"project"},[t.project.isActive?t._e():i("md-toolbar",{staticClass:"notification"},[t._v("\r\n\t\tThis project is currently inactive. Please "),i("router-link",{attrs:{to:"./activate"}},[t._v("activate this project")]),t._v(" to continue using it!\r\n\t")],1),i("Folder",{key:t.key})],1):t.state.loaded?i("md-empty-state",{attrs:{"md-icon":"error","md-label":"Project not found"}}):t._e()},Rr=[],Mr=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.folder?i("div",{key:t.$route.params.project,staticClass:"folder"},[i("input",{ref:"file",staticClass:"select-file",attrs:{type:"file",accept:t.selectingVideo?t.acceptedVideoTypes:t.acceptedTypes,multiple:""},on:{change:t.fileSelected}}),i("div",{staticClass:"folders"},[i("div",{staticClass:"folder-navigation"},[i("md-button",{staticClass:"md-narrow navigation-arrow",attrs:{to:"../"}},[i("md-icon",[t._v("arrow_back")])],1),i("div",{staticClass:"folder-titles"},[i("p",[t._v("\r\n\t\t\t\t\t"+t._s(t.path.length>1?t.path[t.path.length-2]:t.path.length?t.project.title:"All projects")+"\r\n\t\t\t\t")]),i("h2",{staticClass:"md-headline"},[t._v("\r\n\t\t\t\t\t"+t._s(t.path.length?t.path[t.path.length-1]:t.project.title)+"\r\n\t\t\t\t")])])],1),i("div",[t.project.isActive?i("md-menu",{staticClass:"folder-create"},[t.folder.zoneKey?[i("md-button",{staticClass:"md-primary md-has-icon",attrs:{to:"./spaces/edit"}},[i("md-icon",{staticClass:"color"},[t._v("workspaces")]),t._v(" Edit in Spaces")],1)]:[i("md-button",{staticClass:"md-primary md-has-icon",attrs:{disabled:t.$parent.limitReached},on:{click:function(){return t.selectFile(!1)}}},[i("md-icon",{staticClass:"color"},[t._v("add_box")]),t._v(" Image")],1),t.store.state.organisation&&t.store.state.isAdmin?i("md-button",{staticClass:"md-primary md-has-icon",staticStyle:{display:"none"},attrs:{disabled:t.$parent.limitReached},on:{click:function(){return t.fromUrl()}}},[i("md-icon",{staticClass:"color"},[t._v("add_box")]),t._v(" Image from URL")],1):t._e(),t.store.state.organisation&&t.store.state.organisation.hasExternalIIIF?i("md-button",{staticClass:"md-primary md-has-icon",attrs:{disabled:t.$parent.limitReached},on:{click:function(){return t.createImageFromIIIFSource()}}},[i("md-icon",{staticClass:"color"},[t._v("add_box")]),t._v(" IIIF Image")],1):t._e(),t.store.state.organisation&&t.store.state.organisation.hasVideo?i("md-button",{staticClass:"md-primary md-has-icon",attrs:{disabled:t.$parent.limitReached},on:{click:function(){return t.selectFile(!0)}}},[i("md-icon",{staticClass:"color"},[t._v("add_box")]),t._v(" Video")],1):t._e(),i("md-button",{staticClass:"md-primary md-has-icon",attrs:{disabled:t.$parent.limitReached},on:{click:t.doCreateFolder}},[i("md-icon",{staticClass:"color"},[t._v("create_new_folder")]),t._v(" Folder")],1)]],2):t._e(),i("md-menu",{staticClass:"folder-view"},[i("md-button",{staticClass:"md-narrow",class:{active:t.listView},attrs:{title:"List view"},on:{click:function(e){return t.setListView(!0)}}},[i("md-icon",[t._v("list")])],1),i("md-button",{staticClass:"md-narrow",class:{active:!t.listView},attrs:{title:"Grid view"},on:{click:function(e){return t.setListView(!1)}}},[i("md-icon",[t._v("grid_view")])],1)],1),t.listView?t._e():i("md-menu",{staticClass:"sorting-view"},[i("md-button",{staticClass:"md-narrow",class:{active:"Title"==t.sorting},attrs:{title:"Sort by title"},on:{click:function(e){return t.setSort("Title")}}},[i("md-icon",[t._v("sort_by_alpha")])],1),i("md-button",{staticClass:"md-narrow",class:{active:"Date"==t.sorting},attrs:{title:"Sort by date"},on:{click:function(e){return t.setSort("Date")}}},[i("md-icon",[t._v("event")])],1)],1),t.project.zoneKey?t._e():i("md-menu",{staticClass:"folder-actions"},[i("md-button",{staticClass:"md-icon-button",attrs:{"md-menu-trigger":""}},[i("md-icon",[t._v("more_vert")])],1),i("md-menu-content",[i("md-menu-item",[i("span",[t._v("ID: "),i("b",[t._v(t._s(t.folder.shortId))])])]),t.numImages>0?i("md-menu-item",{attrs:{href:t.publicUrl,target:"_blank"}},[t._v("Public link")]):t._e(),t.folder.parentId?i("md-menu-item",{on:{click:t.doRename}},[t._v("Rename folder")]):t._e(),t.folder.parentId?i("md-menu-item",{on:{click:t.doMove}},[t._v("Move folder")]):t._e(),t.folder.parentId?i("md-menu-item",{staticClass:"md-primary md-accent",attrs:{to:"./delete"}},[t._v("Delete folder")]):t._e(),t.isAdmin?i("md-menu-item",{on:{click:function(e){return t.setPassword(t.folder.id)}}},[t._v("Set password")]):t._e()],1)],1)],1)]),!t.loading&&0==t.numImages&&0==t.folders.length&&t.project.isActive?i("md-empty-state",{attrs:{"md-icon":"add_photo_alternate","md-label":"Upload your first image","md-description":t.project.zoneKey?"Open the spaces editor to add your first 360 image!":"Drag and drop your image here or click this button to start with your first image!"}},[t.project.zoneKey?i("md-button",{staticClass:"md-primary md-accent md-raised",attrs:{to:"./spaces/edit"}},[t._v("Edit in Spaces")]):i("md-button",{staticClass:"md-primary md-accent md-raised",on:{click:function(){return t.selectFile(!1)}}},[t._v("Select image file")])],1):!t.project.isActive||!t.loading&&0==t.numImages&&0==t.folders.length?i("md-empty-state",{attrs:{"md-icon":"restore_page","md-label":"Inactive project","md-description":"This project is currently not active."}}):[i("md-content",[t.$parent.project&&t.$parent.limitReached?i("span",{staticClass:"limit-reached"},[t._v("You have reached your account limits and cannot upload new images. Please upgrade your account, or clean up by deleting unused uploads.")]):t._e()]),t.numImages>t.imagesPerPage?i("Pagination",{attrs:{"num-per-page":t.imagesPerPage,offset:t.offset,total:t.numImages}}):t._e(),t.loading?i("div",{staticClass:"micrio-loader"}):t.listView?i("div",{staticClass:"images-table"},[i("table",[i("thead",[i("tr",[t.folder.zoneKey?t._e():i("th",[i("input",{ref:"selectAll",staticClass:"select-all",class:t.selected.length0},on:{click:t.selectAll}})]),i("th",{staticClass:"center"},[!t.folder.zoneKey&&t.selected.length>0?i("md-menu",{staticClass:"selection-actions"},[i("md-button",{staticClass:"md-icon-button",attrs:{"md-menu-trigger":"",title:"With selection.."}},[i("md-icon",[t._v("list")])],1),i("md-menu-content",[i("md-menu-item",{on:{click:t.publishAll}},[t._v("Publish")]),i("md-menu-item",{on:{click:t.depublishAll}},[t._v("Depublish")]),i("md-menu-item",{on:{click:function(e){return t.setAll360(!0)}}},[t._v("Set as 360°")]),i("md-menu-item",{on:{click:function(e){return t.setAll360(!1)}}},[t._v("Unset as 360°")]),t.isAdmin?i("md-menu-item",{on:{click:t.resetAllVersions}},[t._v("Reset versions")]):t._e(),i("md-menu-item",{staticClass:"md-primary md-accent",on:{click:t.deleteAll}},[t._v("Delete")])],1)],1):t._e()],1),i("th"),i("th",[i("span",{staticClass:"sortable",on:{click:function(e){return t.setSort("Title")}}},[t._v("Name")])]),i("th",{staticClass:"center no-mobile pre"},[i("md-icon",[t._v("publish")]),t._v("Published")],1),i("th",{staticClass:"center no-mobile pre"},[i("md-icon",[t._v("event")]),i("span",{staticClass:"sortable",on:{click:function(e){return t.setSort("Date")}}},[t._v("Created")])],1),i("th",{staticClass:"center no-tablet pre"},[i("md-icon",[t._v("photo_size_select_actual")]),t._v(" Dimensions")],1),i("th",{staticClass:"center no-tablet pre",attrs:{title:"Total image size (all zoom layers and assets)"}},[i("md-icon",[t._v("storage")]),t._v(" Size")],1),i("th",{staticClass:"menu"})])]),i("tbody",[t.folder.parentId?i("tr",{staticClass:"folder"},[i("td"),i("td",{staticClass:"border"},[i("md-icon",[t._v("folder")])],1),i("td"),i("td",[i("router-link",{staticClass:"italic",attrs:{title:"Parent folder",to:"../"}},[t._v("../")])],1),i("td",{attrs:{colspan:"4"}})]):t._e(),t._l(t.folders,(function(e){return i("tr",{key:e.id,staticClass:"folder"},[i("td"),i("td",{staticClass:"border"},[i("md-icon",[t._v("folder")])],1),i("td"),i("td",[i("router-link",{attrs:{to:e.slug+"/"}},[t._v("./"+t._s(e.title))])],1),i("td",{staticClass:"no-mobile"}),i("td",{staticClass:"right no-mobile pre",attrs:{title:e.created}},[t._v(t._s(t.$root.timeAgo(e.created)))]),i("td",{staticClass:"center no-tablet",attrs:{colspan:"2"}}),i("td",{staticClass:"menu"},[i("md-menu",[i("md-button",{staticClass:"md-icon-button md-primary",attrs:{"md-menu-trigger":""}},[i("md-icon",[t._v("more_vert")])],1),i("md-menu-content",{staticClass:"image-menu"},[i("md-menu-item",{on:{click:function(i){return t.doRenameChild(e.id)}}},[t._v("Rename folder")]),i("md-menu-item",{on:{click:function(i){return t.doMoveChild(e.id)}}},[t._v("Move folder")]),i("md-menu-item",{staticClass:"md-primary md-accent",attrs:{to:e.slug+"/delete"}},[t._v("Delete folder")]),t.isAdmin?i("md-menu-item",{on:{click:function(i){return t.setPassword(e.id)}}},[t._v("Set password")]):t._e()],1)],1)],1)])})),t._l(t.images,(function(t){return i("ImageRow",{key:t.id,ref:"images",refInFor:!0,attrs:{image:t}})}))],2)])]):i("div",{staticClass:"image-view"},[t._l(t.folders,(function(e){return i("div",{key:e.id,staticClass:"image-view-item"},[i("md-card",{staticClass:"project-card active tile"},[i("md-card-media",{staticClass:"md-layout md-ratio-16-9 tile-image-placeholder"},[i("router-link",{staticClass:"image-link image-container",attrs:{to:e.slug+"/"}},[i("md-icon",{staticClass:"folder"},[t._v("folder")])],1)],1),i("md-card-header",[i("md-card-header-text",[i("router-link",{attrs:{to:e.slug+"/"}},[i("p",{staticClass:"card-title"},[t._v("./"+t._s(e.title))])]),i("div",{staticClass:"card-subtitles"},[i("p",{staticClass:"card-subtitle"},[t._v("Created "+t._s(t.$root.timeAgo(e.created)))]),i("p",{staticClass:"card-subtitle"},[t._v(t._s(e.numberOfImages)+" image"+t._s(1==e.numberOfImages?"":"s"))])])],1)],1)],1)],1)})),t.loading?i("div",{staticClass:"micrio-loader"}):t._e(),t._l(t.images,(function(t){return i("div",{key:t.id,staticClass:"image-view-item"},[i("ImageCard",{ref:"images",refInFor:!0,attrs:{image:t}})],1)})),t.folder.zoneKey||t.$parent.limitReached||t.loading?t._e():i("div",{staticClass:"image-view-item"},[i("md-card",{staticClass:"image-view-add tile"},[i("md-card-media",{staticClass:"md-layout md-ratio-16-9"},[i("button",{staticClass:"image-view-icon-card-button",on:{click:function(){return t.selectFile(!1)}}},[i("md-icon",{staticClass:"icon"},[t._v("add")]),i("p",[t._v("Upload image")])],1)])],1)],1)],2),t.numImages>t.imagesPerPage&&!t.loading&&(t.listView&&t.images.length>15||!t.listView&&t.images.length>8)?i("Pagination",{attrs:{"num-per-page":t.imagesPerPage,offset:t.offset,total:t.numImages}}):t._e(),i("md-divider"),i("div",{staticClass:"project-info md-layout md-gutter"},[i("div",{staticClass:"md-layout-item md-size-15 md-small-size-30"},[i("h3",[t._v("Project size")]),i("p",[t._v(t._s(t.$root.getFileSize(t.project.fileSize)))])]),t.project.visitors||t.project.bandwidth?i("div",{staticClass:"md-layout-item md-size-15 md-small-size-30"},[i("h3",[t._v("Usage last 12 months")]),t.project.visitors?i("p",[t._v("Views: "+t._s(t.$root.getReadable(t.project.visitors))+" "),t.subscription&&t.subscription.maxVisitors>0&&!t.store.getters.isSharedLimit?i("span",[t._v(" / "+t._s(t.$root.getReadable(t.subscription.maxVisitors)))]):t._e()]):t._e(),t.project.bandwidth?i("p",[t._v("Bandwidth: "+t._s(t.$root.getFileSize(t.project.bandwidth)))]):t._e()]):t._e(),i("div",{staticClass:"md-layout-item md-size-15 md-small-size-30"},[i("h3",[t._v("Stats")]),t.images.length?i("p",[t._v("Images: "+t._s(t.images.length)),t.subscription&&t.subscription.maxImages>0&&!t.store.getters.isSharedLimit?i("span",[t._v(" / "+t._s(t.$root.getReadable(t.subscription.maxImages)))]):t._e()]):t._e(),i("p",[t._v("Created: "+t._s(t.project.created.split("T")[0]))])])])],i("div",{ref:"zone",class:"drop-zone "+(t.placedDropZone?"placed":"")},[i("md-empty-state",{staticClass:"drop here",attrs:{"md-icon":"add_photo_alternate","md-label":"Drop your image here"}})],1)],2):i("md-empty-state",{attrs:{"md-icon":"error","md-label":"Folder not found"}})},Tr=[],Dr=i("7618"),Ar=i("6bd1"),Er=!!window["_useDeepZoom"],Lr=navigator.userAgent.toLowerCase(),Ur={};Ur.webkit=/applewebkit/.test(Lr),Ur.firefox=/firefox/.test(Lr)&&!/seamonkey/.test(Lr),Ur.safari=/safari/.test(Lr)&&!/chrome/.test(Lr),Ur.chrome=/chrome/.test(Lr)&&!/edge/.test(Lr)&&!/chromium/.test(Lr),Ur.ie=/msie/.test(Lr)||/trident/.test(Lr)||/edge\//.test(Lr),Ur.ielte11=Ur.ie&&!/edge\//.test(Lr),Ur.iemobile=/iemobile/.test(Lr),Ur.iOS=/ipad|iphone|ipod/.test(Lr),Ur.iOS10=/iphone os 10/.test(Lr),Ur.iOS11=/iphone os 11/.test(Lr),Ur.OSX=/macintosh/.test(Lr)&&/os x/.test(Lr),Ur.OSX_13=/os x 10_13/.test(Lr),Ur.android=/android/.test(Lr),Ur.iPad=/ipad/.test(Lr),Ur.mobile=Ur.iOS||Ur.android||Ur.iemobile,Ur.unknown=!Ur.webkit&&!Ur.firefox&&!Ur.ie&&!Ur.iOS&&!Ur.android;var Nr=function(){function t(e,i,r,n){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],o=arguments.length>6&&void 0!==arguments[6]&&arguments[6];Object(ge["a"])(this,t),this.file=e,this.projectId=i,this.organisationId=r,this.image=n,this.isVideo=s,this.isDeepZoom=Er||o,this.data=null,this.title=e.name,this.isJpg="image/jpeg"==e.type,this.isPng="image/png"==e.type,this.doWebP=!!window._doWebP,this.isTransparentPng=a&&this.isPng,this.complete=null,this.error=null}return Object(fe["a"])(t,[{key:"start",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,i){e.complete=t,e.error=i,e.uploadFull()})));case 1:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}()},{key:"progress",value:function(t){this.image.tilingProgress=100*t}},{key:"setStatus",value:function(t){this.image.sourceImageStatus=t}},{key:"uploadFull",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e,i,r,n,a,s,o,c,u,d,l,m,h=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e={Title:this.title,IsPng:this.isTransparentPng,IsWebP:this.doWebP,TileSize:this.image.tileSize,MimeType:this.file.type,FolderId:this.projectId,IsBig:this.file.size>=1073741824,IsDeepZoom:this.isDeepZoom},this.organisationId&&(e["OrganisationId"]=this.organisationId),t.next=4,k("/api/micrio/startupload",e).catch((function(t){return h.error(t)}));case 4:if(i=t.sent,i){t.next=7;break}return t.abrupt("return");case 7:if(this.image.id=i.id,this.setStatus("starting upload.."),r=T.state.organisation&&T.state.organisation.isAzure,!r){t.next=24;break}return n=i.url.substr(i.url.indexOf(".net/")+5).split("/")[0],a=i.url.substr(0,i.url.indexOf(".net/"))+".net",s=i.url.substr(i.url.indexOf("?")),o=new Ar["a"](a+s),c=o.getContainerClient(n),u="_originals/".concat(i.id,"/source-image"),d=c.getBlockBlobClient(u),l=this,t.next=21,d.uploadBrowserData(this.file,{onProgress:function(t){var e=Math.round(t.loadedBytes/l.file.size*1e3)/10;h.setStatus("uploading - ".concat(e,"%..")),h.progress(t.loadedBytes/l.file.size)}});case 21:setTimeout((function(){return h.uploadFullComplete(i)}),4e3),t.next=31;break;case 24:m=new XMLHttpRequest,m.upload.addEventListener("progress",(function(t){h.setStatus("uploading.."),h.progress(t.loaded/t.total)})),m.addEventListener("error",(function(t){return h.error&&h.error(t)})),m.addEventListener("abort",(function(t){return h.error&&h.error(t)})),m.addEventListener("load",(function(){return h.uploadFullComplete(i)})),m.open("PUT",i.url,!0),m.send(this.file);case 31:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"uploadFullComplete",value:function(t){var e=this;this.setStatus("finishing upload.."),k("/api/micrio/finishupload",{id:t.id}).catch((function(t){return e.error&&e.error(t)})).then((function(){e.setStatus("waiting for tiler.."),e.complete&&e.complete(t)}))}}]),t}(),Vr=function(){function t(e){Object(ge["a"])(this,t),this.file=e,this.canvas=document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.video=null}return Object(fe["a"])(t,[{key:"process",value:function(){var t=this;return new Promise((function(e,i){if("video/webm"!=t.file.type&&"video/mp4"!=t.file.type)return i("Please select a WebM or MP4 video file");var r=2,n=URL.createObjectURL(t.file),a=t.video=document.createElement("video");a.oncanplay=function(){r=Math.max(.5,Math.min(a.duration-.5,2)),a.currentTime!=r?a.currentTime=r:t.getImage(a).then(e)},a.onerror=function(){return i("File error! Did you select a valid video file?")},a.src=n}))}},{key:"getImage",value:function(t){var e=this;return new Promise((function(i){e.canvas.width=t.videoWidth,e.canvas.height=t.videoHeight,e.ctx.drawImage(t,0,0,e.canvas.width,e.canvas.height),e.canvas.toBlob((function(t){t.name=e.file.name,i(t)}),"image/jpeg",70)}))}}]),t}(),zr=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"pages"},[i("md-button",{attrs:{to:t.getOffset(t.currentPage),disabled:!t.hasPrev}},[i("md-icon",[t._v("arrow_back")]),t._v(" previous page")],1),t._l(t.pages,(function(e,r){return i("md-button",{key:r,class:{"md-primary":e-1==t.currentPage,page:!0},attrs:{to:t.getOffset(e),disabled:"..."==e}},[t._v(t._s(e))])})),i("md-button",{attrs:{to:t.getOffset(t.currentPage+2),disabled:!t.hasNext}},[t._v("next page "),i("md-icon",[t._v("arrow_forward")])],1)],2)},Fr=[],Jr={data:function(){return{}},props:{offset:{type:Number,default:0},numPerPage:{type:Number,default:5},total:{type:Number,default:0}},computed:{hasPrev:function(){return this.offset>0},hasNext:function(){return this.offset+this.numPerPage6){var i=[1,2,"...",t-1,t];return i.indexOf(e)<0&&(3==e?i.splice(2,0,e):(i.splice(3,0,e),e!=t-2&&i.splice(4,0,"..."))),i}return t}},methods:{getOffset:function(t){var e=(t-1)*this.numPerPage;return e?"@".concat(e):"./"}}},Br=Jr,Gr=(i("a515"),Object(V["a"])(Br,zr,Fr,!1,null,"412484ba",null)),Yr=Gr.exports,Wr=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("tr",{class:t.deleting&&"deleting"},[this.parent.project.zoneKey?t._e():i("td",[t.isReady?i("input",{ref:"checkbox",attrs:{type:"checkbox"},on:{click:function(e){t.selected=!t.selected}}}):t._e()]),i("td",{ref:"media",staticClass:"image border",class:t.image.mapType>0&&"map-"+t.image.mapType},[t.isReady?t.mobile?i("a",{style:t.background,attrs:{href:""+t.publicLink,target:"_blank","data-id":t.image.shortId,title:"Public viewing link"}}):i("router-link",{style:t.background,attrs:{to:t.image.mapType?"#":"./edit/"+t.image.shortId+"/"+t.language,"data-id":t.image.shortId},nativeOn:{click:function(e){return t.checkMap(e)}}}):i("md-progress-bar",{attrs:{"md-mode":t.polling||t.deleting?"indeterminate":"determinate","md-value":t.image.tilingProgress}})],1),i("td",{staticClass:"status center",class:t.image.published&&"published"},[t.isReady?[i("a",{attrs:{href:""+t.publicLink,target:"_blank",title:"Public viewing link"}},[i("md-icon",[t._v("public")])],1),t.image.is360?i("md-icon",{attrs:{title:"Image is 360 degrees"}},[t._v("360")]):t._e()]:i("md-icon",[t._v("hourglass_empty")])],2),i("td",{staticClass:"pre title"},[t.isReady?[t.mobile?i("a",{attrs:{href:""+t.publicLink,target:"_blank",title:"Public viewing link"}},[t._v(t._s(t.image.title))]):i("router-link",{attrs:{title:"Edit this image",to:t.image.mapType?"#":"./edit/"+t.image.shortId+"/"+t.language},nativeOn:{click:function(e){return t.checkMap(e)}}},[t._v(t._s(t.image.title))])]:i("span",[t._v(t._s(t.image.title))]),t.isReady?t._e():i("div",{staticClass:"md-subhead"},[t._v(t._s(t.status)+" "+t._s(t.error))])],2),i("td",{staticClass:"pre right no-mobile"},[t.image.published?i("span",{attrs:{title:t.image.published}},[t._v(t._s(t.$root.timeAgo(t.image.published)))]):t._e()]),i("td",{staticClass:"pre right no-mobile"},[t.image.created?i("span",{attrs:{title:t.image.created}},[t._v(t._s(t.$root.timeAgo(t.image.created)))]):t._e()]),i("td",{staticClass:"pre right no-tablet"},[t.image.width&&t.image.height?i("span",{attrs:{title:t.mPixels}},[t._v(t._s(t.image.width)+" x "+t._s(t.image.height)+" px")]):t._e()]),i("td",{staticClass:"pre right no-tablet"},[t.image.fileSize&&!t.image.mapType?i("span",[t._v(t._s(t.$root.getFileSize(t.image.fileSize)))]):t._e()]),i("td",{staticClass:"menu"},[t.image.isSpace?t._e():i("md-menu",[i("md-button",{staticClass:"md-icon-button md-primary",attrs:{"md-menu-trigger":""}},[i("md-icon",[t._v("more_vert")])],1),i("md-menu-content",{staticClass:"image-menu"},[t.canUpgrade?i("md-menu-item",{on:{click:t.doUpgrade}},[t._v("Update version")]):t._e(),t.isReady?i("md-menu-item",{attrs:{disabled:t.settingPublished},on:{click:function(e){return t.togglePublished()}}},[t._v(t._s(t.image.published?"Set private":"Publish"))]):t._e(),t.parent.project.isActive&&t.isReady?i("md-menu-item",{on:{click:t.doRename}},[t._v("Rename")]):t._e(),t.isReady?i("md-menu-item",{attrs:{disabled:!t.canMove},on:{click:t.doMove}},[t._v("Move")]):t._e(),t.isReady?i("md-menu-item",{on:{click:t.clone}},[t._v("Clone")]):t._e(),t.canDelete?i("md-menu-item",{staticClass:"md-primary md-accent",on:{click:t.doRemove}},[t._v("Delete")]):t._e(),t.canDownloadOriginal?i("md-menu-item",{attrs:{target:"_blank",href:t.image.originalUri}},[t._v("Original")]):t._e(),t.canSetPassword?i("md-menu-item",{on:{click:t.setPassword}},[t._v("Set password")]):t._e(),t.canRetryTiling?i("md-menu-item",{on:{click:t.retryTiling}},[t._v("Retry tiling")]):t._e()],1)],1)],1)])},qr=[],Kr={props:{image:{type:Object}},data:function(){return{parent:this.$parent,polling:!1,deleting:!1,error:null,isAdmin:T.state.isAdmin,isDevEnv:O,setting360:!1,settingPublished:!1,baseUrl:T.state.baseUrl,pollTimeout:null,selected:!1,b64thumb:null,currentVersion:"4.0"}},computed:{publicLink:function(){return"https://i.".concat(O?"micrio.dev":"micr.io","/").concat(this.image.shortId)},language:function(){return T.getters.currentCulture},background:function(){var t=this.getThumbSrc();return t&&!this.image.mapType>0?"background-image:url(".concat(t,")"):null},widthPx:function(){return this.image.width/this.image.height*240},newEditor:function(){var t=new Date(this.image.created),e=new Date("2018-09-14");return this.image.forceNewEditor||t>e},status:function(){var t=this.image.sourceImageStatus;for(var e in c)if(c[e]==t)return e;return t},isReady:function(){return this.image.sourceImageStatus==c.Ready},canUpgrade:function(){return this.canDelete&&(!this.image.version||this.image.version<4)},canDelete:function(){return this.isAdmin||T.state.organisation&&!T.state.organisation.isShared},canRetryTiling:function(){return this.canDelete&&this.image.hasOriginal&&(this.error||!this.isReady)},canMove:function(){var t=this,e=!T.state.organisation||T.state.subscriptions.findIndex((function(e){return e.id==t.projectId}))>=0;return T.getters.isFreeOrg||!e||T.state.folders.filter((function(e){return e.projectId==t.parent.project.id})).length>=1},canDownloadOriginal:function(){return this.isAdmin&&"s"!=T.state.currentOrg&&this.image.originalUri},canSetPassword:function(){return this.isAdmin},mPixels:function(){var t=this.image.width*this.image.height/1e6;return t>1e3?(t/1e3).toFixed(1)+" GP":t.toFixed(1)+" MP"},publishStatus:function(){return this.image.published?"Image is public":T.state.organisation&&T.state.organisation.isShared?"Image viewable by your organisation only":"Image is private"},mobile:function(){return window.innerWidth<=560},rootUrl:function(){return this.image.mapType>0?location.pathname+"?v=2.9":"."}},watch:{selected:function(t){var e=this;if(this.$refs.checkbox.checked=t,t)this.$parent.selected.push(this);else{var i=this.$parent.selected.findIndex((function(t){return t==e}));i>=0&&this.$parent.selected.splice(i,1)}}},mounted:function(){this.image.sourceImageStatus==c.Error?this.error=this.image.errorMessage:this.image.clientStarted||this.image.sourceImageStatus==c.Ready||this.parent.getImages()},methods:{toggle360:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.set360(!e.is360);case 2:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),set360:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.setting360=!0,t.next=3,b.set360(this.image.id,e);case 3:this.image.is360=e,this.setting360=!1;case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),togglePublished:function(){var t=this;this.$root.main.confirm("Do you want to "+(this.image.published?"de":"")+"publish this image?").then(Object(r["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.settingPublished=!0,e.next=3,b.setPublished(t.image.id,!t.image.published);case 3:t.image.published=!t.image.published,t.settingPublished=!1;case 5:case"end":return e.stop()}}),e)}))))},publish:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!this.image.published){t.next=2;break}return t.abrupt("return");case 2:return this.settingPublished=!0,t.next=5,b.setPublished(this.image.id,!0);case 5:this.image.published=Date.now(),this.settingPublished=!1;case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),depublish:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.image.published){t.next=2;break}return t.abrupt("return");case 2:return this.settingPublished=!0,t.next=5,b.setPublished(this.image.id,!1);case 5:this.image.published=!1,this.settingPublished=!1;case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),resetVersion:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,b.resetVersion(this.image.id);case 2:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),checkPrint:function(){var t=this.$el.getBoundingClientRect();t.top0&&this.$refs.micrio.print()},doRemove:function(){this.$root.main.confirm("Do you want to delete this image?").then(this.removeConfirmed).catch((function(){return null}))},removeConfirmed:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){var i,r=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.selected=!1,i=this.parent.images.findIndex((function(t){return t.id==r.image.id})),!(i>=0)){t.next=13;break}return clearTimeout(this.pollTimeout),this.deleting=!0,t.next=7,b.deleteImage(this.image.id);case 7:this.parent.images.splice(i,1),this.parent.numImages--,this.parent.$parent.project.numberOfImages--,!0!==e&&this.$root.main.setMessage("Image succesfully deleted"),t.next=14;break;case 13:console.error("Could not find image index!");case 14:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),doRename:function(){var t=this;this.$root.main.prompt("Set the image title",this.image.title).then(function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(i){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.image.title=i,e.next=3,b.renameImage(t.image.id,t.image.title);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(){return null}))},doUpgrade:function(){var t=this;this.$root.main.confirm("Update image version","\n\t\t\t\tDo you want to upgrade this image".concat(this.image.version?" (Micrio v".concat(this.image.version,")"):""," to the latest Micrio version (v").concat(this.currentVersion,")?\n\t\t\t\tSome custom JS/CSS might not keep working due to changed APIs. If there is no custom JS/CSS, you can upgrade safely. Are you sure?\n\t\t\t")).then(Object(r["a"])(regeneratorRuntime.mark((function e(){var i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return console.log("clicked yes!"),i=t.image.sourceImageStatus,t.image.sourceImageStatus="Upgrading",e.next=5,b.upgradeImage(t.image.id);case 5:t.image.version=t.currentVersion,t.$root.main.setMessage("Succesfully upgraded the image version!"),t.image.sourceImageStatus=i;case 8:case"end":return e.stop()}}),e)})))).catch((function(){return null}))},retryTiling:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,b.retryTiling(this.image.id);case 2:this.error=this.image.errorMessage=null,this.$root.main.setMessage("Retrying..."),this.polling=!0,this.image.sourceImageStatus="Retrying..",this.$parent.getImages();case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),clone:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$root.main.confirm("Include data","Do you also want to copy all data (markers, tours, audio)?").then((function(){return!0})).catch((function(){return!1}));case 2:return e=t.sent,t.next=5,b.cloneImage(this.image.id,this.parent.folder.id,e);case 5:i=t.sent,i&&(i.sourceImageStatus=c.Ready,this.parent.images.unshift(i),this.$root.main.setMessage("Image cloned succesfully!"));case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),doMove:function(){var t=this;this.$root.main.folder("Move image",this.parent.project.id,this.parent.folder.id).then(function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(i){var r,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(i&&i!=t.parent.folder.id){e.next=2;break}return e.abrupt("return");case 2:return r=t.parent.images.findIndex((function(e){return e.id==t.image.id})),e.next=5,b.moveImage(t.image.id,i);case 5:n=e.sent,t.image.folderId=n.folderId,t.image.projectId=n.projectId,t.parent.images.splice(r,1),t.parent.numImages--,t.parent.$parent.project.numberOfImages--,t.$root.main.setMessage("Image succesfully moved");case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(){return null}))},setPassword:function(){var t=this;this.$root.main.prompt("Set the image password",this.image.password).then(function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(i){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.image.password=i,e.next=3,b.setImagePassword(t.image.id,t.image.password);case 3:t.$root.main.setMessage("Succesfully "+(t.image.password?"set":"removed")+" password");case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(){return null}))},update:function(t){if(this.polling=!0,t.errorMessage)this.$root.main.setPopup("Error: "+t.errorMessage),this.polling=!1,this.error=t.errorMessage,this.image.sourceImageStatus=c.Error;else{var e=null;switch(t.sourceImageStatus){case c.Ready:return this.image.sourceImageStatus=t.sourceImageStatus,this.image.width=t.width,this.image.height=t.height,this.image.shortId=t.shortId,this.image.isPng=t.isPng,this.image.fileSize=t.fileSize,this.image.created=t.created,this.image.micrioVersion=t.micrioVersion,void(this.polling=!1);case c.Downloading:e="receiving image..";break;case c.TilingStarted:e="tiling image..";break;case c.Resizing:e="diving deeper..";break;case c.Storing:e="putting it online..";break}e&&(this.image.sourceImageStatus=e)}return this.polling},getThumbSrc:function(){if(!T.state.hasIIIF)return this.$root.main.thumbSrc(this.image,!0);var t=this.image.originalShortId||this.image.shortId,e=this.image.iiifManifest?this.image.iiifManifest.replace("/info.json",""):"".concat(T.state.iiifUrl).concat(t);return"".concat(e,"/full/^100,/0/default.jpg")},checkMap:function(t){this.image.mapType>0&&(t.stopPropagation(),t.preventDefault(),this.$root.main.confirm("Bing Maps are unfortunately no longer supported in the editor"))}}},Xr=Kr,Hr=(i("3e88"),Object(V["a"])(Xr,Wr,qr,!1,null,null,null)),Qr=Hr.exports,Zr=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("md-card",{class:["tile",t.isDemo&&"demo",t.image.iiifManifest&&"iiif"]},[t.isReady?i("md-card-media",{staticClass:"tile-image md-ratio-16-9"},[i("router-link",{attrs:{to:t.image.mapType?"":"./edit/"+t.image.shortId+"/"+t.language,"data-id":t.image.shortId},nativeOn:{click:function(e){return t.checkMap(e)}}},[i("img",{staticClass:"md-image",attrs:{src:t.imgUrl}}),t.image.is360?i("md-icon",{staticClass:"icon-360",attrs:{title:"Image is 360 degrees"}},[t._v("360")]):t._e(),i("p",{class:{published:t.image.published,unpublished:!t.image.published}},[t._v(t._s(t.publishStatus))]),i("div",{staticClass:"edit-overlay"},[i("md-icon",{attrs:{title:"Edit"}},[t._v("edit")])],1)],1)],1):i("md-card-media",{staticClass:"tile-image tile-image-placeholder md-ratio-16-9"},[i("md-icon",[t._v("hourglass_empty")])],1),i("md-card-header",[i("md-card-header-text",[t.isReady?i("router-link",{attrs:{to:t.image.mapType?"#":"./edit/"+t.image.shortId+"/"+t.language,"data-id":t.image.shortId},nativeOn:{click:function(e){return t.checkMap(e)}}},[i("p",{staticClass:"card-title",attrs:{title:t.image.title}},[t._v(t._s(t.image.title))])]):i("p",{staticClass:"card-title"},[t._v(t._s(t.image.title))]),t.isReady?t._e():i("md-progress-bar",{attrs:{"md-mode":t.polling||t.deleting||t.uploadingVideo?"indeterminate":"determinate","md-value":t.image.tilingProgress}}),i("div",{staticClass:"card-subtitles"},[t.isReady?i("p",{staticClass:"card-subtitle"},[t._v(t._s(t.image.published?"Last published":"Created")+" "+t._s(t.$root.timeAgo(t.image.published||t.image.created)))]):t._e(),t.isReady?i("p",{staticClass:"card-subtitle"},[t._v(t._s(t.image.width)+" x "+t._s(t.image.height)+" px - "+t._s(t.$root.getFileSize(t.image.fileSize)))]):i("p",{staticClass:"card-subtitle"},[t._v("\n\t\t\t\t\t"+t._s(t.status)+" "+t._s(t.error)+"\n\t\t\t\t")])])],1),i("md-menu",[i("md-button",{staticClass:"md-icon-button md-primary",attrs:{"md-menu-trigger":""}},[i("md-icon",[t._v("more_vert")])],1),t.image.isSpace?i("md-menu-content",[t.isReady&&t.image.published?i("md-menu-item",[i("span",[t._v("Id: "),i("b",[t._v(t._s(t.image.shortId))])])]):t._e(),t.isReady&&t.image.published?i("md-menu-item",[i("a",{attrs:{href:t.publicLink,target:"_blank"}},[t._v("Public viewing link")])]):t._e()],1):i("md-menu-content",[t.isReady&&t.image.published?i("md-menu-item",[i("span",[t._v("Id: "),i("b",[t._v(t._s(t.image.shortId))])])]):t._e(),t.isReady&&t.image.published?i("md-menu-item",[i("a",{attrs:{href:t.publicLink,target:"_blank"}},[t._v("Public viewing link")])]):t._e(),t.canUpgrade?i("md-menu-item",{on:{click:t.doUpgrade}},[t._v("Update version")]):t._e(),t.isReady?i("md-menu-item",{attrs:{disabled:t.settingPublished},on:{click:function(e){return t.togglePublished()}}},[t._v(t._s(t.image.published?"Set private":"Publish"))]):t._e(),t.parent.project.isActive&&t.isReady?i("md-menu-item",{on:{click:t.doRename}},[t._v("Rename")]):t._e(),t.isReady?i("md-menu-item",{attrs:{disabled:!t.canMove},on:{click:t.doMove}},[t._v("Move")]):t._e(),t.isReady?i("md-menu-item",{on:{click:t.clone}},[t._v("Clone")]):t._e(),t.canDelete?i("md-menu-item",{staticClass:"md-primary md-accent",on:{click:t.doRemove}},[t._v("Delete")]):t._e(),t.canDownloadOriginal?i("md-menu-item",{attrs:{target:"_blank",href:t.image.originalUri}},[t._v("Original")]):t._e(),t.canSetPassword?i("md-menu-item",{on:{click:t.setPassword}},[t._v("Set password")]):t._e(),t.canRetryTiling?i("md-menu-item",{on:{click:t.retryTiling}},[t._v("Retry tiling")]):t._e()],1)],1)],1)],1)},tn=[],en={props:{image:{type:Object}},data:function(){return{parent:this.$parent,polling:!1,uploadingVideo:!1,deleting:!1,error:null,isAdmin:T.state.isAdmin,isDevEnv:O,setting360:!1,settingPublished:!1,baseUrl:T.state.baseUrl,pollTimeout:null,b64thumb:null,currentVersion:"4.1"}},computed:{publicLink:function(){return"https://i."+(O?"micrio.dev":"micr.io")+"/"+this.image.shortId},language:function(){return T.getters.currentCulture},imgUrl:function(){var t=this.getThumbSrc();return this.image.mapType>0?"https://static.micr.io/home/img/editor/maptypes/1.png":t},status:function(){if(this.uploadingVideo)return"Uploading video...";var t=this.image.sourceImageStatus;for(var e in c)if(c[e]==t)return e;return t},isDemo:function(){return P.indexOf(this.image.shortId)>=0||P.indexOf(this.image.originalShortId)>=0},isReady:function(){return this.image.sourceImageStatus==c.Ready&&!this.uploadingVideo},canUpgrade:function(){return this.canDelete&&(!this.image.version||this.image.version<4)},canDelete:function(){return this.isAdmin||T.state.organisation&&!T.state.organisation.isShared},canRetryTiling:function(){return this.canDelete&&this.image.hasOriginal&&(this.error||!this.isReady)},canMove:function(){var t=this,e=!T.state.organisation||T.state.subscriptions.findIndex((function(e){return e.id==t.projectId}))>=0;return T.getters.isFreeOrg||!e||T.state.folders.filter((function(e){return e.projectId==t.parent.project.id})).length>=1},canDownloadOriginal:function(){return this.isAdmin&&"s"!=T.state.currentOrg&&this.image.originalUri},canSetPassword:function(){return this.isAdmin},publishStatus:function(){return this.image.published?"PUBLISHED":T.state.organisation&&T.state.organisation.isShared?"Published only for organization":"UNPUBLISHED"}},mounted:function(){this.image.sourceImageStatus==c.Error?this.error=this.image.errorMessage:this.image.clientStarted||this.image.sourceImageStatus==c.Ready||this.parent.getImages()},methods:{togglePublished:function(){var t=this;this.$root.main.confirm("Do you want to "+(this.image.published?"de":"")+"publish this image?").then(Object(r["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.settingPublished=!0,e.next=3,b.setPublished(t.image.id,!t.image.published);case 3:t.image.published=!t.image.published,t.settingPublished=!1;case 5:case"end":return e.stop()}}),e)}))))},publish:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!this.image.published){t.next=2;break}return t.abrupt("return");case 2:return this.settingPublished=!0,t.next=5,b.setPublished(this.image.id,!0);case 5:this.image.published=Date.now(),this.settingPublished=!1;case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),depublish:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.image.published){t.next=2;break}return t.abrupt("return");case 2:return this.settingPublished=!0,t.next=5,b.setPublished(this.image.id,!1);case 5:this.image.published=!1,this.settingPublished=!1;case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),resetVersion:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,b.resetVersion(this.image.id);case 2:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),doRemove:function(){this.$root.main.confirm("Do you want to delete this image?").then(this.removeConfirmed).catch((function(){return null}))},removeConfirmed:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){var i,r=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(i=this.parent.images.findIndex((function(t){return t.id==r.image.id})),!(i>=0)){t.next=12;break}return clearTimeout(this.pollTimeout),this.deleting=!0,t.next=6,b.deleteImage(this.image.id);case 6:this.parent.images.splice(i,1),this.parent.numImages--,this.parent.$parent.project.numberOfImages--,!0!==e&&this.$root.main.setMessage("Image succesfully deleted"),t.next=13;break;case 12:console.error("Could not find image index!");case 13:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),doRename:function(){var t=this;this.$root.main.prompt("Set the image title",this.image.title).then(function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(i){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.image.title=i,e.next=3,b.renameImage(t.image.id,t.image.title);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(){return null}))},doUpgrade:function(){var t=this;this.$root.main.confirm("Update image version","\n\t\t\t\tDo you want to upgrade this image".concat(this.image.version?" (Micrio v".concat(this.image.version,")"):""," to the latest Micrio version (v").concat(this.currentVersion,")?\n\t\t\t\tSome custom JS/CSS might not keep working due to changed APIs. If there is no custom JS/CSS, you can upgrade safely. Are you sure?\n\t\t\t\t\t")).then(Object(r["a"])(regeneratorRuntime.mark((function e(){var i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return console.log("clicked yes!"),i=t.image.sourceImageStatus,t.image.sourceImageStatus="Upgrading",e.next=5,b.upgradeImage(t.image.id);case 5:t.image.version=t.currentVersion,t.$root.main.setMessage("Succesfully upgraded the image version!"),t.image.sourceImageStatus=i;case 8:case"end":return e.stop()}}),e)})))).catch((function(){return null}))},retryTiling:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,b.retryTiling(this.image.id);case 2:this.error=this.image.errorMessage=null,this.$root.main.setMessage("Retrying..."),this.polling=!0,this.image.sourceImageStatus="Retrying..",this.$parent.getImages();case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),clone:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$root.main.confirm("Include data","Do you also want to copy all data (markers, tours, audio)?").then((function(){return!0})).catch((function(){return!1}));case 2:return e=t.sent,t.next=5,b.cloneImage(this.image.id,this.parent.folder.id,e);case 5:i=t.sent,i&&(i.sourceImageStatus=c.Ready,this.parent.images.unshift(i),this.$root.main.setMessage("Image cloned succesfully!"));case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),doMove:function(){var t=this;this.$root.main.folder("Move image",this.parent.project.id,this.parent.folder.id).then(function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(i){var r,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(i&&i!=t.parent.folder.id){e.next=2;break}return e.abrupt("return");case 2:return r=t.parent.images.findIndex((function(e){return e.id==t.image.id})),e.next=5,b.moveImage(t.image.id,i);case 5:n=e.sent,t.image.folderId=n.folderId,t.image.projectId=n.projectId,t.parent.images.splice(r,1),t.parent.numImages--,t.parent.$parent.project.numberOfImages--,t.$root.main.setMessage("Image succesfully moved");case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(){return null}))},setPassword:function(){var t=this;this.$root.main.prompt("Set the image password",this.image.password).then(function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(i){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.image.password=i,e.next=3,b.setImagePassword(t.image.id,t.image.password);case 3:t.$root.main.setMessage("Succesfully "+(t.image.password?"set":"removed")+" password");case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(){return null}))},update:function(t){if(this.polling=!0,t.errorMessage)this.$root.main.setPopup("Error: "+t.errorMessage),this.polling=!1,this.error=t.errorMessage,this.image.sourceImageStatus=c.Error;else{var e=null;switch(t.sourceImageStatus){case c.Ready:return this.image.sourceImageStatus=t.sourceImageStatus,this.image.width=t.width,this.image.height=t.height,this.image.shortId=t.shortId,this.image.isPng=t.isPng,this.image.fileSize=t.fileSize,this.image.created=t.created,this.image.micrioVersion=t.micrioVersion,void(this.polling=!1);case c.Downloading:e="receiving image..";break;case c.TilingStarted:e="tiling image..";break;case c.Resizing:e="diving deeper..";break;case c.Storing:e="putting it online..";break}e&&(this.image.sourceImageStatus=e)}return this.polling},getThumbSrc:function(){if(!T.state.hasIIIF)return this.$root.main.thumbSrc(this.image);var t=this.image.originalShortId||this.image.shortId,e=this.image.height>this.image.width?"^400,":"^!400,200",i=this.image.iiifManifest?this.image.iiifManifest.replace("/info.json",""):"".concat(T.state.iiifUrl).concat(t);return"".concat(i,"/full/").concat(e,"/0/default.jpg")},checkMap:function(t){this.image.mapType>0&&(t.stopPropagation(),t.preventDefault(),this.$root.main.confirm("Bing Maps are unfortunately no longer supported in the editor"))}}},rn=en,nn=(i("a788"),Object(V["a"])(rn,Zr,tn,!1,null,null,null)),an=nn.exports,sn={components:{ImageRow:Qr,Pagination:Yr,ImageCard:an},data:function(){var t=this;return{store:T,loading:!0,images:[],numImages:0,placedDropZone:!1,project:T.state.projects.find((function(e){return e.slug==t.$route.params.project})),imagesPerPage:50,doAsTransparent:!1,selected:[],selectingVideo:!1,isPolling:!1,pollTimeout:null,listView:!1,sorting:"Date",acceptedTypes:["image/bmp","image/jpg","image/jpeg","image/png","image/tif","image/tiff",".tif",".psd",".psb",".raw"].join(","),acceptedVideoTypes:["video/mp4","video/webm"].join(",")}},mounted:function(){this._over=this.over.bind(this),this._out=this.out.bind(this),this._drop=this.drop.bind(this),window.addEventListener("dragover",this._over),document.title=this.folder.title+" - "+(T.state.organisation?T.state.organisation.name+" - ":"")+"Micrio Dashboard",this.getImages();var t=localStorage.getItem("listView");t?this.listView="true"===localStorage.getItem("listView"):localStorage.setItem("listView","false")},watch:{offset:function(){this.getImages()}},beforeDestroy:function(){clearTimeout(this.pollTimeout),window.removeEventListener("dragover",this._over),document.title=(T.state.organisation?T.state.organisation.name+" - ":"")+"Micrio Dashboard",this.out()},computed:{subscription:function(){return T.getters.subscriptionOrg},offset:function(){var t=this.$route.params.offset;return t&&Number(t.substr(1))||0},imagesThisPage:function(){return this.images.slice(this.offset,this.offset+this.imagesPerPage)},folder:function(){var t=this;if(!this.path.length)return this.project;var e=function(){for(var e=t.project.id,i=T.state.folders,r=!1,n=function(n){var a=i.find((function(i){return i.parentId==e&&i.slug==t.path[n]}));if(!a)return"break";e=a.id,r=n==t.path.length-1},a=0;a0&&void 0!==arguments[0]&&arguments[0];this.doAsTransparent=!0,this.selectingVideo=e,this.$nextTick((function(){return t.$refs.file.click()}))},fileSelected:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.$refs.file.files[0]){t.next=2;break}return t.abrupt("return");case 2:if(e=this.$refs.file.files.length,this.selectingVideo||1!=e||"image/png"!=this.$refs.file.files[0].type){t.next=7;break}return t.next=6,this.decideFileTransparency();case 6:this.doAsTransparent=t.sent;case 7:this.createImagesVideo(this.$refs.file.files);case 8:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),createImagesVideo:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){var i,r=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e&&e.length){t.next=2;break}return t.abrupt("return");case 2:i=0;case 3:if(!(i3&&void 0!==l[3]&&l[3],a=l.length>4&&void 0!==l[4]&&l[4],s={id:null,title:e.name,tilingProgress:0,sourceImageStatus:"reading file..",clientStarted:!0,is360:n,published:(new Date).toString(),tileSize:1024},this.images.unshift(s),this.numImages++,this.$parent.project.numberOfImages++,o=T.state.organisation&&T.state.organisation.isAmazon,u=new Nr(e,this.folder.id,T.state.currentOrgId,s,this.doAsTransparent,a,o),t.abrupt("return",new Promise((function(t){u.start().catch((function(e){d.$root.main.setPopup(String(e)),console.error("Tiling error!",e),d.images.splice(0,1),d.numImages--,d.$parent.project.numberOfImages--,i==r&&(d.$refs.file.value=""),t()})).then((function(e){if(e){if(i==r&&(d.$refs.file.value=""),e.sourceImageStatus!=c.Ready){var n=d.$refs.images.find((function(t){return t.image.id==e.id}));n?d.getImages():console.warn("Image not found?")}t(e)}}))})));case 9:case"end":return t.stop()}}),t,this)})));function e(e,i,r){return t.apply(this,arguments)}return e}(),decideFileTransparency:function(){var t=this;return new Promise((function(e){t.$root.main.confirm("Tile as transparent PNG?","You have selected a PNG file to be uploaded. Do you want this to be a transparent Micrio image?

Note: the download size will be bigger.","Use PNG","Use JPEG").then((function(){e(!0)})).catch((function(){e(!1)}))}))},createImageFromIIIFSource:function(){var t=this,e=prompt("Enter the IIIF manifest JSON URL");e&&fetch(e).then((function(t){return t.json()})).then((function(i){var r=i.width,n=i.height;if(i.sequences&&i.sequences.length){var a=i.sequences[0],s="top-to-bottom"==a.viewingDirection,o=a.canvases.map((function(t){return t.images[0]})).map((function(t){return t.resource}));r=s?Math.max.apply(Math,Object(Ce["a"])(o.map((function(t){return t.width})))):o.reduce((function(t,e){return t+e.width}),0),n=s?o.reduce((function(t,e){return t+e.height}),0):Math.max.apply(Math,Object(Ce["a"])(o.map((function(t){return t.height}))))}r&&n?b.createImageFromIIIF(e,i.title||i.label||e,r,n,t.folder.id,T.state.currentOrgId).then((function(e){t.images.unshift(e),t.numImages++,t.$parent.project.numberOfImages++,t.$root.main.setMessage("IIIF image succesfully added!")})).catch((function(t){alert("Something went wrong. Check the console."),console.log(t)})):alert("Invalid manifest.")})).catch((function(){return alert("The IIIF manifest cannot be downloaded. Is it correct?")}))},depublishAll:function(){var t=this;this.$root.main.confirm("Do you want to depublish all selected images?").then(Object(r["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.selected.forEach(function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.depublish();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.$root.main.setMessage("Images succesfully depublished");case 2:case"end":return e.stop()}}),e)}))))},publishAll:function(){var t=this;this.$root.main.confirm("Do you want to publish all selected images?").then(Object(r["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.selected.forEach(function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.publish();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.$root.main.setMessage("Images succesfully published");case 2:case"end":return e.stop()}}),e)}))))},resetAllVersions:function(){var t=this;this.$root.main.confirm("Do you want to set the image Micrio viewer versions to the newest version?").then(Object(r["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.selected.map((function(t){return t.resetVersion()})));case 2:t.$root.main.setMessage("Images succesfully set to latest Micrio versions!");case 3:case"end":return e.stop()}}),e)}))))},deleteAll:function(){var t=this;this.$root.main.confirm("Do you want to delete all selected images?").then(Object(r["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.selected.forEach(function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.removeConfirmed(!0);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.$root.main.setMessage("Images succesfully deleted");case 2:case"end":return e.stop()}}),e)}))))},setAll360:function(t){var e=this,i=t?"set":"unset";this.$root.main.confirm("Do you want to "+i+" all selected images as 360 images?").then(Object(r["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:e.selected.forEach(function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(i){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,i.set360(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.$root.main.setMessage("Images succesfully "+i+" as 360");case 2:case"end":return n.stop()}}),n)}))))},setPassword:function(t){var e=this,i=this.folder.id==t?this.folder:this.folders.find((function(e){return e.id==t}));i&&this.$root.main.prompt("Set the folder password",this.folder.password).then(function(){var n=Object(r["a"])(regeneratorRuntime.mark((function r(n){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return i.password=n,r.next=3,b.setFolderPassword(t,n);case 3:e.$root.main.setMessage("Succesfully "+(n?"set":"removed")+" password");case 4:case"end":return r.stop()}}),r)})));return function(t){return n.apply(this,arguments)}}()).catch((function(){return null}))},over:function(t){t.stopPropagation(),t.preventDefault();for(var e=!1,i=0;i0&&this.project.images>=e.maxImages}}},ln=dn,mn=(i("32ed"),i("9d6d"),Object(V["a"])(ln,Or,Rr,!1,null,null,null)),hn=mn.exports,pn=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("form",{staticClass:"md-layout",attrs:{novalidate:""},on:{submit:function(e){return e.stopPropagation(),e.preventDefault(),t.submit(e)}}},[i("md-card",{staticClass:"md-layout-item md-size-50 md-small-size-100"},[i("md-card-header",[i("div",{staticClass:"md-title"},[t._v(t._s(t.project.id?t.project.isTrial?"Activate your trial project":"Upgrade your project":"Create a new project"))])]),t.canPay?i("md-card-content",[t.noChoiceInSubscription()?t._e():i("div",[i("h3",[t._v("1. Set your project name")]),i("p",[t._v("You can always change this later.")])]),i("md-field",[i("label",{attrs:{for:"title"}},[t._v("Project Name")]),i("md-input",{attrs:{type:"text",name:"title",id:"title",disabled:t.sending},model:{value:t.project.title,callback:function(e){t.$set(t.project,"title",e)},expression:"project.title"}}),i("span",{staticClass:"md-error"},[t._v("A title is required")])],1),t.hasSpaces?i("div",[i("md-checkbox",{attrs:{disabled:t.sending},model:{value:t.project.isSpaces,callback:function(e){t.$set(t.project,"isSpaces",e)},expression:"project.isSpaces"}},[t._v("\r\n\t\t\t\t\tThis is a 360 Spaces project (Closed beta, but you're part of it!)\r\n\t\t\t\t")])],1):t.noChoiceInSubscription()?t._e():i("div",[i("h3",[t._v("2. Choose your project type")]),i("p",[t._v("\r\n\t\t\t\t\tFor more information about each type and which features they provide,\r\n\t\t\t\t\tcheck out our "),i("a",{attrs:{href:"/plans-and-pricing",target:"_blank"}},[t._v("Plans and Pricing")]),t._v(" page.\r\n\t\t\t\t")]),i("p",[t._v("Do you need a larger plan, have very large image collections, need shared organisation accounts,\r\n\t\t\t\t\tor a server API for automatically transferring images from your existing platform?\r\n\t\t\t\t\tPlease "),i("router-link",{attrs:{to:"./quote"}},[t._v("contact us")]),t._v("!\r\n\t\t\t\t")],1),i("SelectSubscription",{attrs:{project:t.project,sending:t.sending},on:{change:function(e){return t.subscriptionOrgId=e}}}),t.store.state.user.isStripeCustomer?i("md-content",[t._v("\r\n\t\t\t\t\tWhen you click "),i("b",[t._v("Create project")]),t._v(", we will create your project and will take you to the payment screen.\r\n\t\t\t\t")]):i("md-content",[t._v("\r\n\t\t\t\t\tIn the next step, we will ask you to provide your payment details.\r\n\t\t\t\t")])],1)],1):i("md-card-content",[i("h3",[t._v("Please contact us")]),i("p",[t._v("\r\n\t\t\t\tIf you are interested in a Micrio subscription, please send us a mail at "),i("a",{attrs:{href:"mailto:support@micr.io"}},[t._v("support@micr.io")]),t._v(". Thank you!\r\n\t\t\t")])]),t.sending?i("md-progress-bar",{attrs:{"md-mode":"indeterminate"}}):t._e(),i("md-card-actions",[i("md-button",{staticClass:"md-secondary",attrs:{to:"./",disabled:t.sending}},[t._v("Cancel")]),t.canPay?i("md-button",{staticClass:"md-primary md-raised",attrs:{type:"submit",disabled:!t.valid||t.sending}},[t._v(t._s(t.store.getters.isFreeOrg?"Create project":t.store.state.user.isStripeCustomer?"Next: confirm payment":"Next: payment details"))]):t._e()],1)],1)],1)},gn=[],fn=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"select-subscription"},[i("md-field",{staticClass:"select-type",class:t.getValidationClass("subscriptionOrgId")},[i("table",[i("thead",[i("tr",[i("th",{staticClass:"name"},[t._v("Project ype")]),i("th",[t._v("Uploads")])])]),i("tbody",t._l(t.mainSubs,(function(e,r){return i("tr",{key:r,class:t.currentMaxImages==e.maxImages?"selected":null,on:{click:function(i){t.currentMaxImages=e.maxImages,t.subscriptionOrgId=t.initialSubOrgId}}},[i("td",{staticClass:"name"},[i("md-radio",{attrs:{value:e.maxImages,disabled:t.sending},model:{value:t.currentMaxImages,callback:function(e){t.currentMaxImages=e},expression:"currentMaxImages"}},[t._v(t._s(e.name))])],1),i("td",[t._v(t._s(t.$root.getReadable(e.maxImages)))])])})),0)])]),i("md-field",{staticClass:"monthly-yearly-container",class:t.currentMaxImages?null:"disabled"},[t.isEnterprise?i("div",[i("h3",[t._v("Please contact us for this subscription")]),i("p",[t._v("\r\n\t\t\t\tIf you are interested in a high volume account, please send us a mail at "),i("a",{attrs:{href:"mailto:support@micr.io"}},[t._v("support@micr.io")]),t._v(". Thank you!\r\n\t\t\t")])]):[t.isPremium?i("div",[i("h3",[t._v("3. Custom invoicing available!")]),i("p",[t._v("Premium subscriptions allow you to have custom invoicing instead of\r\n\t\t\t\tpayment using creditcard. Please "),i("a",{attrs:{href:"mailto:support@micr.io"}},[t._v("mail us at support@micr.io")]),t._v("\r\n\t\t\t\tto set this up, instead of adding your creditcard in here.")])]):t._e(),i("h3",[t._v(t._s(t.isPremium?"Otherwise, pick":"3. Pick")+" your payment plan")]),t.currentMaxImages?i("div",{staticClass:"monthly-yearly"},t._l(t.getSelectedSub(),(function(e,r){return i("div",{key:r,class:t.subscriptionOrgId==e.id?"selected":null,on:{click:function(i){t.subscriptionOrgId=e.id}}},[i("h3",[t._v("Per "+t._s(e.paymentInterval))]),i("h2",{staticClass:"amount"},[t._v("€ "+t._s((e.monthlyAmount/100/("year"==e.paymentInterval?12:1)).toFixed(0)))]),i("div",[t._v("("),i("b",[t._v("€ "+t._s(t.$root.getReadable((e.monthlyAmount/100).toFixed(0))))]),t._v(" billed "+t._s(e.paymentInterval)+"ly)")])])})),0):i("div",{staticClass:"monthly-yearly"},[i("div",[i("h3",[t._v("Per year")]),i("h2",{staticClass:"amount"},[t._v("€ -")])]),i("div",[i("h3",[t._v("Per month")]),i("h2",{staticClass:"amount"},[t._v("€ -")])])])]],2)],1)},vn=[],bn={props:{project:Object,sending:Boolean},data:function(){return{currentMaxImages:null,subscriptionOrgId:null,initialSubOrgId:null,valid:{subscriptionOrgId:!0}}},created:function(){var t=this,e=T.state.subscriptions.find((function(e){return e.id==t.project.subscriptionOrgId&&!e.cannotCreateNew}));e&&(this.currentMaxImages=e.maxImages,this.initialSubOrgId=e.id,this.subscriptionOrgId=e.id)},watch:{subscriptionOrgId:function(){this.$emit("change",this.subscriptionOrgId)}},computed:{isEnterprise:function(){var t=this.getSelectedSub();return t.length&&(/enterprise/i.test(t[0].name)||/premium/i.test(t[0].name))},isPremium:function(){var t=this.getSelectedSub();return t.length&&/premium/i.test(t[0].name)},mainSubs:function(){if(T.getters.isFreeOrg)return[];var t=T.state.subscriptions.filter((function(t){return t.isSubscription}));return t.map((function(t){return t.maxImages})).filter((function(t,e,i){return t&&i.indexOf(t)==e})).sort((function(t,e){return t>e?1:te?1:t0?i("span",[t._v("This project's trial period will expire in "+t._s(this.project.trialDaysLeft)+" days. If you wait too long,\r\n\t\t\t\t\tthe images in this project will be depublished and will not be publicly available anymore.\r\n\t\t\t\t")]):i("span",[t._v("Your trial period has expired; This means the images you have uploaded are no longer publicly available.")]),i("p",{attrs:{v:""}},[i("b",[t._v("Nothing "),t.project.trialDaysLeft>0?[t._v("will be")]:[t._v("has been")],t._v(" deleted")],2),t._v(", and if you don't wish to keep using Micrio, you can delete this project permanently "),i("router-link",{attrs:{to:"./delete"}},[t._v("here")]),t._v(".\r\n\t\t\t\t")],1),i("p",[t._v("\r\n\t\t\t\t\tTo keep using Micrio, please fill out the form below, after which we will get in touch with you about pricing details.\r\n\t\t\t\t")])]:i("p",[t._v("\r\n\t\t\t\tIf you wish to upgrade or downgrade this project, let us know your preferred changes.\r\n\t\t\t")]),i("p",[t._v("\r\n\t\t\t\tThe questions below are indicative, and will help us to deliver you a better quote.\r\n\t\t\t")]),i("md-field",[i("label",[t._v("How many images do you require in this project?")]),i("md-select",{attrs:{"md-dense":""},model:{value:t.values.numImages,callback:function(e){t.$set(t.values,"numImages",e)},expression:"values.numImages"}},[i("md-option",{attrs:{value:"1"}},[t._v("1")]),i("md-option",{attrs:{value:"2-10"}},[t._v("2 - 10")]),i("md-option",{attrs:{value:"11-25"}},[t._v("11-25")]),i("md-option",{attrs:{value:"26-50"}},[t._v("26-50")]),i("md-option",{attrs:{value:"51-250"}},[t._v("51-250")]),i("md-option",{attrs:{value:"250+"}},[t._v("250+")])],1)],1),i("md-field",[i("label",[t._v("Estimated average uploaded image sizes")]),i("md-select",{attrs:{"md-dense":""},model:{value:t.values.imageSize,callback:function(e){t.$set(t.values,"imageSize",e)},expression:"values.imageSize"}},[i("md-option",{attrs:{value:"0-10"}},[t._v("Up to 10MB")]),i("md-option",{attrs:{value:"10-50"}},[t._v("Up to 50MB")]),i("md-option",{attrs:{value:"50-500"}},[t._v("50 to 500MB")]),i("md-option",{attrs:{value:"500-5000"}},[t._v("500MB to 5GB")]),i("md-option",{attrs:{value:"5000+"}},[t._v("Larger than 5GB")])],1)],1),i("md-field",[i("label",[t._v("Estimated number of monthly views")]),i("md-select",{attrs:{"md-dense":""},model:{value:t.values.numVisitors,callback:function(e){t.$set(t.values,"numVisitors",e)},expression:"values.numVisitors"}},[i("md-option",{attrs:{value:"dunno"}},[t._v("I don't know")]),i("md-option",{attrs:{value:"0-1K"}},[t._v("Less than 1.000 monthly")]),i("md-option",{attrs:{value:"1K-10K"}},[t._v("Up to 10.000 monthly")]),i("md-option",{attrs:{value:"10K-100K"}},[t._v("Up to 100.000")]),i("md-option",{attrs:{value:"100K-1M"}},[t._v("Up to 1 million")]),i("md-option",{attrs:{value:"1M+"}},[t._v("More than 1 million")])],1)],1),i("md-field",[i("label",[t._v("Which sector will this project be used for?")]),i("md-select",{attrs:{"md-dense":""},model:{value:t.values.sector,callback:function(e){t.$set(t.values,"sector",e)},expression:"values.sector"}},[i("md-option",{attrs:{value:"art"}},[t._v("Individual artist or group of artists")]),i("md-option",{attrs:{value:"education"}},[t._v("Children's or adult education")]),i("md-option",{attrs:{value:"museum"}},[t._v("Museum / cultural")]),i("md-option",{attrs:{value:"tv-radio"}},[t._v("TV or radio broadcasting")]),i("md-option",{attrs:{value:"media"}},[t._v("Media company / advertising")]),i("md-option",{attrs:{value:"press"}},[t._v("Journalism / press media")]),i("md-option",{attrs:{value:"finance"}},[t._v("Financial")])],1)],1),i("div",[i("md-checkbox",{model:{value:t.values.video360,callback:function(e){t.$set(t.values,"video360",e)},expression:"values.video360"}},[t._v("I want to use 360° videos")])],1),i("div",[i("md-checkbox",{model:{value:t.values.embed,callback:function(e){t.$set(t.values,"embed",e)},expression:"values.embed"}},[t._v("I want to embed Micrio within my own site")])],1),i("div",[i("md-checkbox",{model:{value:t.values.IIIF,callback:function(e){t.$set(t.values,"IIIF",e)},expression:"values.IIIF"}},[t._v("I want to use the IIIF API")])],1),i("div",[i("md-checkbox",{model:{value:t.values.serverApi,callback:function(e){t.$set(t.values,"serverApi",e)},expression:"values.serverApi"}},[t._v("I want to use the server image tiling API for use in my own environments")])],1),i("div",[i("md-checkbox",{model:{value:t.values.customProject,callback:function(e){t.$set(t.values,"customProject",e)},expression:"values.customProject"}},[t._v("I have a custom project I would like to have developed")])],1),i("md-field",[i("label",[t._v("Do you have any additonal details, feedback, wishes, or ideas?")]),i("md-textarea",{staticClass:"description",model:{value:t.values.additional,callback:function(e){t.$set(t.values,"additional",e)},expression:"values.additional"}})],1),i("p",[t._v("\r\n\t\t\t\tWe will respond within two working days.\r\n\t\t\t\t"),t.inTrial?[0===t.project.trialDaysLeft?i("span",[t._v("\r\n\t\t\t\t\tAfter submitting this form, we will "),i("b",[t._v("reactivate")]),t._v(" this project for an extra "),i("b",[t._v("10 days")]),t._v("!\r\n\t\t\t\t")]):i("span",[t._v("\r\n\t\t\t\t\tAfter submitting this form, we will add "),i("b",[t._v("10 extra days")]),t._v(" to your trial period.\r\n\t\t\t\t")])]:t._e()],2)],2),t.sending?i("md-progress-bar",{attrs:{"md-mode":"indeterminate"}}):t._e(),i("md-card-actions",[i("md-button",{staticClass:"md-secondary",attrs:{to:"../",disabled:t.sending}},[t._v("Cancel")]),i("md-button",{staticClass:"md-primary md-raised md-active",attrs:{type:"submit",disabled:t.sending}},[t._v("Send")])],1)],1)],1)},Gn=[],Yn={data:function(){var t=this;return{project:T.state.projects.find((function(e){return e.slug==t.$route.params.project})),sending:!1,values:{numImages:null,imageSize:null,numVisitors:null,sector:null,video360:!1,embed:!1,IIIF:!1,serverApi:!1,customProject:!1,additional:""}}},computed:{inTrial:function(){return this.project.trialDaysLeft>0||0===this.project.trialDaysLeft}},methods:{submit:function(){var t=this;this.sending=!0,b.requestQuote(this.project.id,this.values).then((function(){t.$root.main.setMessage("Request sent, thank you! This project now has some extra trial time :)"),t.sending=!1,t.$router.push("../")})).catch((function(e){t.error=String(e),t.sending=!1,t.$root.main.setPopup(t.error),t.$router.push("../")}))}}},Wn=Yn,qn=(i("9215"),Object(V["a"])(Wn,Bn,Gn,!1,null,null,null)),Kn=qn.exports,Xn=function(){var t=this,e=t.$createElement,i=t._self._c||e;return!t.project.subscriptionOrgId||t.isTrial?i("SetSubscription",{attrs:{project:t.project,justSelectSubscription:t.isTrial}}):t.store.state.user.isStripeCustomer?i("form",{staticClass:"md-layout",attrs:{novalidate:""},on:{submit:function(e){return e.stopPropagation(),e.preventDefault(),t.submit(e)}}},[i("md-card",{staticClass:"md-layout-item md-size-50 md-small-size-100"},[i("md-card-header",[i("div",{staticClass:"md-title"},[t._v("Activate project")])]),i("md-card-content",[i("p",[t._v("By activating this project, your Credit Card will be billed "+t._s(t.getPeriod())+" for the amount of "),i("b",{staticStyle:{"white-space":"pre"}},[t._v("€ "+t._s(t.getAmount()))]),t._v(".")]),!t.subscription||t.subscription.trialDays>0?[null===t.project.trialDaysLeft?i("p",[t._v("You get a one month trial period and will be first billed one month from now.")]):t.project.trialDaysLeft>0?i("p",[t._v("You still have "+t._s(t.project.trialDaysLeft)+" days left of your trial period, billing will start at "+t._s(t.getDate(t.project.trialEnds))+".")]):t.project.trialDaysLeft<=0?i("p",[t._v("Your trial period for this project is over, billing will be done immediately.")]):t._e()]:t._e(),i("p",[t._v("You can cancel the subscription at any time by deactivating the project.")])],2),t.sending?i("md-progress-bar",{attrs:{"md-mode":"indeterminate"}}):t._e(),i("md-card-actions",[i("md-button",{staticClass:"md-secondary",attrs:{to:"../",disabled:t.sending}},[t._v("Cancel")]),i("md-button",{staticClass:"md-primary md-raised md-active",attrs:{type:"submit",disabled:t.sending}},[t._v("Activate project")])],1)],1)],1):i("SetPaymentSource",{attrs:{redirect:!1}})},Hn=[],Qn=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("md-card",{staticClass:"set-payment md-layout-item md-size-50 md-small-size-100"},[i("md-card-header",[i("div",{staticClass:"md-title"},[t.isNew?i("span",[t._v("Set your payment details")]):i("span",[t._v("Update your payment details")])])]),i("md-card-content",[t.isNew?i("div",[t.store.state.currentOrgId?i("p",[t._v("Click the button below to link your organisation's account to Stripe, our payment provider.")]):i("p",[t._v("Click the button below to link your account to Stripe, our payment provider.")]),i("p",[t._v("At this point, you will not be billed yet.")])]):i("div",[i("p",[t._v("Click the button below to update your payment details for Stripe, our payment provider.")])]),t.sepa?i("md-content",[i("p",[t._v("\r\n\t\t\tBy providing your IBAN and confirming this payment, you are authorizing\r\n\t\t\tMicrio and Stripe, our payment service provider, to send instructions to\r\n\t\t\tyour bank to debit your account and your bank to debit your account in\r\n\t\t\taccordance with those instructions. You are entitled to a refund from\r\n\t\t\tyour bank under the terms and conditions of your agreement with your bank.\r\n\t\t\tA refund must be claimed within 8 weeks starting from the date on which your\r\n\t\t\taccount was debited.")])]):t._e(),i("md-card-content",[t.sepa?i("md-field",[i("div",{staticClass:"form-row"},[i("label",{attrs:{for:"card-name"}},[t._v("Your name")]),i("md-input",{ref:"name",attrs:{type:"text"}})],1)]):t._e(),i("div",{staticClass:"form-row"},[i("label",{attrs:{for:"card-element"}},[t.sepa?i("span",[t._v("Your IBAN account")]):i("span",[t._v("Credit or debit card")])]),i("div",{ref:"stripeElement",attrs:{name:"card-element"}}),i("div",{ref:"cardErrors",attrs:{role:"alert"}})])],1),t.sending?i("md-progress-bar",{attrs:{"md-mode":"indeterminate"}}):t._e(),i("md-card-actions",[i("md-button",{staticClass:"md-secondary",attrs:{to:"../",disabled:t.sending}},[t._v("Cancel")]),i("md-button",{staticClass:"md-primary md-raised md-active",attrs:{disabled:t.sending},on:{click:t.updateCard}},[t.sepa?i("span",[t._v("Select")]):t.isNew?i("span",[t._v("Set your credit card")]):i("span",[t._v("Update your card")])])],1)],1)],1)},Zn=[],ta={props:{redirect:{type:Boolean,default:!0}},data:function(){return{store:T,sending:!1,card:null,sepa:!1}},computed:{isNew:function(){return T.state.organisation?!T.state.organisation.hasStripeSource:!T.state.user.isStripeCustomer}},mounted:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e,i,r=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(T.stripe.api){t.next=6;break}return this.sending=!0,t.next=4,$();case 4:T.stripe.api=t.sent,this.sending=!1;case 6:e=T.stripe.api.elements(),i={style:T.stripe.style},this.sepa&&(i.supportedCountries=["SEPA"]),this.card=e.create(this.sepa?"iban":"card",i),this.card.mount(this.$refs.stripeElement),this.card.addEventListener("change",(function(t){r.$refs.cardErrors.textContent=t.error?t.error.message:""}));case 12:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),methods:{updateCard:function(){var t=this;this.sending=!0,this.sepa?T.stripe.api.createSource(this.card,{type:"sepa_debit",currency:"eur",owner:{name:this.$refs.name.value,email:T.state.user.email},mandate:{notification_method:"email"}}).then((function(t){console.log("got!",t)})):T.stripe.api.createPaymentMethod("card",this.card).then((function(e){e.error?(t.$refs.cardErrors.textContent=e.error.message,t.sending=!1):e.paymentMethod&&b.updatePaymentMethod(e.paymentMethod.id).then(t.userUpdated).catch((function(e){t.sending=!1,t.$root.main.setPopup(String(e))}))}))},userUpdated:function(){this.sending=!1,this.isNew?this.$root.main.setMessage("Succesfully set up your account"):this.$root.main.setMessage("Succesfully updated your card"),this.redirect&&this.$router.push("/"+this.$route.params.organisation+"/payments/")}}},ea=ta,ia=Object(V["a"])(ea,Qn,Zn,!1,null,null,null),ra=ia.exports,na={components:{SetPaymentSource:ra,SetSubscription:In},data:function(){var t=this;return{saved:!1,sending:!1,error:null,project:T.state.projects.find((function(e){return e.slug==t.$route.params.project})),store:T,secret:null,methodId:null}},computed:{subscription:function(){var t=this;return T.state.subscriptions.find((function(e){return e.id==t.project.subscriptionOrgId}))},isTrial:function(){return this.project.subscriptionOrgId==T.state.trialSubId}},methods:{getAmount:function(){var t=this,e=T.state.subscriptions.find((function(e){return e.id==t.project.subscriptionOrgId}));return(e.monthlyAmount/100).toFixed(2)},getPeriod:function(){var t=this,e=T.state.subscriptions.find((function(e){return e.id==t.project.subscriptionOrgId}));return e.paymentInterval+"ly"},getDate:function(t){var e=new Date(t);return e.getDate()+"/"+(e.getMonth()+1)+"/"+e.getFullYear()},submit:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.sending=!0,T.stripe.api){t.next=5;break}return t.next=4,$();case 4:T.stripe.api=t.sent;case 5:b.createSubscription(this.project.id,this.project.subscriptionOrgId,this.project.title).then(this.stripeIntentResult).catch((function(t){return e.errorStatus(e.error=String(t))}));case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),stripeIntentResult:function(t){var e=this;if(t||this.errorStatus(this.error="No valid payment intent found. Please try again later."),"zero-invoice"==t.status)return this.success();if(t.paymentIntent&&(t=t.paymentIntent),t.error)this.errorStatus(this.error=t.error.message);else if(t.subscriptionOrgId)this.success();else switch(t.status){case"succeeded":b.confirmPaymentIntent(t.id,this.project.id).then((function(t){t.subscriptionOrgId?e.success():e.errorStatus(e.error=t.error)})).catch((function(t){return e.errorStatus(e.error=String(t))}));break;case"requires_action":T.stripe.api.handleCardPayment(t.secret).then(this.stripeIntentResult);break;default:this.errorStatus(this.error="Unsuccesful status.. "+t.status)}},success:function(){this.sending=!1,this.$root.main.setMessage("Succesfully activated project!"),this.project.isActive=!0,T.state.user.isStripeCustomer&&this.$router.push("./")},errorStatus:function(){this.sending=!1,this.$root.main.setPopup(this.error)}}},aa=na,sa=(i("8a46"),Object(V["a"])(aa,Xn,Hn,!1,null,null,null)),oa=sa.exports,ca=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("form",{staticClass:"md-layout",attrs:{novalidate:""},on:{submit:function(e){return e.stopPropagation(),e.preventDefault(),t.submit(e)}}},[i("md-card",{staticClass:"md-layout-item md-size-50 md-small-size-100"},[i("md-card-header",[i("div",{staticClass:"md-title"},[t._v('Delete folder "'+t._s(t.folder&&t.folder.title)+'"')])]),i("md-card-content",[i("p",[t._v("If you delete a folder, its images and all subfolders will be "),i("b",[t._v("permanently removed")]),t._v(". There is no undo for this.")]),t.sending?i("p",[t._v("Deleting a folder containing images could take some time, please wait...")]):t._e()]),t.sending?i("md-progress-bar",{attrs:{"md-mode":"indeterminate"}}):t._e(),i("md-card-actions",[i("md-button",{staticClass:"md-secondary",attrs:{to:"./",disabled:t.sending}},[t._v("Cancel")]),i("md-button",{staticClass:"md-primary md-raised md-accent",attrs:{type:"submit",disabled:t.sending}},[t._v("Delete folder")])],1)],1)],1)},ua=[],da={data:function(){var t=this;return{saved:!1,sending:!1,error:null,project:T.state.projects.find((function(e){return e.slug==t.$route.params.project}))}},computed:{path:function(){return this.$route.path.replace(/\/[^/]*$/,"").split("/").slice(4)},folder:function(){var t=this;if(this.path.length){var e=function(){for(var e=t.project.id,i=T.state.folders,r=!1,n=function(n){var a=i.find((function(i){return i.parentId==e&&i.slug==t.path[n]}));if(!a)return"break";e=a.id,r=n==t.path.length-1},a=0;a0?[i("p",[t._v("\r\n\t\t\t\t\tAny uploads and contributions you have made to these "),i("i",[t._v("shared organisations")]),t._v(":\r\n\t\t\t\t")]),i("ul",t._l(t.sharedOrgs,(function(e){return i("li",{key:e.id},[t._v(t._s(e.name))])})),0),i("p",[t._v("\r\n\t\t\t\t\tWill "),i("b",[t._v("not be deleted")]),t._v(", but will be permanently made anonymous.\r\n\t\t\t\t\tPlease contact the respective administrators for additional removal.\r\n\t\t\t\t")])]:t._e(),t.delSending?i("md-progress-bar",{attrs:{"md-mode":"indeterminate"}}):t._e(),i("md-checkbox",{attrs:{disabled:t.submitDisabled},model:{value:t.deleteUnderstand,callback:function(e){t.deleteUnderstand=e},expression:"deleteUnderstand"}},[t._v("I understand that this is permanent")]),i("md-button",{staticClass:"md-accent md-active md-raised md-delete",attrs:{disabled:t.submitDisabled||!t.deleteUnderstand},on:{click:t.deleteMe}},[t._v("Delete your account")])],2)],1)],1)],1)},Na=[],Va={data:function(){return{sending:!1,user:T.state.user,receiveGeneralMails:T.state.user.receiveGeneralMails,receiveMailingList:T.state.user.receiveMailingList,pwSending:!1,currentPassword:"",newPassword1:"",newPassword2:"",currentError:null,new1Error:null,new2Error:null,sharedOrgs:T.state.user.organisations.filter((function(t){return t.isShared})),deleteUnderstand:!1,delSending:!1}},computed:{submitDisabled:function(){return this.pwSending||this.sending||this.delSending}},mounted:function(){T.state.activeTab="tab-profile"},methods:{save:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.receiveGeneralMails==this.user.receiveMailingList&&this.receiveGeneralMails==this.user.receiveGeneralMails){t.next=8;break}return this.sending=!0,t.next=4,b.setMailingPrefs(this.receiveMailingList,this.receiveGeneralMails);case 4:this.$root.main.setMessage("Succesfully updated settings!"),this.user.receiveGeneralMails=this.receiveGeneralMails,this.user.receiveMailingList=this.receiveMailingList,this.sending=!1;case 8:this.$router.push("../");case 9:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),pwSubmit:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.currentError=null,this.new1Error=null,this.new2Error=null,e=null,this.currentPassword.length?this.newPassword1.length?this.newPassword2.length&&this.newPassword2==this.newPassword1||(e="2"):e="1":e="0",null!==e){t.next=11;break}return this.pwSending=!0,t.next=9,b.changePassword(this.currentPassword,this.newPassword1,this.newPassword2);case 9:e=t.sent,this.pwSending=!1;case 11:"ok"===e?(this.$root.main.setMessage("Password succesfully changed!"),this.$router.push("../")):this.printError(e);case 12:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),printError:function(t){switch(t){case"0":this.currentError="Enter your current password";break;case"1":this.new1Error="Enter a new password";break;case"2":this.new2Error="Passwords do not match";break;default:this.currentError=t||"Something went wrong. Try again later."}},deleteMe:function(){var t=this;this.$root.main.confirm("Are you absolutely serious you want to delete your account?").then((function(){t.$root.main.confirm("There is no turning back from this! All your data will be lost. Still proceed?").then((function(){t.$root.main.confirm("One last question: do you want to KEEP your account??").then((function(){return null})).catch(Object(r["a"])(regeneratorRuntime.mark((function e(){var i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.delSending=!0,t.$root.main.setMessage("Removing your account, this could take a while..."),e.next=4,b.deleteAccount();case 4:i=e.sent,t.delSending=!1,"ok"==i?t.$root.main.confirm("Account deletion","Your account was succesfully deleted.","OK",null).then((function(){localStorage.clear(),location.href="/account-deleted"})):t.$root.main.confirm("Account deletion","There was a problem removing your account: "+i,"OK",null);case 7:case"end":return e.stop()}}),e)}))))})).catch((function(){return null}))})).catch((function(){return null}))}}},za=Va,Fa=(i("561b"),Object(V["a"])(za,Ua,Na,!1,null,null,null)),Ja=Fa.exports;n["default"].use(H["a"]);var Ba=new H["a"]({routes:[{path:"/:organisation/",component:Dt,children:[{path:"/",redirect:"projects/",name:"Home"},{path:"profile/",component:Ja},{path:"invitations/",component:ne},{path:"projects/",component:Qt},{path:"projects/create",component:In},{path:"projects/:project/delete",component:Rn},{path:"projects/:project/activate",component:oa},{path:"projects/:project/deactivate",component:Ln},{path:"projects/:project/upgrade",component:Jn},{path:"projects/:project/quote",component:Kn},{path:"projects/:project/:folder(.*)/delete",component:ha},{path:"projects/:project/:folder(.*)/spaces/edit",component:wa},{path:"projects/:project/spaces/edit",component:wa},{path:"projects/:project/edit/:id(\\w{5,8})/:lang(\\w{2})",component:Pr},{path:"projects/:project/*/edit/:id(\\w{5,8})/:lang(\\w{2})",component:Pr},{path:"projects/:project/:offset(\\@\\d*)?",component:hn},{path:"projects/:project/:folder([^\\@]*)/:offset(\\@\\d*)?",component:hn},{path:"payments/",name:"Payments",component:de},{path:"users",name:"Users",component:Ia},{path:"users/add",name:"AddUser",component:Ra},{path:"user/updateCard",name:"UpdateCard",component:ra},{path:"settings",name:"OrganisationSettings",component:La}]},{path:"/e/",component:Dt,children:[{path:":id/:lang",name:"Editor",component:Pr}]},{path:"*",component:it,name:"404"}]});Ba.beforeEach(function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,i,r){var n,a,s,o,c;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!T.state.isEditor){t.next=7;break}if(n=window._dashboard,"/"!=e.path){t.next=6;break}return t.abrupt("return",r("/e/".concat(n.id,"/").concat(n.lang)));case 6:return t.abrupt("return",r());case 7:if(T.state.user){t.next=11;break}return t.next=10,b.getUser();case 10:T.state.user=t.sent;case 11:if(null==Ba.app.editor){t.next=14;break}return t.next=14,Ba.app.editor.save();case 14:if("/"!=e.path){t.next=19;break}return a="s",s=localStorage.getItem("editor_orgId-"+T.state.user.id)||T.state.user.defaultOrganisation||localStorage.getItem("editor_orgId"),s?(o=T.state.user.organisations.find((function(t){return t.id==s})),o&&(a=o.slug)):T.state.showUserPrivateAccount||(c=T.state.user.organisations[0],c&&(a=c.slug)),t.abrupt("return",r("/"+a+"/"));case 19:if("404"==e.name){t.next=24;break}return t.next=22,T.dispatch("organisation",e.params.organisation);case 22:t.next=26;break;case 24:console.warn("Not found!",e),T.state.loaded=!0;case 26:r();case 27:case"end":return t.stop()}}),t)})));return function(e,i,r){return t.apply(this,arguments)}}()),Ba.afterEach((function(t){window.gtag&&window.gtag("config","UA-66335683-13",{anonymize_ip:!0,page_path:t.fullPath})}));var Ga=Ba,Ya=(i("d994"),i("51de"),i("e094"),i("43f9")),Wa=i.n(Ya);function qa(){new n["default"]({router:Ga,render:function(t){return t(X)},data:function(){return{editor:null,main:null}},methods:{getFileSize:function(t){if(!t)return"0MB";for(var e=["B","KB","MB","GB","TB"],i=0;i=1){var r=new Date(t);return"".concat(r.getDate(),"-").concat(r.getMonth()+1,"-").concat(r.getFullYear())}return i=Math.floor(e/86400),i>=1?1==i?"yesterday":"".concat(i," day").concat(1==i?"":"s"," ago"):(i=Math.floor(e/3600),i>=1?"".concat(i," hour").concat(1==i?"":"s"," ago"):(i=Math.floor(e/60),i>=1?"".concat(i," minute").concat(1==i?"":"s"," ago"):"".concat(Math.floor(e)," second").concat(1==i?"":"s"," ago")))},getDuration:function(t){var e=[0,0];while(t>=3600)t-=3600,e[0]++;while(t>=60)t-=60,e[1]++;return(e[0]>0?e[0]+":":"")+e[1]+":"+(t<10?"0":"")+Math.round(t)},getReadable:function(t){var e="";return t.toString().endsWith("1")&&(t--,e="+"),t?t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")+e:"unknown"},createGuid:function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}}}).$mount("#app")}n["default"].config.productionTip=!1,n["default"].use(Wa.a),localStorage.setItem("is-dashboard","1"),h&&36==h.length?fetch(_("/edit-session/start/"+h),{credentials:"include",method:"POST"}).then(function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){var i,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.text();case 2:i=t.sent,e.ok?(T.state.isEditor=!0,r=i.split(","),window._dashboard={id:r[0],lang:r[1]||"en"},qa()):document.body.textContent=i;case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()):qa()},"57d5":function(t,e,i){},"5b56":function(t,e,i){},"5cec":function(t,e,i){},"5d7b":function(t,e,i){},"5eb7":function(t,e,i){"use strict";var r=i("f6e4"),n=i.n(r);n.a},"615d":function(t,e,i){"use strict";var r=i("1be3"),n=i.n(r);n.a},"61c0":function(t,e,i){"use strict";var r=i("0b9e"),n=i.n(r);n.a},6479:function(t,e,i){},6841:function(t,e,i){},"6acf":function(t,e,i){"use strict";var r=i("5d7b"),n=i.n(r);n.a},7171:function(t,e,i){},"77fd":function(t,e,i){},"7faf":function(t,e,i){"use strict";var r=i("8fba"),n=i.n(r);n.a},8388:function(t,e,i){"use strict";var r=i("4370"),n=i.n(r);n.a},"8a29":function(t,e,i){"use strict";var r=i("c008"),n=i.n(r);n.a},"8a46":function(t,e,i){"use strict";var r=i("aaf1"),n=i.n(r);n.a},"8ea9":function(t,e,i){"use strict";var r=i("3c2c"),n=i.n(r);n.a},"8fba":function(t,e,i){},"91e4":function(t,e,i){"use strict";var r=i("977c"),n=i.n(r);n.a},9215:function(t,e,i){"use strict";var r=i("ac55"),n=i.n(r);n.a},"977c":function(t,e,i){},"97ec":function(t,e,i){"use strict";var r=i("a67e"),n=i.n(r);n.a},"9d6d":function(t,e,i){"use strict";var r=i("2398"),n=i.n(r);n.a},"9e35":function(t,e,i){"use strict";var r=i("55ee"),n=i.n(r);n.a},a515:function(t,e,i){"use strict";var r=i("50a5"),n=i.n(r);n.a},a590:function(t,e,i){},a67e:function(t,e,i){},a788:function(t,e,i){"use strict";var r=i("c949"),n=i.n(r);n.a},aaf1:function(t,e,i){},ac55:function(t,e,i){},b572:function(t,e,i){"use strict";var r=i("024c"),n=i.n(r);n.a},ba93:function(t,e,i){},bb93:function(t,e,i){},bbb5:function(t,e,i){"use strict";var r=i("d545"),n=i.n(r);n.a},bdb9:function(t,e,i){"use strict";var r=i("c43d"),n=i.n(r);n.a},bffd:function(t,e,i){},c008:function(t,e,i){},c43d:function(t,e,i){},c7c1:function(t,e,i){},c8d2:function(t,e,i){"use strict";var r=i("ba93"),n=i.n(r);n.a},c949:function(t,e,i){},d545:function(t,e,i){},d646:function(t,e,i){"use strict";var r=i("4ebf"),n=i.n(r);n.a},d97f:function(t,e,i){},d994:function(t,e){},ee37:function(t,e,i){"use strict";var r=i("6841"),n=i.n(r);n.a},f28a:function(t,e,i){"use strict";var r=i("418a"),n=i.n(r);n.a},f6e4:function(t,e,i){},f9ca:function(t,e,i){"use strict";var r=i("7171"),n=i.n(r);n.a},fbbb:function(t,e,i){"use strict";var r=i("6479"),n=i.n(r);n.a},fc24:function(t,e,i){"use strict";var r=i("088b"),n=i.n(r);n.a},fd26:function(t,e,i){}});