diff --git a/public/js/collections.js b/public/js/collections.js index eff541662..f4e3b5c97 100644 --- a/public/js/collections.js +++ b/public/js/collections.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{"+BJ4":function(t,e,n){"use strict";n("rvdV")},14:function(t,e,n){t.exports=n("ntcu")},"9tPo":function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,o=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var i,r=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)?t:(i=0===r.indexOf("//")?r:0===r.indexOf("/")?n+r:o+r.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},BzCV:function(t,e,n){"use strict";n.r(e);var o=n("la7V");function i(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n=e)swal("Error","You can only add "+e+" posts per collection","error");else{var o=this.photoId,r=window.location.origin,s=o.split("/");o.slice(0,r.length)!==r&&(swal("Invalid URL","You can only add posts from this instance","error"),this.photoId=""),o.slice(0,r.length+3)===r+"/p/"&&6===s.length||(swal("Invalid URL","Invalid URL","error"),this.photoId=""),axios.post("/api/local/collection/item",{collection_id:this.collectionId,post_id:s[5]}).then((function(t){var e;(e=n.ids).push.apply(e,i(s[5]))})).catch((function(e){swal("Invalid URL","The post you entered was invalid","error"),t.photoId=""})),n.$refs.addPhotoModal.hide(),window.location.reload()}},editCollection:function(){this.$refs.editModal.show()},deleteCollection:function(){0!=this.owner&&(window.confirm("Are you sure you want to delete this collection?")&&axios.delete("/api/local/collection/"+this.collectionId).then((function(t){window.location.href="/"})))},updateCollection:function(){this.$refs.editModal.hide(),axios.post("/api/local/collection/"+this.collectionId,{title:this.title,description:this.description,visibility:this.visibility}).then((function(t){console.log(t.data)}))},showEditPhotosModal:function(){this.$refs.editModal.hide(),this.$refs.editPhotosModal.show()},markPhotoForDeletion:function(t){-1==this.markedForDeletion.indexOf(t)?this.markedForDeletion.push(t):this.markedForDeletion=this.markedForDeletion.filter((function(e){return e!=t}))},confirmDeletion:function(){var t=this,e=this;window.confirm("Are you sure you want to delete this?")&&(this.markedForDeletion.forEach((function(n){axios.delete("/api/local/collection/item",{params:{collection_id:e.collectionId,post_id:n}}).then((function(o){e.removeItem(n),t.$refs.editPhotosModal.hide()})).catch((function(t){swal("Oops!","An error occured with your request, please try again later.","error")}))})),this.markedForDeletion=[])},removeItem:function(t){this.posts=this.posts.filter((function(e){return e.id!=t}))},addRecentId:function(t){var e=this;axios.post("/api/local/collection/item",{collection_id:this.collectionId,post_id:t.id}).then((function(t){window.location.reload()})).catch((function(t){swal("Oops!","An error occured, please try selecting another post.","error"),e.photoId=""}))}}},a=(n("+BJ4"),n("KHd+")),l=Object(a.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"w-100 h-100"},[t.loaded?t._e():n("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{height:"80vh"}},[n("img",{attrs:{src:"/img/pixelfed-icon-grey.svg"}})]),t._v(" "),t.loaded?n("div",{staticClass:"row mt-3"},[n("div",{staticClass:"col-12 p-0 mb-3"},[n("picture",{staticClass:"d-flex align-items-center justify-content-center"},[n("div",{staticClass:"dims"}),t._v(" "),n("div",{staticClass:"text-white",staticStyle:{"z-index":"500",position:"absolute"}},[n("p",{staticClass:"display-4 text-center pt-3"},[t._v(t._s(t.title||"Untitled Collection"))]),t._v(" "),n("p",{staticClass:"lead text-center mb-3"},[t._v(t._s(t.description))]),t._v(" "),n("p",{staticClass:"text-center"},[t._v("\n\t\t\t\t\t\t"+t._s(t.posts.length)+" photos · by "),n("a",{staticClass:"font-weight-bold text-white",attrs:{href:"/"+t.profileUsername}},[t._v(t._s(t.profileUsername))])]),t._v(" "),1==t.owner?n("p",{staticClass:"pt-3 text-center"},[n("span",[n("button",{staticClass:"btn btn-outline-light btn-sm",attrs:{onclick:"this.blur();"},on:{click:function(e){return e.preventDefault(),t.addToCollection.apply(null,arguments)}}},[0==t.loadingPostList?n("span",[t._v("Add Photo")]):n("span",{staticClass:"px-4"},[t._m(0)])]),t._v("\n\t\t\t\t\t\t\t     \n\t\t\t\t\t\t\t"),n("button",{staticClass:"btn btn-outline-light btn-sm",attrs:{onclick:"this.blur();"},on:{click:function(e){return e.preventDefault(),t.editCollection.apply(null,arguments)}}},[t._v("Edit")]),t._v("\n\t\t\t\t\t\t\t     \n\t\t\t\t\t\t\t"),n("button",{staticClass:"btn btn-outline-light btn-sm",on:{click:function(e){return e.preventDefault(),t.deleteCollection.apply(null,arguments)}}},[t._v("Delete")])])]):t._e()]),t._v(" "),n("img",{staticStyle:{width:"100%",height:"600px","object-fit":"cover"},attrs:{src:t.previewUrl(t.posts[0]),alt:""}})])]),t._v(" "),n("div",{staticClass:"col-12 p-0"},[n("masonry",{attrs:{cols:{default:2,700:2,400:1},gutter:{default:"5px"}}},t._l(t.posts,(function(e,o){return n("div",[n("a",{staticClass:"card info-overlay card-md-border-0 mb-1",attrs:{href:e.url}},[n("img",{staticClass:"img-fluid w-100",attrs:{src:t.previewUrl(e)}})])])})),0)],1)]):t._e(),t._v(" "),n("b-modal",{ref:"editModal",attrs:{id:"edit-modal","hide-footer":"",centered:"",title:"Edit Collection","body-class":""}},[n("form",[n("div",{staticClass:"form-group"},[n("label",{staticClass:"font-weight-bold text-muted",attrs:{for:"title"}},[t._v("Title")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.title,expression:"title"}],staticClass:"form-control",attrs:{type:"text",id:"title",placeholder:"Untitled Collection"},domProps:{value:t.title},on:{input:function(e){e.target.composing||(t.title=e.target.value)}}})]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{staticClass:"font-weight-bold text-muted",attrs:{for:"description"}},[t._v("Description")]),t._v(" "),n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.description,expression:"description"}],staticClass:"form-control",attrs:{id:"description",placeholder:"Add a description here ...",rows:"3"},domProps:{value:t.description},on:{input:function(e){e.target.composing||(t.description=e.target.value)}}})]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{staticClass:"font-weight-bold text-muted",attrs:{for:"visibility"}},[t._v("Visibility")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.visibility,expression:"visibility"}],staticClass:"custom-select",on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.visibility=e.target.multiple?n:n[0]}}},[n("option",{attrs:{value:"public"}},[t._v("Public")]),t._v(" "),n("option",{attrs:{value:"private"}},[t._v("Followers Only")])])]),t._v(" "),n("div",{staticClass:"d-flex justify-content-between align-items-center pt-3"},[n("a",{staticClass:"text-primary font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showEditPhotosModal.apply(null,arguments)}}},[t._v("Edit Photos")]),t._v(" "),n("button",{staticClass:"btn btn-primary btn-sm py-1 font-weight-bold px-3 float-right",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.updateCollection.apply(null,arguments)}}},[t._v("Save")])])])]),t._v(" "),n("b-modal",{ref:"addPhotoModal",attrs:{id:"add-photo-modal","hide-footer":"",centered:"",title:"Add Photo","body-class":"m-3"}},[n("div",{staticClass:"form-group"},[n("label",{staticClass:"font-weight-bold text-muted",attrs:{for:"title"}},[t._v("Add Recent Post")]),t._v(" "),t.postsList.length>0?n("div",{staticClass:"row m-1"},[t._l(t.postsList,(function(e,o){return n("div",{key:"postList-"+o,staticClass:"col-4 p-1 cursor-pointer",on:{click:function(n){return t.addRecentId(e)}}},[n("div",{staticClass:"square"},[n("div",{staticClass:"square-content",style:"background-image: url("+e.media_attachments[0].url+");"})])])})),t._v(" "),n("div",{staticClass:"col-12"},[n("hr")])],2):t._e()]),t._v(" "),n("form",[n("div",{staticClass:"form-group"},[n("label",{staticClass:"font-weight-bold text-muted",attrs:{for:"title"}},[t._v("Add Post by URL")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.photoId,expression:"photoId"}],staticClass:"form-control",attrs:{type:"text",placeholder:"https://pixelfed.dev/p/admin/1"},domProps:{value:t.photoId},on:{input:function(e){e.target.composing||(t.photoId=e.target.value)}}}),t._v(" "),n("p",{staticClass:"help-text small text-muted"},[t._v("Only local, public posts can be added")])]),t._v(" "),n("button",{staticClass:"btn btn-primary btn-sm py-1 font-weight-bold px-3 float-right",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.pushId.apply(null,arguments)}}},[t.addingPostToCollection?n("span",{staticClass:"px-4"},[n("div",{staticClass:"spinner-border spinner-border-sm",attrs:{role:"status"}},[n("span",{staticClass:"sr-only"},[t._v("Loading...")])])]):n("span",[t._v("\n\t\t\t\t\tAdd Photo\n\t\t\t\t")])])])]),t._v(" "),n("b-modal",{ref:"editPhotosModal",attrs:{id:"edit-photos-modal","hide-footer":"",centered:"",title:"Edit Collection Photos","body-class":"m-3"}},[n("div",{staticClass:"form-group"},[n("p",{staticClass:"font-weight-bold text-dark text-center"},[t._v("Select a Photo to Delete")]),t._v(" "),t.posts.length>0?n("div",{staticClass:"row m-1 scrollbar-hidden",staticStyle:{"max-height":"350px","overflow-y":"auto"}},t._l(t.posts,(function(e,o){return n("div",{key:"plm-"+o,staticClass:"col-4 p-1 cursor-pointer"},[n("div",{class:[-1==t.markedForDeletion.indexOf(e.id)?"square":"square delete-border"],on:{click:function(n){return t.markPhotoForDeletion(e.id)}}},[n("div",{staticClass:"square-content",style:"background-image: url("+e.media_attachments[0].url+");"})])])})),0):t._e(),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.markedForDeletion.length>0,expression:"markedForDeletion.length > 0"}]},[n("button",{staticClass:"btn btn-primary font-weight-bold py-0 btn-block mb-0 mt-4",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.confirmDeletion.apply(null,arguments)}}},[t._v("Delete "+t._s(t.markedForDeletion.length)+" "+t._s(1==t.markedForDeletion.length?"photo":"photos"))])])])])],1)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"spinner-border spinner-border-sm",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])}],!1,null,"77a83cb3",null);e.default=l.exports},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"==typeof btoa){var i=(s=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),r=o.sources.map((function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"}));return[n].concat(r).concat([i]).join("\n")}var s;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},i=0;i=0&&u.splice(e,1)}function b(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var o=function(){0;return n.nc}();o&&(t.attrs.nonce=o)}return y(e,t.attrs),v(t,e),e}function y(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function g(t,e){var n,o,i,r;if(e.transform&&t.css){if(!(r="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=r}if(e.singleton){var s=d++;n=c||(c=b(e)),o=_.bind(null,n,s,!1),i=_.bind(null,n,s,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),v(t,e),e}(e),o=I.bind(null,n,e),i=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=b(e),o=x.bind(null,n),i=function(){m(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=s()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=h(t,e);return f(n,e),function(t){for(var o=[],i=0;i-1)return t;if("object"!=typeof t)return 0;var n=1/0,o=t.default||0;for(var i in t){var r=parseInt(i),s=t[r],a=parseInt(s);if(!isNaN(r)&&!isNaN(a))e<=r&&rt.length)&&(e=t.length);for(var n=0,o=new Array(e);n=e)swal("Error","You can only add "+e+" posts per collection","error");else{var o=this.photoId,r=window.location.origin,s=o.split("/");o.slice(0,r.length)!==r&&(swal("Invalid URL","You can only add posts from this instance","error"),this.photoId=""),o.slice(0,r.length+3)===r+"/p/"&&6===s.length||(swal("Invalid URL","Invalid URL","error"),this.photoId=""),axios.post("/api/local/collection/item",{collection_id:this.collectionId,post_id:s[5]}).then((function(t){var e;(e=n.ids).push.apply(e,i(s[5]))})).catch((function(e){swal("Invalid URL","The post you entered was invalid","error"),t.photoId=""})),n.$refs.addPhotoModal.hide(),window.location.reload()}},editCollection:function(){this.$refs.editModal.show()},deleteCollection:function(){0!=this.owner&&(window.confirm("Are you sure you want to delete this collection?")&&axios.delete("/api/local/collection/"+this.collectionId).then((function(t){window.location.href="/"})))},publishCollection:function(){0!=this.owner&&(window.confirm("Are you sure you want to publish this collection?")&&axios.post("/api/local/collection/"+this.collectionId+"/publish",{title:this.title,description:this.description,visibility:this.visibility}).then((function(t){window.location.href="/"})))},updateCollection:function(){this.$refs.editModal.hide(),axios.post("/api/local/collection/"+this.collectionId,{title:this.title,description:this.description,visibility:this.visibility}).then((function(t){console.log(t.data)}))},showEditPhotosModal:function(){this.$refs.editModal.hide(),this.$refs.editPhotosModal.show()},markPhotoForDeletion:function(t){-1==this.markedForDeletion.indexOf(t)?this.markedForDeletion.push(t):this.markedForDeletion=this.markedForDeletion.filter((function(e){return e!=t}))},confirmDeletion:function(){var t=this,e=this;window.confirm("Are you sure you want to delete this?")&&(this.markedForDeletion.forEach((function(n){axios.delete("/api/local/collection/item",{params:{collection_id:e.collectionId,post_id:n}}).then((function(o){e.removeItem(n),t.$refs.editPhotosModal.hide()})).catch((function(t){swal("Oops!","An error occured with your request, please try again later.","error")}))})),this.markedForDeletion=[])},removeItem:function(t){this.posts=this.posts.filter((function(e){return e.id!=t}))},addRecentId:function(t){var e=this;axios.post("/api/local/collection/item",{collection_id:this.collectionId,post_id:t.id}).then((function(t){window.location.reload()})).catch((function(t){swal("Oops!","An error occured, please try selecting another post.","error"),e.photoId=""}))}}},a=(n("Rcsp"),n("KHd+")),l=Object(a.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"w-100 h-100"},[t.loaded?t._e():n("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{height:"80vh"}},[n("img",{attrs:{src:"/img/pixelfed-icon-grey.svg"}})]),t._v(" "),t.loaded?n("div",{staticClass:"row mt-3"},[n("div",{staticClass:"col-12 p-0 mb-3"},[n("picture",{staticClass:"d-flex align-items-center justify-content-center"},[n("div",{staticClass:"dims"}),t._v(" "),n("div",{staticClass:"text-white",staticStyle:{"z-index":"500",position:"absolute"}},[n("p",{staticClass:"display-4 text-center pt-3"},[t._v(t._s(t.title||"Untitled Collection"))]),t._v(" "),n("p",{staticClass:"lead text-center mb-3"},[t._v(t._s(t.description))]),t._v(" "),n("p",{staticClass:"text-center"},[t._v("\n\t\t\t\t\t\t"+t._s(t.posts.length)+" photos · by "),n("a",{staticClass:"font-weight-bold text-white",attrs:{href:"/"+t.profileUsername}},[t._v(t._s(t.profileUsername))])]),t._v(" "),1==t.owner?n("p",{staticClass:"pt-3 text-center"},[n("span",[n("button",{staticClass:"btn btn-outline-light btn-sm",attrs:{onclick:"this.blur();"},on:{click:function(e){return e.preventDefault(),t.addToCollection.apply(null,arguments)}}},[0==t.loadingPostList?n("span",[t._v("Add Photo")]):n("span",{staticClass:"px-4"},[t._m(0)])]),t._v("\n\t\t\t\t\t\t\t     \n\t\t\t\t\t\t\t"),n("button",{staticClass:"btn btn-outline-light btn-sm",attrs:{onclick:"this.blur();"},on:{click:function(e){return e.preventDefault(),t.editCollection.apply(null,arguments)}}},[t._v("Edit")]),t._v("\n\t\t\t\t\t\t\t     \n\t\t\t\t\t\t\t"),n("button",{staticClass:"btn btn-outline-light btn-sm",on:{click:function(e){return e.preventDefault(),t.deleteCollection.apply(null,arguments)}}},[t._v("Delete")])])]):t._e()]),t._v(" "),n("img",{staticStyle:{width:"100%",height:"600px","object-fit":"cover"},attrs:{src:t.previewUrl(t.posts[0]),alt:""}})])]),t._v(" "),n("div",{staticClass:"col-12 p-0"},[n("masonry",{attrs:{cols:{default:2,700:2,400:1},gutter:{default:"5px"}}},t._l(t.posts,(function(e,o){return n("div",[n("a",{staticClass:"card info-overlay card-md-border-0 mb-1",attrs:{href:e.url}},[n("img",{staticClass:"img-fluid w-100",attrs:{src:t.previewUrl(e)}})])])})),0)],1)]):t._e(),t._v(" "),n("b-modal",{ref:"editModal",attrs:{id:"edit-modal","hide-footer":"",centered:"",title:"Edit Collection","body-class":""}},[n("form",[n("div",{staticClass:"form-group"},[n("label",{staticClass:"font-weight-bold text-muted",attrs:{for:"title"}},[t._v("Title")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.title,expression:"title"}],staticClass:"form-control",attrs:{type:"text",id:"title",placeholder:"Untitled Collection"},domProps:{value:t.title},on:{input:function(e){e.target.composing||(t.title=e.target.value)}}})]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{staticClass:"font-weight-bold text-muted",attrs:{for:"description"}},[t._v("Description")]),t._v(" "),n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.description,expression:"description"}],staticClass:"form-control",attrs:{id:"description",placeholder:"Add a description here ...",rows:"3"},domProps:{value:t.description},on:{input:function(e){e.target.composing||(t.description=e.target.value)}}})]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{staticClass:"font-weight-bold text-muted",attrs:{for:"visibility"}},[t._v("Visibility")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.visibility,expression:"visibility"}],staticClass:"custom-select",on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.visibility=e.target.multiple?n:n[0]}}},[n("option",{attrs:{value:"public"}},[t._v("Public")]),t._v(" "),n("option",{attrs:{value:"private"}},[t._v("Followers Only")])])]),t._v(" "),n("div",{staticClass:"d-flex justify-content-between align-items-center pt-3"},[n("a",{staticClass:"text-primary font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showEditPhotosModal.apply(null,arguments)}}},[t._v("\n\t\t\t\t\tEdit Photos\n\t\t\t\t")]),t._v(" "),t.collection.published_at?n("div",[n("button",{staticClass:"btn btn-primary btn-sm py-1 font-weight-bold px-3 float-right",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.updateCollection.apply(null,arguments)}}},[t._v("\n\t\t\t\t\t\tSave\n\t\t\t\t\t")])]):n("div",{staticClass:"float-right"},[n("button",{staticClass:"btn btn-outline-primary btn-sm py-1 font-weight-bold px-3",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.publishCollection.apply(null,arguments)}}},[t._v("\n\t\t\t\t\t\tPublish\n\t\t\t\t\t")]),t._v(" "),n("button",{staticClass:"btn btn-primary btn-sm py-1 font-weight-bold px-3",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.updateCollection.apply(null,arguments)}}},[t._v("\n\t\t\t\t\t\tSave\n\t\t\t\t\t")])])])])]),t._v(" "),n("b-modal",{ref:"addPhotoModal",attrs:{id:"add-photo-modal","hide-footer":"",centered:"",title:"Add Photo","body-class":"m-3"}},[n("div",{staticClass:"form-group"},[n("label",{staticClass:"font-weight-bold text-muted",attrs:{for:"title"}},[t._v("Add Recent Post")]),t._v(" "),t.postsList.length>0?n("div",{staticClass:"row m-1"},[t._l(t.postsList,(function(e,o){return n("div",{key:"postList-"+o,staticClass:"col-4 p-1 cursor-pointer",on:{click:function(n){return t.addRecentId(e)}}},[n("div",{staticClass:"square"},[n("div",{staticClass:"square-content",style:"background-image: url("+e.media_attachments[0].url+");"})])])})),t._v(" "),n("div",{staticClass:"col-12"},[n("hr")])],2):t._e()]),t._v(" "),n("form",[n("div",{staticClass:"form-group"},[n("label",{staticClass:"font-weight-bold text-muted",attrs:{for:"title"}},[t._v("Add Post by URL")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.photoId,expression:"photoId"}],staticClass:"form-control",attrs:{type:"text",placeholder:"https://pixelfed.dev/p/admin/1"},domProps:{value:t.photoId},on:{input:function(e){e.target.composing||(t.photoId=e.target.value)}}}),t._v(" "),n("p",{staticClass:"help-text small text-muted"},[t._v("Only local, public posts can be added")])]),t._v(" "),n("button",{staticClass:"btn btn-primary btn-sm py-1 font-weight-bold px-3 float-right",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.pushId.apply(null,arguments)}}},[t.addingPostToCollection?n("span",{staticClass:"px-4"},[n("div",{staticClass:"spinner-border spinner-border-sm",attrs:{role:"status"}},[n("span",{staticClass:"sr-only"},[t._v("Loading...")])])]):n("span",[t._v("\n\t\t\t\t\tAdd Photo\n\t\t\t\t")])])])]),t._v(" "),n("b-modal",{ref:"editPhotosModal",attrs:{id:"edit-photos-modal","hide-footer":"",centered:"",title:"Edit Collection Photos","body-class":"m-3"}},[n("div",{staticClass:"form-group"},[n("p",{staticClass:"font-weight-bold text-dark text-center"},[t._v("Select a Photo to Delete")]),t._v(" "),t.posts.length>0?n("div",{staticClass:"row m-1 scrollbar-hidden",staticStyle:{"max-height":"350px","overflow-y":"auto"}},t._l(t.posts,(function(e,o){return n("div",{key:"plm-"+o,staticClass:"col-4 p-1 cursor-pointer"},[n("div",{class:[-1==t.markedForDeletion.indexOf(e.id)?"square":"square delete-border"],on:{click:function(n){return t.markPhotoForDeletion(e.id)}}},[n("div",{staticClass:"square-content",style:"background-image: url("+e.media_attachments[0].url+");"})])])})),0):t._e(),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.markedForDeletion.length>0,expression:"markedForDeletion.length > 0"}]},[n("button",{staticClass:"btn btn-primary font-weight-bold py-0 btn-block mb-0 mt-4",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.confirmDeletion.apply(null,arguments)}}},[t._v("Delete "+t._s(t.markedForDeletion.length)+" "+t._s(1==t.markedForDeletion.length?"photo":"photos"))])])])])],1)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"spinner-border spinner-border-sm",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])}],!1,null,"fff8063a",null);e.default=l.exports},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"==typeof btoa){var i=(s=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),r=o.sources.map((function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"}));return[n].concat(r).concat([i]).join("\n")}var s;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},i=0;i=0&&u.splice(e,1)}function b(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var o=function(){0;return n.nc}();o&&(t.attrs.nonce=o)}return y(e,t.attrs),v(t,e),e}function y(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function g(t,e){var n,o,i,r;if(e.transform&&t.css){if(!(r="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=r}if(e.singleton){var s=d++;n=c||(c=b(e)),o=_.bind(null,n,s,!1),i=_.bind(null,n,s,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),v(t,e),e}(e),o=I.bind(null,n,e),i=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=b(e),o=x.bind(null,n),i=function(){m(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=s()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=h(t,e);return f(n,e),function(t){for(var o=[],i=0;i-1)return t;if("object"!=typeof t)return 0;var n=1/0,o=t.default||0;for(var i in t){var r=parseInt(i),s=t[r],a=parseInt(s);if(!isNaN(r)&&!isNaN(a))e<=r&&r>>0,o=arguments[1],a=0;a container for the click");i.selectItemAtIndex(n.getAttribute("data-index"),e),i.hideMenu()}else i.current.element&&!i.current.externalTrigger&&(i.current.externalTrigger=!1,setTimeout((function(){return i.hideMenu()})))}},{key:"keyup",value:function(t,e){if(t.inputEvent&&(t.inputEvent=!1),t.updateSelection(this),27!==e.keyCode){if(!t.tribute.allowSpaces&&t.tribute.hasTrailingSpace)return t.tribute.hasTrailingSpace=!1,t.commandEvent=!0,void t.callbacks().space(e,this);if(!t.tribute.isActive)if(t.tribute.autocompleteMode)t.callbacks().triggerChar(e,this,"");else{var i=t.getKeyCode(t,this,e);if(isNaN(i)||!i)return;var n=t.tribute.triggers().find((function(t){return t.charCodeAt(0)===i}));void 0!==n&&t.callbacks().triggerChar(e,this,n)}t.tribute.current.mentionText.length=o.current.collection.menuShowMinLength&&o.inputEvent&&o.showMenuFor(i,!0)},enter:function(e,i){t.tribute.isActive&&t.tribute.current.filteredItems&&(e.preventDefault(),e.stopPropagation(),setTimeout((function(){t.tribute.selectItemAtIndex(t.tribute.menuSelected,e),t.tribute.hideMenu()}),0))},escape:function(e,i){t.tribute.isActive&&(e.preventDefault(),e.stopPropagation(),t.tribute.isActive=!1,t.tribute.hideMenu())},tab:function(e,i){t.callbacks().enter(e,i)},space:function(e,i){t.tribute.isActive&&(t.tribute.spaceSelectsMatch?t.callbacks().enter(e,i):t.tribute.allowSpaces||(e.stopPropagation(),setTimeout((function(){t.tribute.hideMenu(),t.tribute.isActive=!1}),0)))},up:function(e,i){if(t.tribute.isActive&&t.tribute.current.filteredItems){e.preventDefault(),e.stopPropagation();var n=t.tribute.current.filteredItems.length,o=t.tribute.menuSelected;n>o&&o>0?(t.tribute.menuSelected--,t.setActiveLi()):0===o&&(t.tribute.menuSelected=n-1,t.setActiveLi(),t.tribute.menu.scrollTop=t.tribute.menu.scrollHeight)}},down:function(e,i){if(t.tribute.isActive&&t.tribute.current.filteredItems){e.preventDefault(),e.stopPropagation();var n=t.tribute.current.filteredItems.length-1,o=t.tribute.menuSelected;n>o?(t.tribute.menuSelected++,t.setActiveLi()):n===o&&(t.tribute.menuSelected=0,t.setActiveLi(),t.tribute.menu.scrollTop=0)}},delete:function(e,i){t.tribute.isActive&&t.tribute.current.mentionText.length<1?t.tribute.hideMenu():t.tribute.isActive&&t.tribute.showMenuFor(i)}}}},{key:"setActiveLi",value:function(t){var e=this.tribute.menu.querySelectorAll("li"),i=e.length>>>0;t&&(this.tribute.menuSelected=parseInt(t));for(var n=0;ns.bottom){var r=a.bottom-s.bottom;this.tribute.menu.scrollTop+=r}else if(a.topn.width&&(o.left||o.right),s=window.innerHeight>n.height&&(o.top||o.bottom);(a||s)&&(i.tribute.menu.style.cssText="display: none",i.positionMenuAtCaret(t))}),0)}else this.tribute.menu.style.cssText="display: none"}},{key:"selectElement",value:function(t,e,i){var n,o=t;if(e)for(var a=0;a=0&&(e=n.substring(0,o))}}else{var a=this.tribute.current.element;if(a){var s=a.selectionStart;a.value&&s>=0&&(e=a.value.substring(0,s))}}return e}},{key:"getLastWordInText",value:function(t){var e=(t=t.replace(/\u00A0/g," ")).split(/\s+/);return e[e.length-1].trim()}},{key:"getTriggerInfo",value:function(t,e,i,n,o){var a,s,r,l=this,c=this.tribute.current;if(this.isContentEditable(c.element)){var d=this.getContentEditableSelectedPath(c);d&&(a=d.selected,s=d.path,r=d.offset)}else a=this.tribute.current.element;var u=this.getTextPrecedingCurrentSelection(),p=this.getLastWordInText(u);if(o)return{mentionPosition:u.length-p.length,mentionText:p,mentionSelectedElement:a,mentionSelectedPath:s,mentionSelectedOffset:r};if(null!=u){var h,m=-1;if(this.tribute.collection.forEach((function(t){var e=t.trigger,n=t.requireLeadingSpace?l.lastIndexWithLeadingSpace(u,e):u.lastIndexOf(e);n>m&&(m=n,h=e,i=t.requireLeadingSpace)})),m>=0&&(0===m||!i||/[\xA0\s]/g.test(u.substring(m-1,m)))){var f=u.substring(m+h.length,u.length);h=u.substring(m,m+h.length);var g=f.substring(0,1),v=f.length>0&&(" "===g||" "===g);e&&(f=f.trim());var b=n?/[^\S ]/g:/[\xA0\s]/g;if(this.tribute.hasTrailingSpace=b.test(f),!v&&(t||!b.test(f)))return{mentionPosition:m,mentionText:f,mentionSelectedElement:a,mentionSelectedPath:s,mentionSelectedOffset:r,mentionTriggerChar:h}}}}},{key:"lastIndexWithLeadingSpace",value:function(t,e){for(var i=t.split("").reverse().join(""),n=-1,o=0,a=t.length;o=0;c--)if(e[c]!==i[o-c]){l=!1;break}if(l&&(s||r)){n=t.length-1-o;break}}return n}},{key:"isContentEditable",value:function(t){return"INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName}},{key:"isMenuOffScreen",value:function(t,e){var i=window.innerWidth,n=window.innerHeight,o=document.documentElement,a=(window.pageXOffset||o.scrollLeft)-(o.clientLeft||0),s=(window.pageYOffset||o.scrollTop)-(o.clientTop||0),r="number"==typeof t.top?t.top:s+n-t.bottom-e.height,l="number"==typeof t.right?t.right:t.left+e.width,c="number"==typeof t.bottom?t.bottom:t.top+e.height,d="number"==typeof t.left?t.left:a+i-t.right-e.width;return{top:rMath.ceil(a+i),bottom:c>Math.ceil(s+n),left:dparseInt(s.height)&&(a.overflowY="scroll")):a.overflow="hidden",o.textContent=t.value.substring(0,e),"INPUT"===t.nodeName&&(o.textContent=o.textContent.replace(/\s/g," "));var r=this.getDocument().createElement("span");r.textContent=t.value.substring(e)||".",o.appendChild(r);var l=t.getBoundingClientRect(),c=document.documentElement,d=(window.pageXOffset||c.scrollLeft)-(c.clientLeft||0),u=(window.pageYOffset||c.scrollTop)-(c.clientTop||0),p=0,h=0;this.menuContainerIsBody&&(p=l.top,h=l.left);var m={top:p+u+r.offsetTop+parseInt(s.borderTopWidth)+parseInt(s.fontSize)-t.scrollTop,left:h+d+r.offsetLeft+parseInt(s.borderLeftWidth)},f=window.innerWidth,g=window.innerHeight,v=this.getMenuDimensions(),b=this.isMenuOffScreen(m,v);b.right&&(m.right=f-m.left,m.left="auto");var w=this.tribute.menuContainer?this.tribute.menuContainer.offsetHeight:this.getDocument().body.offsetHeight;if(b.bottom){var y=w-(g-(this.tribute.menuContainer?this.tribute.menuContainer.getBoundingClientRect():this.getDocument().body.getBoundingClientRect()).top);m.bottom=y+(g-l.top-r.offsetTop),m.top="auto"}return(b=this.isMenuOffScreen(m,v)).left&&(m.left=f>v.width?d+f-v.width:d,delete m.right),b.top&&(m.top=g>v.height?u+g-v.height:u,delete m.bottom),this.getDocument().body.removeChild(o),m}},{key:"getContentEditableCaretPosition",value:function(t){var e,i=this.getWindowSelection();(e=this.getDocument().createRange()).setStart(i.anchorNode,t),e.setEnd(i.anchorNode,t),e.collapse(!1);var n=e.getBoundingClientRect(),o=document.documentElement,a=(window.pageXOffset||o.scrollLeft)-(o.clientLeft||0),s=(window.pageYOffset||o.scrollTop)-(o.clientTop||0),r={left:n.left+a,top:n.top+n.height+s},l=window.innerWidth,c=window.innerHeight,d=this.getMenuDimensions(),u=this.isMenuOffScreen(r,d);u.right&&(r.left="auto",r.right=l-n.left-a);var p=this.tribute.menuContainer?this.tribute.menuContainer.offsetHeight:this.getDocument().body.offsetHeight;if(u.bottom){var h=p-(c-(this.tribute.menuContainer?this.tribute.menuContainer.getBoundingClientRect():this.getDocument().body.getBoundingClientRect()).top);r.top="auto",r.bottom=h+(c-n.top)}return(u=this.isMenuOffScreen(r,d)).left&&(r.left=l>d.width?a+l-d.width:a,delete r.right),u.top&&(r.top=c>d.height?s+c-d.height:s,delete r.bottom),this.menuContainerIsBody||(r.left=r.left?r.left-this.tribute.menuContainer.offsetLeft:r.left,r.top=r.top?r.top-this.tribute.menuContainer.offsetTop:r.top),r}},{key:"scrollIntoView",value:function(t){var e,i=this.menu;if(void 0!==i){for(;void 0===e||0===e.height;)if(0===(e=i.getBoundingClientRect()).height&&(void 0===(i=i.childNodes[0])||!i.getBoundingClientRect))return;var n=e.top,o=n+e.height;if(n<0)window.scrollTo(0,window.pageYOffset+e.top-20);else if(o>window.innerHeight){var a=window.pageYOffset+e.top-20;a-window.pageYOffset>100&&(a=window.pageYOffset+100);var s=window.pageYOffset-(window.innerHeight-o);s>a&&(s=a),window.scrollTo(0,s)}}}},{key:"menuContainerIsBody",get:function(){return this.tribute.menuContainer===document.body||!this.tribute.menuContainer}}]),e}(),r=function(){function e(i){t(this,e),this.tribute=i,this.tribute.search=this}return i(e,[{key:"simpleFilter",value:function(t,e){var i=this;return e.filter((function(e){return i.test(t,e)}))}},{key:"test",value:function(t,e){return null!==this.match(t,e)}},{key:"match",value:function(t,e,i){i=i||{},e.length;var n=i.pre||"",o=i.post||"",a=i.caseSensitive&&e||e.toLowerCase();if(i.skip)return{rendered:e,score:0};t=i.caseSensitive&&t||t.toLowerCase();var s=this.traverse(a,t,0,0,[]);return s?{rendered:this.render(e,s.cache,n,o),score:s.score}:null}},{key:"traverse",value:function(t,e,i,n,o){if(e.length===n)return{score:this.calculateScore(o),cache:o.slice()};if(!(t.length===i||e.length-n>t.length-i)){for(var a,s,r=e[n],l=t.indexOf(r,i);l>-1;){if(o.push(l),s=this.traverse(t,e,l+1,n+1,o),o.pop(),!s)return a;(!a||a.score0&&(t[o-1]+1===n?i+=i+1:i=1),e+=i})),e}},{key:"render",value:function(t,e,i,n){var o=t.substring(0,e[0]);return e.forEach((function(a,s){o+=i+t[a]+n+t.substring(a+1,e[s+1]?e[s+1]:t.length)})),o}},{key:"filter",value:function(t,e,i){var n=this;return i=i||{},e.reduce((function(e,o,a,s){var r=o;i.extract&&((r=i.extract(o))||(r=""));var l=n.match(t,r,i);return null!=l&&(e[e.length]={string:l.rendered,score:l.score,index:a,original:o}),e}),[]).sort((function(t,e){return e.score-t.score||t.index-e.index}))}}]),e}();return function(){function e(i){var n,l=this,c=i.values,d=void 0===c?null:c,u=i.iframe,p=void 0===u?null:u,h=i.selectClass,m=void 0===h?"highlight":h,f=i.containerClass,g=void 0===f?"tribute-container":f,v=i.itemClass,b=void 0===v?"":v,w=i.trigger,y=void 0===w?"@":w,x=i.autocompleteMode,C=void 0!==x&&x,_=i.selectTemplate,k=void 0===_?null:_,T=i.menuItemTemplate,S=void 0===T?null:T,M=i.lookup,A=void 0===M?"key":M,D=i.fillAttr,E=void 0===D?"value":D,L=i.collection,P=void 0===L?null:L,O=i.menuContainer,I=void 0===O?null:O,N=i.noMatchTemplate,R=void 0===N?null:N,B=i.requireLeadingSpace,z=void 0===B||B,j=i.allowSpaces,H=void 0!==j&&j,W=i.replaceTextSuffix,U=void 0===W?null:W,Y=i.positionMenu,$=void 0===Y||Y,F=i.spaceSelectsMatch,V=void 0!==F&&F,X=i.searchOpts,q=void 0===X?{}:X,Z=i.menuItemLimit,K=void 0===Z?null:Z,G=i.menuShowMinLength,Q=void 0===G?0:G;if(t(this,e),this.autocompleteMode=C,this.menuSelected=0,this.current={},this.inputEvent=!1,this.isActive=!1,this.menuContainer=I,this.allowSpaces=H,this.replaceTextSuffix=U,this.positionMenu=$,this.hasTrailingSpace=!1,this.spaceSelectsMatch=V,this.autocompleteMode&&(y="",H=!1),d)this.collection=[{trigger:y,iframe:p,selectClass:m,containerClass:g,itemClass:b,selectTemplate:(k||e.defaultSelectTemplate).bind(this),menuItemTemplate:(S||e.defaultMenuItemTemplate).bind(this),noMatchTemplate:(n=R,"string"==typeof n?""===n.trim()?null:n:"function"==typeof n?n.bind(l):R||function(){return"
  • No Match Found!
  • "}.bind(l)),lookup:A,fillAttr:E,values:d,requireLeadingSpace:z,searchOpts:q,menuItemLimit:K,menuShowMinLength:Q}];else{if(!P)throw new Error("[Tribute] No collection specified.");this.autocompleteMode&&console.warn("Tribute in autocomplete mode does not work for collections"),this.collection=P.map((function(t){return{trigger:t.trigger||y,iframe:t.iframe||p,selectClass:t.selectClass||m,containerClass:t.containerClass||g,itemClass:t.itemClass||b,selectTemplate:(t.selectTemplate||e.defaultSelectTemplate).bind(l),menuItemTemplate:(t.menuItemTemplate||e.defaultMenuItemTemplate).bind(l),noMatchTemplate:function(t){return"string"==typeof t?""===t.trim()?null:t:"function"==typeof t?t.bind(l):R||function(){return"
  • No Match Found!
  • "}.bind(l)}(R),lookup:t.lookup||A,fillAttr:t.fillAttr||E,values:t.values,requireLeadingSpace:t.requireLeadingSpace,searchOpts:t.searchOpts||q,menuItemLimit:t.menuItemLimit||K,menuShowMinLength:t.menuShowMinLength||Q}}))}new s(this),new o(this),new a(this),new r(this)}return i(e,[{key:"triggers",value:function(){return this.collection.map((function(t){return t.trigger}))}},{key:"attach",value:function(t){if(!t)throw new Error("[Tribute] Must pass in a DOM node or NodeList.");if("undefined"!=typeof jQuery&&t instanceof jQuery&&(t=t.get()),t.constructor===NodeList||t.constructor===HTMLCollection||t.constructor===Array)for(var e=t.length,i=0;i",post:i.current.collection.searchOpts.post||"",skip:i.current.collection.searchOpts.skip,extract:function(t){if("string"==typeof i.current.collection.lookup)return t[i.current.collection.lookup];if("function"==typeof i.current.collection.lookup)return i.current.collection.lookup(t,i.current.mentionText);throw new Error("Invalid lookup attribute, lookup must be string or function.")}});i.current.collection.menuItemLimit&&(n=n.slice(0,i.current.collection.menuItemLimit)),i.current.filteredItems=n;var o=i.menu.querySelector("ul");if(i.range.positionMenuAtCaret(e),!n.length){var a=new CustomEvent("tribute-no-match",{detail:i.menu});return i.current.element.dispatchEvent(a),void("function"==typeof i.current.collection.noMatchTemplate&&!i.current.collection.noMatchTemplate()||!i.current.collection.noMatchTemplate?i.hideMenu():"function"==typeof i.current.collection.noMatchTemplate?o.innerHTML=i.current.collection.noMatchTemplate():o.innerHTML=i.current.collection.noMatchTemplate)}o.innerHTML="";var s=i.range.getDocument().createDocumentFragment();n.forEach((function(t,e){var n=i.range.getDocument().createElement("li");n.setAttribute("data-index",e),n.className=i.current.collection.itemClass,n.addEventListener("mousemove",(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var i=[],n=!0,o=!1,a=void 0;try{for(var s,r=t[Symbol.iterator]();!(n=(s=r.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(t){o=!0,a=t}finally{try{n||null==r.return||r.return()}finally{if(o)throw a}}return i}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(i._findLiTarget(t.target),2),n=(e[0],e[1]);0!==t.movementY&&i.events.setActiveLi(n)})),i.menuSelected===e&&n.classList.add(i.current.collection.selectClass),n.innerHTML=i.current.collection.menuItemTemplate(t),s.appendChild(n)})),o.appendChild(s)}};"function"==typeof this.current.collection.values?this.current.collection.values(this.current.mentionText,n):n(this.current.collection.values)}}},{key:"_findLiTarget",value:function(t){if(!t)return[];var e=t.getAttribute("data-index");return e?[t,e]:this._findLiTarget(t.parentNode)}},{key:"showMenuForCollection",value:function(t,e){t!==document.activeElement&&this.placeCaretAtEnd(t),this.current.collection=this.collection[e||0],this.current.externalTrigger=!0,this.current.element=t,t.isContentEditable?this.insertTextAtCursor(this.current.collection.trigger):this.insertAtCaret(t,this.current.collection.trigger),this.showMenuFor(t)}},{key:"placeCaretAtEnd",value:function(t){if(t.focus(),void 0!==window.getSelection&&void 0!==document.createRange){var e=document.createRange();e.selectNodeContents(t),e.collapse(!1);var i=window.getSelection();i.removeAllRanges(),i.addRange(e)}else if(void 0!==document.body.createTextRange){var n=document.body.createTextRange();n.moveToElementText(t),n.collapse(!1),n.select()}}},{key:"insertTextAtCursor",value:function(t){var e,i;(i=(e=window.getSelection()).getRangeAt(0)).deleteContents();var n=document.createTextNode(t);i.insertNode(n),i.selectNodeContents(n),i.collapse(!1),e.removeAllRanges(),e.addRange(i)}},{key:"insertAtCaret",value:function(t,e){var i=t.scrollTop,n=t.selectionStart,o=t.value.substring(0,n),a=t.value.substring(t.selectionEnd,t.value.length);t.value=o+e+a,n+=e.length,t.selectionStart=n,t.selectionEnd=n,t.focus(),t.scrollTop=i}},{key:"hideMenu",value:function(){this.menu&&(this.menu.style.cssText="display: none;",this.isActive=!1,this.menuSelected=0,this.current={})}},{key:"selectItemAtIndex",value:function(t,e){if("number"==typeof(t=parseInt(t))&&!isNaN(t)){var i=this.current.filteredItems[t],n=this.current.collection.selectTemplate(i);null!==n&&this.replaceText(n,e,i)}}},{key:"replaceText",value:function(t,e,i){this.range.replaceTriggerText(t,!0,!0,e,i)}},{key:"_append",value:function(t,e,i){if("function"==typeof t.values)throw new Error("Unable to append to values, as it is a function.");t.values=i?e:t.values.concat(e)}},{key:"append",value:function(t,e,i){var n=parseInt(t);if("number"!=typeof n)throw new Error("please provide an index for the collection to update.");var o=this.collection[n];this._append(o,e,i)}},{key:"appendCurrent",value:function(t,e){if(!this.isActive)throw new Error("No active state. Please use append instead and pass an index.");this._append(this.current.collection,t,e)}},{key:"detach",value:function(t){if(!t)throw new Error("[Tribute] Must pass in a DOM node or NodeList.");if("undefined"!=typeof jQuery&&t instanceof jQuery&&(t=t.get()),t.constructor===NodeList||t.constructor===HTMLCollection||t.constructor===Array)for(var e=t.length,i=0;i'+(this.current.collection.trigger+t.original[this.current.collection.fillAttr])+"":this.current.collection.trigger+t.original[this.current.collection.fillAttr]}},{key:"defaultMenuItemTemplate",value:function(t){return t.string}},{key:"inputTypes",value:function(){return["TEXTAREA","INPUT"]}}]),e}()}()},"6Wrw":function(t,e,i){"use strict";i("E/WS")},7:function(t,e,i){t.exports=i("K0g3")},"9tPo":function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var i=e.protocol+"//"+e.host,n=i+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var o,a=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?t:(o=0===a.indexOf("//")?a:0===a.indexOf("/")?i+a:n+a.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},"E/WS":function(t,e,i){var n=i("t9kD");"string"==typeof n&&(n=[[t.i,n,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};i("aET+")(n,o);n.locals&&(t.exports=n.locals)},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var o=(s=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),a=n.sources.map((function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"}));return[i].concat(a).concat([o]).join("\n")}var s;return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i})).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},o=0;o=0&&u.splice(e,1)}function v(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var n=function(){0;return i.nc}();n&&(t.attrs.nonce=n)}return b(e,t.attrs),f(t,e),e}function b(t,e){Object.keys(e).forEach((function(i){t.setAttribute(i,e[i])}))}function w(t,e){var i,n,o,a;if(e.transform&&t.css){if(!(a="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=a}if(e.singleton){var s=d++;i=c||(c=v(e)),n=C.bind(null,i,s,!1),o=C.bind(null,i,s,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(e,t.attrs),f(t,e),e}(e),n=k.bind(null,i,e),o=function(){g(i),i.href&&URL.revokeObjectURL(i.href)}):(i=v(e),n=_.bind(null,i),o=function(){g(i)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=s()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var i=m(t,e);return h(i,e),function(t){for(var n=[],o=0;o0&&void 0!==arguments[0]?arguments[0]:{},a=o.search,s=o.autoSelect,c=void 0!==s&&s,d=o.setValue,u=void 0===d?function(){}:d,p=o.setAttribute,h=void 0===p?function(){}:p,m=o.onUpdate,f=void 0===m?function(){}:m,g=o.onSubmit,v=void 0===g?function(){}:g,b=o.onShow,w=void 0===b?function(){}:b,y=o.onHide,x=void 0===y?function(){}:y,C=o.onLoading,_=void 0===C?function(){}:C,k=o.onLoaded,T=void 0===k?function(){}:k;i(this,t),n(this,"value",""),n(this,"searchCounter",0),n(this,"results",[]),n(this,"selectedIndex",-1),n(this,"handleInput",(function(t){var i=t.target.value;e.updateResults(i),e.value=i})),n(this,"handleKeyDown",(function(t){var i=t.key;switch(i){case"Up":case"Down":case"ArrowUp":case"ArrowDown":var n="ArrowUp"===i||"Up"===i?e.selectedIndex-1:e.selectedIndex+1;t.preventDefault(),e.handleArrows(n);break;case"Tab":e.selectResult();break;case"Enter":var o=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(o);break;case"Esc":case"Escape":e.hideResults(),e.setValue();break;default:return}})),n(this,"handleFocus",(function(t){var i=t.target.value;e.updateResults(i),e.value=i})),n(this,"handleBlur",(function(){e.hideResults()})),n(this,"handleResultMouseDown",(function(t){t.preventDefault()})),n(this,"handleResultClick",(function(t){var i=t.target,n=r(i,"[data-result-index]");if(n){e.selectedIndex=parseInt(n.dataset.resultIndex,10);var o=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(o)}})),n(this,"handleArrows",(function(t){var i=e.results.length;e.selectedIndex=(t%i+i)%i,e.onUpdate(e.results,e.selectedIndex)})),n(this,"selectResult",(function(){var t=e.results[e.selectedIndex];t&&e.setValue(t),e.hideResults()})),n(this,"updateResults",(function(t){var i=++e.searchCounter;e.onLoading(),e.search(t).then((function(t){i===e.searchCounter&&(e.results=t,e.onLoaded(),0!==e.results.length?(e.selectedIndex=e.autoSelect?0:-1,e.onUpdate(e.results,e.selectedIndex),e.showResults()):e.hideResults())}))})),n(this,"showResults",(function(){e.setAttribute("aria-expanded",!0),e.onShow()})),n(this,"hideResults",(function(){e.selectedIndex=-1,e.results=[],e.setAttribute("aria-expanded",!1),e.setAttribute("aria-activedescendant",""),e.onUpdate(e.results,e.selectedIndex),e.onHide()})),n(this,"checkSelectedResultVisible",(function(t){var i=t.querySelector('[data-result-index="'.concat(e.selectedIndex,'"]'));if(i){var n=t.getBoundingClientRect(),o=i.getBoundingClientRect();o.topn.bottom&&(t.scrollTop+=o.bottom-n.bottom)}})),this.search=l(a)?a:function(t){return Promise.resolve(a(t))},this.autoSelect=c,this.setValue=u,this.setAttribute=h,this.onUpdate=f,this.onSubmit=v,this.onShow=w,this.onHide=x,this.onLoading=_,this.onLoaded=T},d=0,u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(t).concat(++d)};const p=function(t,e,i,n,o,a,s,r,l,c){"boolean"!=typeof s&&(l=r,r=s,s=!1);const d="function"==typeof i?i.options:i;let u;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),n&&(d._scopeId=n),a?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(a)},d._ssrRegister=u):e&&(u=s?function(t){e.call(this,c(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,r(t))}),u)if(d.functional){const t=d.render;d.render=function(e,i){return u.call(i),t(e,i)}}else{const t=d.beforeCreate;d.beforeCreate=t?[].concat(t,u):[u]}return i}({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"root"},[t._t("default",[i("div",t._b({},"div",t.rootProps,!1),[i("input",t._g(t._b({ref:"input",on:{input:t.handleInput,keydown:t.core.handleKeyDown,focus:t.core.handleFocus,blur:t.core.handleBlur}},"input",t.inputProps,!1),t.$listeners)),t._v(" "),i("ul",t._g(t._b({ref:"resultList"},"ul",t.resultListProps,!1),t.resultListListeners),[t._l(t.results,(function(e,n){return[t._t("result",[i("li",t._b({key:t.resultProps[n].id},"li",t.resultProps[n],!1),[t._v("\n "+t._s(t.getResultValue(e))+"\n ")])],{result:e,props:t.resultProps[n]})]}))],2)])],{rootProps:t.rootProps,inputProps:t.inputProps,inputListeners:t.inputListeners,resultListProps:t.resultListProps,resultListListeners:t.resultListListeners,results:t.results,resultProps:t.resultProps})],2)},staticRenderFns:[]},void 0,{name:"Autocomplete",inheritAttrs:!1,props:{search:{type:Function,required:!0},baseClass:{type:String,default:"autocomplete"},autoSelect:{type:Boolean,default:!1},getResultValue:{type:Function,default:function(t){return t}},defaultValue:{type:String,default:""},debounceTime:{type:Number,default:0}},data:function(){var t,e,i,n,o=new c({search:this.search,autoSelect:this.autoSelect,setValue:this.setValue,onUpdate:this.handleUpdate,onSubmit:this.handleSubmit,onShow:this.handleShow,onHide:this.handleHide,onLoading:this.handleLoading,onLoaded:this.handleLoaded});return this.debounceTime>0&&(o.handleInput=(t=o.handleInput,e=this.debounceTime,function(){var o=this,a=arguments,s=function(){n=null,i||t.apply(o,a)},r=i&&!n;clearTimeout(n),n=setTimeout(s,e),r&&t.apply(o,a)})),{core:o,value:this.defaultValue,resultListId:u("".concat(this.baseClass,"-result-list-")),results:[],selectedIndex:-1,expanded:!1,loading:!1,position:"below",resetPosition:!0}},computed:{rootProps:function(){return{class:this.baseClass,style:{position:"relative"},"data-expanded":this.expanded,"data-loading":this.loading,"data-position":this.position}},inputProps:function(){return a({class:"".concat(this.baseClass,"-input"),value:this.value,role:"combobox",autocomplete:"off",autocapitalize:"off",autocorrect:"off",spellcheck:"false","aria-autocomplete":"list","aria-haspopup":"listbox","aria-owns":this.resultListId,"aria-expanded":this.expanded?"true":"false","aria-activedescendant":this.selectedIndex>-1?this.resultProps[this.selectedIndex].id:""},this.$attrs)},inputListeners:function(){return{input:this.handleInput,keydown:this.core.handleKeyDown,focus:this.core.handleFocus,blur:this.core.handleBlur}},resultListProps:function(){var t="below"===this.position?"top":"bottom";return{id:this.resultListId,class:"".concat(this.baseClass,"-result-list"),role:"listbox",style:n({position:"absolute",zIndex:1,width:"100%",visibility:this.expanded?"visible":"hidden",pointerEvents:this.expanded?"auto":"none"},t,"100%")}},resultListListeners:function(){return{mousedown:this.core.handleResultMouseDown,click:this.core.handleResultClick}},resultProps:function(){var t=this;return this.results.map((function(e,i){return a({id:"".concat(t.baseClass,"-result-").concat(i),class:"".concat(t.baseClass,"-result"),"data-result-index":i,role:"option"},t.selectedIndex===i?{"aria-selected":"true"}:{})}))}},mounted:function(){document.body.addEventListener("click",this.handleDocumentClick)},beforeDestroy:function(){document.body.removeEventListener("click",this.handleDocumentClick)},updated:function(){var t,e,i,n;this.$refs.input&&this.$refs.resultList&&(this.resetPosition&&this.results.length>0&&(this.resetPosition=!1,this.position=(t=this.$refs.input,e=this.$refs.resultList,i=t.getBoundingClientRect(),n=e.getBoundingClientRect(),i.bottom+n.height>window.innerHeight&&window.innerHeight-i.bottom0?"above":"below")),this.core.checkSelectedResultVisible(this.$refs.resultList))},methods:{setValue:function(t){this.value=t?this.getResultValue(t):""},handleUpdate:function(t,e){this.results=t,this.selectedIndex=e,this.$emit("update",t,e)},handleShow:function(){this.expanded=!0},handleHide:function(){this.expanded=!1,this.resetPosition=!0},handleLoading:function(){this.loading=!0},handleLoaded:function(){this.loading=!1},handleInput:function(t){this.value=t.target.value,this.core.handleInput(t)},handleSubmit:function(t){this.$emit("submit",t)},handleDocumentClick:function(t){this.$refs.root.contains(t.target)||this.core.hideResults()}}},void 0,!1,void 0,!1,void 0,void 0,void 0);function h(t){h.installed||(h.installed=!0,t.component("Autocomplete",p))}var m,f={install:h};"undefined"!=typeof window?m=window.Vue:void 0!==t&&(m=t.Vue),m&&m.use(f),p.install=h,e.a=p}).call(this,i("yLpj"))},lcPr:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,o=i("urRO"),a=(n=o)&&n.__esModule?n:{default:n};var s="undefined"==typeof window?[String,Array]:[String,Array,Element,NodeList];e.default={render:function(t){var e=this.crossorigin||void 0;return t("div",{style:this.containerStyle},[t("img",{ref:"img",attrs:{src:this.src,alt:this.alt||"image",style:"max-width: 100%",crossorigin:e},on:this.$listeners,style:this.imgStyle})])},props:{containerStyle:Object,src:{type:String,default:""},alt:String,imgStyle:Object,viewMode:Number,dragMode:String,initialAspectRatio:Number,aspectRatio:Number,data:Object,preview:s,responsive:{type:Boolean,default:!0},restore:{type:Boolean,default:!0},checkCrossOrigin:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},crossorigin:{type:String},modal:{type:Boolean,default:!0},guides:{type:Boolean,default:!0},center:{type:Boolean,default:!0},highlight:{type:Boolean,default:!0},background:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!0},autoCropArea:Number,movable:{type:Boolean,default:!0},rotatable:{type:Boolean,default:!0},scalable:{type:Boolean,default:!0},zoomable:{type:Boolean,default:!0},zoomOnTouch:{type:Boolean,default:!0},zoomOnWheel:{type:Boolean,default:!0},wheelZoomRatio:Number,cropBoxMovable:{type:Boolean,default:!0},cropBoxResizable:{type:Boolean,default:!0},toggleDragModeOnDblclick:{type:Boolean,default:!0},minCanvasWidth:Number,minCanvasHeight:Number,minCropBoxWidth:Number,minCropBoxHeight:Number,minContainerWidth:Number,minContainerHeight:Number,ready:Function,cropstart:Function,cropmove:Function,cropend:Function,crop:Function,zoom:Function},mounted:function(){var t=this.$options.props,e=(t.containerStyle,t.src,t.alt,t.imgStyle,function(t,e){var i={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n]);return i}(t,["containerStyle","src","alt","imgStyle"])),i={};for(var n in e)void 0!==this[n]&&(i[n]=this[n]);this.cropper=new a.default(this.$refs.img,i)},methods:{reset:function(){return this.cropper.reset()},clear:function(){return this.cropper.clear()},initCrop:function(){return this.cropper.crop()},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.cropper.replace(t,e)},enable:function(){return this.cropper.enable()},disable:function(){return this.cropper.disable()},destroy:function(){return this.cropper.destroy()},move:function(t,e){return this.cropper.move(t,e)},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.cropper.moveTo(t,e)},relativeZoom:function(t,e){return this.cropper.zoom(t,e)},zoomTo:function(t,e){return this.cropper.zoomTo(t,e)},rotate:function(t){return this.cropper.rotate(t)},rotateTo:function(t){return this.cropper.rotateTo(t)},scaleX:function(t){return this.cropper.scaleX(t)},scaleY:function(t){return this.cropper.scaleY(t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.cropper.scale(t,e)},getData:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.cropper.getData(t)},setData:function(t){return this.cropper.setData(t)},getContainerData:function(){return this.cropper.getContainerData()},getImageData:function(){return this.cropper.getImageData()},getCanvasData:function(){return this.cropper.getCanvasData()},setCanvasData:function(t){return this.cropper.setCanvasData(t)},getCropBoxData:function(){return this.cropper.getCropBoxData()},setCropBoxData:function(t){return this.cropper.setCropBoxData(t)},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.cropper.getCroppedCanvas(t)},setAspectRatio:function(t){return this.cropper.setAspectRatio(t)},setDragMode:function(t){return this.cropper.setDragMode(t)}}}},t9kD:function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,".compose-modal-component .media-drawer-filters {\n overflow-x: scroll;\n flex-wrap: unset;\n}\n.compose-modal-component .media-drawer-filters::-webkit-scrollbar {\n width: 0px;\n background: transparent;\n}\n.compose-modal-component .media-drawer-filters .nav-link {\n min-width: 100px;\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.compose-modal-component .media-drawer-filters .active {\n color: #fff;\n font-weight: bold;\n}\n@media (hover: none) and (pointer: coarse) {\n.compose-modal-component .media-drawer-filters::-webkit-scrollbar {\n display: none;\n}\n}\n.compose-modal-component .no-focus {\n border-color: none;\n outline: 0;\n box-shadow: none;\n}\n.compose-modal-component a.list-group-item {\n text-decoration: none;\n}\n.compose-modal-component a.list-group-item:hover {\n text-decoration: none;\n background-color: #f8f9fa !important;\n}\n.compose-modal-component .compose-action:hover {\n cursor: pointer;\n background-color: #f8f9fa !important;\n}\n.compose-modal-component .collections-list-group {\n max-height: 500px;\n overflow-y: auto;\n}\n.compose-modal-component .collections-list-group .list-group-item.active {\n color: #212529;\n border-color: #60a5fa !important;\n background-color: #dbeafe !important;\n}",""])},urRO:function(t,e,i){t.exports=function(){"use strict";function t(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function e(e){for(var i=1;it.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&t<1/0};function N(t){return void 0===t}function R(t){return"object"===i(t)&&null!==t}var B=Object.prototype.hasOwnProperty;function z(t){if(!R(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&B.call(i,"isPrototypeOf")}catch(t){return!1}}function j(t){return"function"==typeof t}var H=Array.prototype.slice;function W(t){return Array.from?Array.from(t):H.call(t)}function U(t,e){return t&&j(e)&&(Array.isArray(t)||O(t.length)?W(t).forEach((function(i,n){e.call(t,i,n,t)})):R(t)&&Object.keys(t).forEach((function(i){e.call(t,t[i],i,t)}))),t}var Y=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n0&&i.forEach((function(e){R(e)&&Object.keys(e).forEach((function(i){t[i]=e[i]}))})),t},$=/\.\d*(?:0|9){12}\d*$/;function F(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return $.test(t)?Math.round(t*e)/e:t}var V=/^width|height|left|top|marginLeft|marginTop$/;function X(t,e){var i=t.style;U(e,(function(t,e){V.test(e)&&O(t)&&(t="".concat(t,"px")),i[e]=t}))}function q(t,e){if(e)if(O(t.length))U(t,(function(t){q(t,e)}));else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function Z(t,e){e&&(O(t.length)?U(t,(function(t){Z(t,e)})):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function K(t,e,i){e&&(O(t.length)?U(t,(function(t){K(t,e,i)})):i?q(t,e):Z(t,e))}var G=/([a-z\d])([A-Z])/g;function Q(t){return t.replace(G,"$1-$2").toLowerCase()}function J(t,e){return R(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(Q(e)))}function tt(t,e,i){R(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(Q(e)),i)}var et=/\s\s*/,it=function(){var t=!1;if(l){var e=!1,i=function(){},n=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});c.addEventListener("test",i,n),c.removeEventListener("test",i,n)}return t}();function nt(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=i;e.trim().split(et).forEach((function(e){if(!it){var a=t.listeners;a&&a[e]&&a[e][i]&&(o=a[e][i],delete a[e][i],0===Object.keys(a[e]).length&&delete a[e],0===Object.keys(a).length&&delete t.listeners)}t.removeEventListener(e,o,n)}))}function ot(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=i;e.trim().split(et).forEach((function(e){if(n.once&&!it){var a=t.listeners,s=void 0===a?{}:a;o=function(){delete s[e][i],t.removeEventListener(e,o,n);for(var a=arguments.length,r=new Array(a),l=0;l1&&void 0!==arguments[1]?arguments[1]:"contain",a=I(n),s=I(i);if(a&&s){var r=i*e;"contain"===o&&r>n||"cover"===o&&r=8&&(a=l+d)}}}if(a){var u,p,h=i.getUint16(a,n);for(p=0;p=0?o:200),height:Math.max(i.offsetHeight,a>=0?a:100)};this.containerData=s,X(n,{width:s.width,height:s.height}),q(t,m),Z(n,m)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,n=Math.abs(e.rotate)%180==90,o=n?e.naturalHeight:e.naturalWidth,a=n?e.naturalWidth:e.naturalHeight,s=o/a,r=t.width,l=t.height;t.height*s>t.width?3===i?r=t.height*s:l=t.width/s:3===i?l=t.width/s:r=t.height*s;var c={aspectRatio:s,naturalWidth:o,naturalHeight:a,width:r,height:l};this.canvasData=c,this.limited=1===i||2===i,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=Y({},c)},limitCanvas:function(t,e){var i=this.options,n=this.containerData,o=this.canvasData,a=this.cropBoxData,s=i.viewMode,r=o.aspectRatio,l=this.cropped&&a;if(t){var c=Number(i.minCanvasWidth)||0,d=Number(i.minCanvasHeight)||0;s>1?(c=Math.max(c,n.width),d=Math.max(d,n.height),3===s&&(d*r>c?c=d*r:d=c/r)):s>0&&(c?c=Math.max(c,l?a.width:0):d?d=Math.max(d,l?a.height:0):l&&(c=a.width,(d=a.height)*r>c?c=d*r:d=c/r));var u=ht({aspectRatio:r,width:c,height:d});c=u.width,d=u.height,o.minWidth=c,o.minHeight=d,o.maxWidth=1/0,o.maxHeight=1/0}if(e)if(s>(l?0:1)){var p=n.width-o.width,h=n.height-o.height;o.minLeft=Math.min(0,p),o.minTop=Math.min(0,h),o.maxLeft=Math.max(0,p),o.maxTop=Math.max(0,h),l&&this.limited&&(o.minLeft=Math.min(a.left,a.left+(a.width-o.width)),o.minTop=Math.min(a.top,a.top+(a.height-o.height)),o.maxLeft=a.left,o.maxTop=a.top,2===s&&(o.width>=n.width&&(o.minLeft=Math.min(0,p),o.maxLeft=Math.max(0,p)),o.height>=n.height&&(o.minTop=Math.min(0,h),o.maxTop=Math.max(0,h))))}else o.minLeft=-o.width,o.minTop=-o.height,o.maxLeft=n.width,o.maxTop=n.height},renderCanvas:function(t,e){var i=this.canvasData,n=this.imageData;if(e){var o=function(t){var e=t.width,i=t.height,n=t.degree;if(90==(n=Math.abs(n)%180))return{width:i,height:e};var o=n%90*Math.PI/180,a=Math.sin(o),s=Math.cos(o),r=e*s+i*a,l=e*a+i*s;return n>90?{width:l,height:r}:{width:r,height:l}}({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),a=o.width,s=o.height,r=i.width*(a/i.naturalWidth),l=i.height*(s/i.naturalHeight);i.left-=(r-i.width)/2,i.top-=(l-i.height)/2,i.width=r,i.height=l,i.aspectRatio=a/s,i.naturalWidth=a,i.naturalHeight=s,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.widthi.maxHeight||i.heighte.width?o.height=o.width/i:o.width=o.height*i),this.cropBoxData=o,this.limitCropBox(!0,!0),o.width=Math.min(Math.max(o.width,o.minWidth),o.maxWidth),o.height=Math.min(Math.max(o.height,o.minHeight),o.maxHeight),o.width=Math.max(o.minWidth,o.width*n),o.height=Math.max(o.minHeight,o.height*n),o.left=e.left+(e.width-o.width)/2,o.top=e.top+(e.height-o.height)/2,o.oldLeft=o.left,o.oldTop=o.top,this.initialCropBoxData=Y({},o)},limitCropBox:function(t,e){var i=this.options,n=this.containerData,o=this.canvasData,a=this.cropBoxData,s=this.limited,r=i.aspectRatio;if(t){var l=Number(i.minCropBoxWidth)||0,c=Number(i.minCropBoxHeight)||0,d=s?Math.min(n.width,o.width,o.width+o.left,n.width-o.left):n.width,u=s?Math.min(n.height,o.height,o.height+o.top,n.height-o.top):n.height;l=Math.min(l,n.width),c=Math.min(c,n.height),r&&(l&&c?c*r>l?c=l/r:l=c*r:l?c=l/r:c&&(l=c*r),u*r>d?u=d/r:d=u*r),a.minWidth=Math.min(l,d),a.minHeight=Math.min(c,u),a.maxWidth=d,a.maxHeight=u}e&&(s?(a.minLeft=Math.max(0,o.left),a.minTop=Math.max(0,o.top),a.maxLeft=Math.min(n.width,o.left+o.width)-a.width,a.maxTop=Math.min(n.height,o.top+o.height)-a.height):(a.minLeft=0,a.minTop=0,a.maxLeft=n.width-a.width,a.maxTop=n.height-a.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.widthi.maxHeight||i.height=e.width&&i.height>=e.height?"move":"all"),X(this.cropBox,Y({width:i.width,height:i.height},ut({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),at(this.element,"crop",this.getData())}},wt={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,n=e?this.crossOriginUrl:this.url,o=t.alt||"The image to preview",a=document.createElement("img");if(e&&(a.crossOrigin=e),a.src=n,a.alt=o,this.viewBox.appendChild(a),this.viewBoxImage=a,i){var s=i;"string"==typeof i?s=t.ownerDocument.querySelectorAll(i):i.querySelector&&(s=[i]),this.previews=s,U(s,(function(t){var i=document.createElement("img");tt(t,y,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=n,i.alt=o,i.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(i)}))}},resetPreview:function(){U(this.previews,(function(t){var e=J(t,y);X(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(R(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(Q(e)))}(t,y)}))},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,n=i.width,o=i.height,a=t.width,s=t.height,r=i.left-e.left-t.left,l=i.top-e.top-t.top;this.cropped&&!this.disabled&&(X(this.viewBoxImage,Y({width:a,height:s},ut(Y({translateX:-r,translateY:-l},t)))),U(this.previews,(function(e){var i=J(e,y),c=i.width,d=i.height,u=c,p=d,h=1;n&&(p=o*(h=c/n)),o&&p>d&&(u=n*(h=d/o),p=d),X(e,{width:u,height:p}),X(e.getElementsByTagName("img")[0],Y({width:a*h,height:s*h},ut(Y({translateX:-r*h,translateY:-l*h},t))))})))}},yt={bind:function(){var t=this.element,e=this.options,i=this.cropper;j(e.cropstart)&&ot(t,"cropstart",e.cropstart),j(e.cropmove)&&ot(t,"cropmove",e.cropmove),j(e.cropend)&&ot(t,"cropend",e.cropend),j(e.crop)&&ot(t,"crop",e.crop),j(e.zoom)&&ot(t,"zoom",e.zoom),ot(i,k,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&ot(i,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&ot(i,"dblclick",this.onDblclick=this.dblclick.bind(this)),ot(t.ownerDocument,T,this.onCropMove=this.cropMove.bind(this)),ot(t.ownerDocument,S,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&ot(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;j(e.cropstart)&&nt(t,"cropstart",e.cropstart),j(e.cropmove)&&nt(t,"cropmove",e.cropmove),j(e.cropend)&&nt(t,"cropend",e.cropend),j(e.crop)&&nt(t,"crop",e.crop),j(e.zoom)&&nt(t,"zoom",e.zoom),nt(i,k,this.onCropStart),e.zoomable&&e.zoomOnWheel&&nt(i,"wheel",this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&nt(i,"dblclick",this.onDblclick),nt(t.ownerDocument,T,this.onCropMove),nt(t.ownerDocument,S,this.onCropEnd),e.responsive&&nt(window,"resize",this.onResize)}},xt={resize:function(){if(!this.disabled){var t,e,i=this.options,n=this.container,o=this.containerData,a=n.offsetWidth/o.width,s=n.offsetHeight/o.height,r=Math.abs(a-1)>Math.abs(s-1)?a:s;1!==r&&(i.restore&&(t=this.getCanvasData(),e=this.getCropBoxData()),this.render(),i.restore&&(this.setCanvasData(U(t,(function(e,i){t[i]=e*r}))),this.setCropBoxData(U(e,(function(t,i){e[i]=t*r})))))}},dblclick:function(){var t,e;this.disabled||"none"===this.options.dragMode||this.setDragMode((t=this.dragBox,e=p,(t.classList?t.classList.contains(e):t.className.indexOf(e)>-1)?"move":"crop"))},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(O(e)&&1!==e||O(i)&&0!==i||t.ctrlKey))){var n,o=this.options,a=this.pointers;t.changedTouches?U(t.changedTouches,(function(t){a[t.identifier]=pt(t)})):a[t.pointerId||0]=pt(t),n=Object.keys(a).length>1&&o.zoomable&&o.zoomOnTouch?"zoom":J(t.target,w),M.test(n)&&!1!==at(this.element,"cropstart",{originalEvent:t,action:n})&&(t.preventDefault(),this.action=n,this.cropping=!1,"crop"===n&&(this.cropping=!0,q(this.dragBox,v)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==at(this.element,"cropmove",{originalEvent:t,action:e})&&(t.changedTouches?U(t.changedTouches,(function(t){Y(i[t.identifier]||{},pt(t,!0))})):Y(i[t.pointerId||0]||{},pt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?U(t.changedTouches,(function(t){delete i[t.identifier]})):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,K(this.dragBox,v,this.cropped&&this.options.modal)),at(this.element,"cropend",{originalEvent:t,action:e}))}}},Ct={change:function(t){var i,n=this.options,o=this.canvasData,a=this.containerData,s=this.cropBoxData,r=this.pointers,l=this.action,c=n.aspectRatio,d=s.left,u=s.top,p=s.width,h=s.height,f=d+p,g=u+h,v=0,b=0,w=a.width,y=a.height,x=!0;!c&&t.shiftKey&&(c=p&&h?p/h:1),this.limited&&(v=s.minLeft,b=s.minTop,w=v+Math.min(a.width,o.width,o.left+o.width),y=b+Math.min(a.height,o.height,o.top+o.height));var C=r[Object.keys(r)[0]],_={x:C.endX-C.startX,y:C.endY-C.startY},k=function(t){switch(t){case"e":f+_.x>w&&(_.x=w-f);break;case"w":d+_.xy&&(_.y=y-g)}};switch(l){case"all":d+=_.x,u+=_.y;break;case"e":if(_.x>=0&&(f>=w||c&&(u<=b||g>=y))){x=!1;break}k("e"),(p+=_.x)<0&&(l="w",d-=p=-p),c&&(h=p/c,u+=(s.height-h)/2);break;case"n":if(_.y<=0&&(u<=b||c&&(d<=v||f>=w))){x=!1;break}k("n"),h-=_.y,u+=_.y,h<0&&(l="s",u-=h=-h),c&&(p=h*c,d+=(s.width-p)/2);break;case"w":if(_.x<=0&&(d<=v||c&&(u<=b||g>=y))){x=!1;break}k("w"),p-=_.x,d+=_.x,p<0&&(l="e",d-=p=-p),c&&(h=p/c,u+=(s.height-h)/2);break;case"s":if(_.y>=0&&(g>=y||c&&(d<=v||f>=w))){x=!1;break}k("s"),(h+=_.y)<0&&(l="n",u-=h=-h),c&&(p=h*c,d+=(s.width-p)/2);break;case"ne":if(c){if(_.y<=0&&(u<=b||f>=w)){x=!1;break}k("n"),h-=_.y,u+=_.y,p=h*c}else k("n"),k("e"),_.x>=0?fb&&(h-=_.y,u+=_.y):(h-=_.y,u+=_.y);p<0&&h<0?(l="sw",u-=h=-h,d-=p=-p):p<0?(l="nw",d-=p=-p):h<0&&(l="se",u-=h=-h);break;case"nw":if(c){if(_.y<=0&&(u<=b||d<=v)){x=!1;break}k("n"),h-=_.y,u+=_.y,p=h*c,d+=s.width-p}else k("n"),k("w"),_.x<=0?d>v?(p-=_.x,d+=_.x):_.y<=0&&u<=b&&(x=!1):(p-=_.x,d+=_.x),_.y<=0?u>b&&(h-=_.y,u+=_.y):(h-=_.y,u+=_.y);p<0&&h<0?(l="se",u-=h=-h,d-=p=-p):p<0?(l="ne",d-=p=-p):h<0&&(l="sw",u-=h=-h);break;case"sw":if(c){if(_.x<=0&&(d<=v||g>=y)){x=!1;break}k("w"),p-=_.x,d+=_.x,h=p/c}else k("s"),k("w"),_.x<=0?d>v?(p-=_.x,d+=_.x):_.y>=0&&g>=y&&(x=!1):(p-=_.x,d+=_.x),_.y>=0?g=0&&(f>=w||g>=y)){x=!1;break}k("e"),h=(p+=_.x)/c}else k("s"),k("e"),_.x>=0?f=0&&g>=y&&(x=!1):p+=_.x,_.y>=0?gMath.abs(n)&&(n=l)}))})),n}(r),t),x=!1;break;case"crop":if(!_.x||!_.y){x=!1;break}i=st(this.cropper),d=C.startX-i.left,u=C.startY-i.top,p=s.minWidth,h=s.minHeight,_.x>0?l=_.y>0?"se":"ne":_.x<0&&(d-=p,l=_.y>0?"sw":"nw"),_.y<0&&(u-=h),this.cropped||(Z(this.cropBox,m),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}x&&(s.width=p,s.height=h,s.left=d,s.top=u,this.action=l,this.renderCropBox()),U(r,(function(t){t.startX=t.endX,t.startY=t.endY}))}},_t={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&q(this.dragBox,v),Z(this.cropBox,m),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Y({},this.initialImageData),this.canvasData=Y({},this.initialCanvasData),this.cropBoxData=Y({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Y(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Z(this.dragBox,v),q(this.cropBox,m)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,U(this.previews,(function(e){e.getElementsByTagName("img")[0].src=t})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Z(this.cropper,h)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,q(this.cropper,h)),this},destroy:function(){var t=this.element;return t.cropper?(t.cropper=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,n=i.left,o=i.top;return this.moveTo(N(t)?t:n+Number(t),N(e)?e:o+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,n=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(O(t)&&(i.left=t,n=!0),O(e)&&(i.top=e,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var n=this.options,o=this.canvasData,a=o.width,s=o.height,r=o.naturalWidth,l=o.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&n.zoomable){var c=r*t,d=l*t;if(!1===at(this.element,"zoom",{ratio:t,oldRatio:a/r,originalEvent:i}))return this;if(i){var u=this.pointers,p=st(this.cropper),h=u&&Object.keys(u).length?function(t){var e=0,i=0,n=0;return U(t,(function(t){var o=t.startX,a=t.startY;e+=o,i+=a,n+=1})),{pageX:e/=n,pageY:i/=n}}(u):{pageX:i.pageX,pageY:i.pageY};o.left-=(c-a)*((h.pageX-p.left-o.left)/a),o.top-=(d-s)*((h.pageY-p.top-o.top)/s)}else z(e)&&O(e.x)&&O(e.y)?(o.left-=(c-a)*((e.x-o.left)/a),o.top-=(d-s)*((e.y-o.top)/s)):(o.left-=(c-a)/2,o.top-=(d-s)/2);o.width=c,o.height=d,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return O(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,O(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(O(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,n=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(O(t)&&(i.scaleX=t,n=!0),O(e)&&(i.scaleY=e,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,n=this.imageData,o=this.canvasData,a=this.cropBoxData;if(this.ready&&this.cropped){t={x:a.left-o.left,y:a.top-o.top,width:a.width,height:a.height};var s=n.width/n.naturalWidth;if(U(t,(function(e,i){t[i]=e/s})),e){var r=Math.round(t.y+t.height),l=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=l-t.x,t.height=r-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=n.rotate||0),i.scalable&&(t.scaleX=n.scaleX||1,t.scaleY=n.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,n=this.canvasData,o={};if(this.ready&&!this.disabled&&z(t)){var a=!1;e.rotatable&&O(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,a=!0),e.scalable&&(O(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,a=!0),O(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,a=!0)),a&&this.renderCanvas(!0,!0);var s=i.width/i.naturalWidth;O(t.x)&&(o.left=t.x*s+n.left),O(t.y)&&(o.top=t.y*s+n.top),O(t.width)&&(o.width=t.width*s),O(t.height)&&(o.height=t.height*s),this.setCropBoxData(o)}return this},getContainerData:function(){return this.ready?Y({},this.containerData):{}},getImageData:function(){return this.sized?Y({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&U(["left","top","width","height","naturalWidth","naturalHeight"],(function(i){e[i]=t[i]})),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&z(t)&&(O(t.left)&&(e.left=t.left),O(t.top)&&(e.top=t.top),O(t.width)?(e.width=t.width,e.height=t.width/i):O(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,n=this.cropBoxData,o=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&z(t)&&(O(t.left)&&(n.left=t.left),O(t.top)&&(n.top=t.top),O(t.width)&&t.width!==n.width&&(e=!0,n.width=t.width),O(t.height)&&t.height!==n.height&&(i=!0,n.height=t.height),o&&(e?n.height=n.width/o:i&&(n.width=n.height*o)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=mt(this.image,this.imageData,e,t);if(!this.cropped)return i;var n=this.getData(),o=n.x,a=n.y,r=n.width,l=n.height,c=i.width/Math.floor(e.naturalWidth);1!==c&&(o*=c,a*=c,r*=c,l*=c);var d=r/l,u=ht({aspectRatio:d,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=ht({aspectRatio:d,width:t.minWidth||0,height:t.minHeight||0},"cover"),h=ht({aspectRatio:d,width:t.width||(1!==c?i.width:r),height:t.height||(1!==c?i.height:l)}),m=h.width,f=h.height;m=Math.min(u.width,Math.max(p.width,m)),f=Math.min(u.height,Math.max(p.height,f));var g=document.createElement("canvas"),v=g.getContext("2d");g.width=F(m),g.height=F(f),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,m,f);var b=t.imageSmoothingEnabled,w=void 0===b||b,y=t.imageSmoothingQuality;v.imageSmoothingEnabled=w,y&&(v.imageSmoothingQuality=y);var x,C,_,k,T,S,M=i.width,A=i.height,D=o,E=a;D<=-r||D>M?(D=0,x=0,_=0,T=0):D<=0?(_=-D,D=0,T=x=Math.min(M,r+D)):D<=M&&(_=0,T=x=Math.min(r,M-D)),x<=0||E<=-l||E>A?(E=0,C=0,k=0,S=0):E<=0?(k=-E,E=0,S=C=Math.min(A,l+E)):E<=A&&(k=0,S=C=Math.min(l,A-E));var L=[D,E,x,C];if(T>0&&S>0){var P=m/r;L.push(_*P,k*P,T*P,S*P)}return v.drawImage.apply(v,[i].concat(s(L.map((function(t){return Math.floor(F(t))}))))),g},setAspectRatio:function(t){var e=this.options;return this.disabled||N(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var o="crop"===t,a=e.movable&&"move"===t;t=o||a?t:"none",e.dragMode=t,tt(i,w,t),K(i,p,o),K(i,b,a),e.cropBoxMovable||(tt(n,w,t),K(n,p,o),K(n,b,a))}return this}},kt=c.Cropper,Tt=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,t),!e||!E.test(e.tagName))throw new Error("The first argument is required and must be an or element.");this.element=e,this.options=Y({},L,z(i)&&i),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}var e,i,a;return e=t,a=[{key:"noConflict",value:function(){return window.Cropper=kt,t}},{key:"setDefaults",value:function(t){Y(L,z(t)&&t)}}],(i=[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e.cropper){if(e.cropper=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e=this;if(t){this.url=t,this.imageData={};var i=this.element,n=this.options;if(n.rotatable||n.scalable||(n.checkOrientation=!1),n.checkOrientation&&window.ArrayBuffer)if(A.test(t))D.test(t)?this.read((o=t.replace(gt,""),a=atob(o),s=new ArrayBuffer(a.length),U(r=new Uint8Array(s),(function(t,e){r[e]=a.charCodeAt(e)})),s)):this.clone();else{var o,a,s,r,l=new XMLHttpRequest,c=this.clone.bind(this);this.reloading=!0,this.xhr=l,l.onabort=c,l.onerror=c,l.ontimeout=c,l.onprogress=function(){"image/jpeg"!==l.getResponseHeader("content-type")&&l.abort()},l.onload=function(){e.read(l.response)},l.onloadend=function(){e.reloading=!1,e.xhr=null},n.checkCrossOrigin&&ct(t)&&i.crossOrigin&&(t=dt(t)),l.open("GET",t,!0),l.responseType="arraybuffer",l.withCredentials="use-credentials"===i.crossOrigin,l.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,n=vt(t),o=0,a=1,s=1;if(n>1){this.url=function(t,e){for(var i=[],n=new Uint8Array(t);n.length>0;)i.push(ft.apply(null,W(n.subarray(0,8192)))),n=n.subarray(8192);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}(t,"image/jpeg");var r=function(t){var e=0,i=1,n=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:n=-1;break;case 5:e=90,n=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:n}}(n);o=r.rotate,a=r.scaleX,s=r.scaleY}e.rotatable&&(i.rotate=o),e.scalable&&(i.scaleX=a,i.scaleY=s),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,n=e;this.options.checkCrossOrigin&&ct(e)&&(i||(i="anonymous"),n=dt(e)),this.crossOrigin=i,this.crossOriginUrl=n;var o=document.createElement("img");i&&(o.crossOrigin=i),o.src=n||e,o.alt=t.alt||"The image to crop",this.image=o,o.onload=this.start.bind(this),o.onerror=this.stop.bind(this),q(o,f),t.parentNode.insertBefore(o,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=c.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(c.navigator.userAgent),n=function(e,i){Y(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.initialImageData=Y({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var o=document.createElement("img"),a=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){n(o.width,o.height),i||a.removeChild(o)},o.src=e.src,i||(o.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",a.appendChild(o))}else n(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,n=t.parentNode,o=document.createElement("div");o.innerHTML='
    ';var a=o.querySelector(".".concat("cropper","-container")),s=a.querySelector(".".concat("cropper","-canvas")),r=a.querySelector(".".concat("cropper","-drag-box")),l=a.querySelector(".".concat("cropper","-crop-box")),c=l.querySelector(".".concat("cropper","-face"));this.container=n,this.cropper=a,this.canvas=s,this.dragBox=r,this.cropBox=l,this.viewBox=a.querySelector(".".concat("cropper","-view-box")),this.face=c,s.appendChild(i),q(t,m),n.insertBefore(a,t.nextSibling),this.isImg||Z(i,f),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,q(l,m),e.guides||q(l.getElementsByClassName("".concat("cropper","-dashed")),m),e.center||q(l.getElementsByClassName("".concat("cropper","-center")),m),e.background&&q(a,"".concat("cropper","-bg")),e.highlight||q(c,g),e.cropBoxMovable&&(q(c,b),tt(c,w,"all")),e.cropBoxResizable||(q(l.getElementsByClassName("".concat("cropper","-line")),m),q(l.getElementsByClassName("".concat("cropper","-point")),m)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),j(e.ready)&&ot(t,"ready",e.ready,{once:!0}),at(t,"ready")}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),Z(this.element,m))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}])&&o(e.prototype,i),a&&o(e,a),t}();return Y(Tt.prototype,bt,wt,yt,xt,Ct,_t),Tt}()},yLpj:function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},zlB4:function(t,e,i){"use strict";i.r(e);var n=i("lcPr"),o=i.n(n),a=(i("YQfW"),i("lb/t")),s=(i("i3gq"),i("JMt0"));function r(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return l(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i10&&(t.licenseTitle=t.availableLicenses.filter((function(e){return e.id==t.licenseId})).map((function(t){return t.title}))[0]),t.fetchProfile()}))},mounted:function(){this.mediaWatcher()},methods:{timeAgo:function(t){return App.util.format.timeAgo(t)},fetchProfile:function(){var t=this,e={public:"Public",private:"Followers Only",unlisted:"Unlisted"};if(window._sharedData.curUser.id){if(this.profile=window._sharedData.curUser,this.composeSettings&&this.composeSettings.hasOwnProperty("default_scope")&&this.composeSettings.default_scope){var i=this.composeSettings.default_scope;this.visibility=i,this.visibilityTag=e[i]}1==this.profile.locked&&(this.visibility="private",this.visibilityTag="Followers Only")}else axios.get("/api/pixelfed/v1/accounts/verify_credentials").then((function(i){if(window._sharedData.currentUser=i.data,t.profile=i.data,t.composeSettings&&t.composeSettings.hasOwnProperty("default_scope")&&t.composeSettings.default_scope){var n=t.composeSettings.default_scope;t.visibility=n,t.visibilityTag=e[n]}1==t.profile.locked&&(t.visibility="private",t.visibilityTag="Followers Only")})).catch((function(t){}))},addMedia:function(t){var e=$(t.target);e.attr("disabled",""),$('.file-input[name="media"]').trigger("click"),e.blur(),e.removeAttr("disabled")},addText:function(t){this.pageTitle="New Text Post",this.page="addText",this.textMode=!0,this.mode="text"},mediaWatcher:function(){var t=this;$(document).on("change","#pf-dz",(function(e){t.mediaUpload()}))},mediaUpload:function(){var t=this;t.uploading=!0;var e=document.querySelector("#pf-dz");e.files.length||(t.uploading=!1),Array.prototype.forEach.call(e.files,(function(e,i){if(t.media&&t.media.length+i>=t.config.uploader.album_limit)return swal("Error","You can only upload "+t.config.uploader.album_limit+" photos per album","error"),t.uploading=!1,void(t.page=2);var n=e.type,o=t.config.uploader.media_types.split(",");if(-1==$.inArray(n,o))return swal("Invalid File Type","The file you are trying to add is not a valid mime type. Please upload a "+t.config.uploader.media_types+" only.","error"),t.uploading=!1,void(t.page=2);var a=new FormData;a.append("file",e);var s={onUploadProgress:function(e){var i=Math.round(100*e.loaded/e.total);t.uploadProgress=i}};axios.post("/api/compose/v0/media/upload",a,s).then((function(e){t.uploadProgress=100,t.ids.push(e.data.id),t.media.push(e.data),t.uploading=!1,setTimeout((function(){t.page=3}),300)})).catch((function(i){switch(i.response.status){case 451:t.uploading=!1,e.value=null,swal("Banned Content","This content has been banned and cannot be uploaded.","error"),t.page=2;break;case 429:t.uploading=!1,e.value=null,swal("Limit Reached","You can upload up to 250 photos or videos per day and you've reached that limit. Please try again later.","error"),t.page=2;break;default:t.uploading=!1,e.value=null,swal("Oops, something went wrong!","An unexpected error occurred.","error"),t.page=2}})),e.value=null,t.uploadProgress=0}))},toggleFilter:function(t,e){this.media[this.carouselCursor].filter_class=e,this.currentFilter=e},deleteMedia:function(){var t=this;if(0!=window.confirm("Are you sure you want to delete this media?")){var e=this.media[this.carouselCursor].id;axios.delete("/api/compose/v0/media/delete",{params:{id:e}}).then((function(e){t.ids.splice(t.carouselCursor,1),t.media.splice(t.carouselCursor,1),0==t.media.length?(t.ids=[],t.media=[],t.carouselCursor=0):t.carouselCursor=0})).catch((function(t){swal("Whoops!","An error occured when attempting to delete this, please try again","error")}))}},compose:function(){var t=this,e=this.composeState;if(100==this.uploadProgress&&0!=this.ids.length)if(this.composeText.length>this.config.uploader.max_caption_length)swal("Error","Caption is too long","error");else switch(e){case"publish":if(!0===this.composeSettings.media_descriptions)if(this.media.filter((function(t){return!t.hasOwnProperty("alt")||t.alt.length<2})).length)return void swal("Missing media descriptions","You have enabled mandatory media descriptions. Please add media descriptions under Advanced settings to proceed. For more information, please see the media settings page.","warning");if(0==this.media.length)return void swal("Whoops!","You need to add media before you can save this!","warning");"Add optional caption..."==this.composeText&&(this.composeText="");var i={media:this.media,caption:this.composeText,visibility:this.visibility,cw:this.nsfw,comments_disabled:this.commentsDisabled,place:this.place,tagged:this.taggedUsernames,optimize_media:this.optimizeMedia,license:this.licenseId,video:this.video};return this.collectionsSelected.length&&(i.collections=this.collectionsSelected.map((function(e){return t.collections[e].id}))),void axios.post("/api/compose/v0/publish",i).then((function(t){var e=t.data;"/i/web/compose"===location.pathname?location.href="/i/web/post/"+e.split("/").at(-1):location.href=e})).catch((function(t){var e=t.response.data.message?t.response.data.message:"An unexpected error occured.";swal("Oops, something went wrong!",e,"error")}));case"delete":return this.ids=[],this.media=[],this.carouselCursor=0,this.composeText="",this.composeTextLength=0,void $("#composeModal").modal("hide")}},composeTextPost:function(){var t=this.composeState;if(this.composeText.length>this.config.uploader.max_caption_length)swal("Error","Caption is too long","error");else switch(t){case"publish":var e={caption:this.composeText,visibility:this.visibility,cw:this.nsfw,comments_disabled:this.commentsDisabled,place:this.place,tagged:this.taggedUsernames};return void axios.post("/api/compose/v0/publish/text",e).then((function(t){var e=t.data;window.location.href=e})).catch((function(t){var e=t.response.data.message?t.response.data.message:"An unexpected error occured.";swal("Oops, something went wrong!",e,"error")}));case"delete":return this.ids=[],this.media=[],this.carouselCursor=0,this.composeText="",this.composeTextLength=0,void $("#composeModal").modal("hide")}},closeModal:function(){$("#composeModal").modal("hide")},goBack:function(){switch(this.pageTitle="",this.mode){case"photo":switch(this.page){case"addText":this.page=1;break;case"textOptions":this.page="addText";break;case"cropPhoto":case"editMedia":this.page=2;break;case"tagPeopleHelp":this.showTagCard();break;case"licensePicker":this.page=3;break;case"video-2":this.page=1;break;default:-1!=this.namedPages.indexOf(this.page)?this.page=3:this.page--}break;case"video":switch(this.page){case"licensePicker":case"video-2":default:this.page="video-2"}break;default:switch(this.page){case"addText":this.page=1;break;case"textOptions":this.page="addText";break;case"cropPhoto":case"editMedia":this.page=2;break;case"tagPeopleHelp":this.showTagCard();break;case"licensePicker":this.page=3;break;case"video-2":this.page=1;break;default:-1!=this.namedPages.indexOf(this.page)?this.page="text"==this.mode?"addText":3:"text"==this.mode||this.page--}}},nextPage:function(){switch(this.pageTitle="",this.page){case 1:this.page=2;break;case"cropPhoto":this.pageLoading=!0;var t=this;this.$refs.cropper.getCroppedCanvas({maxWidth:4096,maxHeight:4096,fillColor:"#fff",imageSmoothingEnabled:!1,imageSmoothingQuality:"high"}).toBlob((function(e){t.mediaCropped=!0;var i=new FormData;i.append("file",e),i.append("id",t.ids[t.carouselCursor]);axios.post("/api/compose/v0/media/update",i).then((function(e){t.media[t.carouselCursor].url=e.data.url,t.pageLoading=!1,t.page=2})).catch((function(t){}))}));break;case 2:this.currentFilter?window.confirm("Are you sure you want to apply this filter?")&&(this.applyFilterToMedia(),this.page++):this.page++;break;case 3:this.page++}},rotate:function(){this.$refs.cropper.rotate(90)},changeAspect:function(t){this.cropper.aspectRatio=t,this.$refs.cropper.setAspectRatio(t)},showTagCard:function(){this.pageTitle="Tag People",this.page="tagPeople"},showTagHelpCard:function(){this.pageTitle="About Tag People",this.page="tagPeopleHelp"},showLocationCard:function(){this.pageTitle="Add Location",this.page="addLocation"},showAdvancedSettingsCard:function(){this.pageTitle="Advanced Settings",this.page="advancedSettings"},locationSearch:function(t){if(t.length<1)return[];return axios.get("/api/compose/v0/search/location",{params:{q:t}}).then((function(t){return t.data}))},getResultValue:function(t){return t.name+", "+t.country},onSubmitLocation:function(t){switch(this.place=t,this.mode){case"photo":this.pageTitle="",this.page=3;break;case"video":this.pageTitle="Edit Video Details",this.page="video-2";break;case"text":this.pageTitle="New Text Post",this.page="addText"}},showVisibilityCard:function(){this.pageTitle="Post Visibility",this.page="visibility"},showAddToStoryCard:function(){this.pageTitle="Add to Story",this.page="addToStory"},showCropPhotoCard:function(){this.pageTitle="Edit Photo",this.page="cropPhoto"},toggleVisibility:function(t){switch(this.visibility=t,this.visibilityTag={public:"Public",private:"Followers Only",unlisted:"Unlisted"}[t],this.mode){case"photo":this.pageTitle="",this.page=3;break;case"video":this.pageTitle="Edit Video Details",this.page="video-2";break;case"text":this.pageTitle="New Text Post",this.page="addText"}},showMediaDescriptionsCard:function(){this.pageTitle="Media Descriptions",this.page="altText"},showAddToCollectionsCard:function(){this.pageTitle="Add to Collection",this.page="addToCollection"},showSchedulePostCard:function(){this.pageTitle="Schedule Post",this.page="schedulePost"},showEditMediaCard:function(){this.pageTitle="Edit Media",this.page="editMedia"},fetchCameraRollDrafts:function(){var t=this;axios.get("/api/pixelfed/local/drafts").then((function(e){t.cameraRollMedia=e.data}))},applyFilterToMedia:function(){var t=navigator.userAgent.toLowerCase();if(-1!=t.indexOf("firefox")||-1!=t.indexOf("chrome"))for(var e=this.media,i=null,n=document.getElementById("pr_canvas"),o=n.getContext("2d"),a=document.getElementById("pr_img"),s=null,r=e.length-1;r>=0;r--)(i=e[r]).filter_class&&(a.src=i.url,a.addEventListener("load",(function(t){n.width=a.width,n.height=a.height,o.filter=App.util.filterCss[i.filter_class],o.drawImage(a,0,0,a.width,a.height),o.save(),n.toBlob((function(t){(s=new FormData).append("file",t),s.append("id",i.id),axios.post("/api/compose/v0/media/update",s).then((function(t){})).catch((function(t){}))}))}),i.mime,.9),o.clearRect(0,0,a.width,a.height));else swal("Oops!","Your browser does not support the filter feature.","error")},tagSearch:function(t){if(t.length<1)return[];var e=this;return axios.get("/api/compose/v0/search/tag",{params:{q:t}}).then((function(t){if(t.data.length)return t.data.filter((function(t){return 0==e.taggedUsernames.filter((function(e){return e.id==t.id})).length}))}))},getTagResultValue:function(t){return"@"+t.name},onTagSubmitLocation:function(t){this.taggedUsernames.filter((function(e){return e.id==t.id})).length||(this.taggedUsernames.push(t),this.$refs.autocomplete.value="")},untagUsername:function(t){this.taggedUsernames.splice(t,1)},showTextOptions:function(){this.page="textOptions",this.pageTitle="Text Post Options"},showLicenseCard:function(){this.pageTitle="Select a License",this.page="licensePicker"},toggleLicense:function(t){var e=this;switch(this.licenseId=t.id,this.licenseId>10?this.licenseTitle=this.availableLicenses.filter((function(t){return t.id==e.licenseId})).map((function(t){return t.title}))[0]:this.licenseTitle=null,this.mode){case"photo":this.pageTitle="",this.page=3;break;case"video":this.pageTitle="Edit Video Details",this.page="video-2";break;case"text":this.pageTitle="New Text Post",this.page="addText"}},newPoll:function(){this.page="poll"},savePollOption:function(){-1==this.pollOptions.indexOf(this.pollOptionModel)?(this.pollOptions.push(this.pollOptionModel),this.pollOptionModel=null):this.pollOptionModel=null},deletePollOption:function(t){this.pollOptions.splice(t,1)},postNewPoll:function(){var t=this;this.postingPoll=!0,axios.post("/api/compose/v0/poll",{caption:this.composeText,cw:!1,visibility:this.visibility,comments_disabled:!1,expiry:this.pollExpiry,pollOptions:this.pollOptions}).then((function(e){if(!e.data.hasOwnProperty("url"))return swal("Oops!","An error occured while attempting to create this poll. Please refresh the page and try again.","error"),void(t.postingPoll=!1);window.location.href=e.data.url})).catch((function(e){if(console.log(e.response.data.error),e.response.data.hasOwnProperty("error")&&"Duplicate detected."==e.response.data.error)return t.postingPoll=!1,void swal("Oops!","The poll you are trying to create is similar to an existing poll you created. Please make the poll question (caption) unique.","error");t.postingPoll=!1,swal("Oops!","An error occured while attempting to create this poll. Please refresh the page and try again.","error")}))},filesize:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){return filesize(1024*t,{round:0})})),showCollectionCard:function(){this.pageTitle="Add to Collection(s)",this.page="addToCollection",this.collectionsLoaded||this.fetchCollections()},fetchCollections:function(){var t=this;axios.get("/api/local/profile/collections/".concat(this.profile.id)).then((function(e){t.collections=e.data,t.collectionsLoaded=!0,t.collectionsCanLoadMore=9==e.data.length,t.collectionsPage++}))},toggleCollectionItem:function(t){if(this.collectionsSelected.includes(t))this.collectionsSelected=this.collectionsSelected.filter((function(e){return e!=t}));else{if(7==this.collectionsSelected.length)return void swal("Oops!","You can only share to 5 collections.","info");this.collectionsSelected.push(t)}},clearSelectedCollections:function(){this.collectionsSelected=[],this.page=3},loadMoreCollections:function(){var t=this;this.collectionsCanLoadMore=!1,axios.get("/api/local/profile/collections/".concat(this.profile.id),{params:{page:this.collectionsPage}}).then((function(e){var i,n=t.collections.map((function(t){return t.id})),o=e.data.filter((function(t){return!n.includes(t.id)}));o&&o.length&&((i=t.collections).push.apply(i,r(o)),t.collectionsPage++,t.collectionsCanLoadMore=!0)}))}}},d=(i("6Wrw"),i("KHd+")),u=Object(d.a)(c,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"compose-modal-component"},[i("input",{staticClass:"w-100 h-100 d-none file-input",attrs:{type:"file",id:"pf-dz",name:"media",multiple:"",accept:t.config.uploader.media_types}}),t._v(" "),i("canvas",{staticClass:"d-none",attrs:{id:"pr_canvas"}}),t._v(" "),i("img",{staticClass:"d-none",attrs:{id:"pr_img"}}),t._v(" "),i("div",{staticClass:"timeline"},[t.uploading?i("div",[i("div",{staticClass:"card status-card card-md-rounded-0 w-100 h-100 bg-light py-3",staticStyle:{"border-bottom":"1px solid #f1f1f1"}},[i("div",{staticClass:"p-5 mt-2"},[i("b-progress",{attrs:{value:t.uploadProgress,max:100,striped:"",animated:!0}}),t._v(" "),i("p",{staticClass:"text-center mb-0 font-weight-bold"},[t._v("Uploading ... ("+t._s(t.uploadProgress)+"%)")])],1)])]):"cameraRoll"==t.page?i("div",[i("div",{staticClass:"card status-card card-md-rounded-0",staticStyle:{display:"flex"}},[t._m(0),t._v(" "),i("div",{staticClass:"h-100 card-body p-0 border-top",staticStyle:{width:"100%","min-height":"400px"}},[t.cameraRollMedia.length>0?i("div",{staticClass:"row p-0 m-0"},t._l(t.cameraRollMedia,(function(t,e){return i("div",{class:[0==e?"col-12 p-0":"col-3 p-0"]},[i("div",{staticClass:"card info-overlay p-0 rounded-0 shadow-none border"},[i("div",{staticClass:"square"},[i("img",{staticClass:"square-content",attrs:{src:t.preview_url}})])])])})),0):i("div",{staticClass:"w-100 h-100 d-flex justify-content-center align-items-center"},[i("span",{staticClass:"w-100 h-100"},[i("button",{staticClass:"btn btn-primary",attrs:{type:"button"}},[t._v("Upload")]),t._v(" "),i("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:function(e){return t.fetchCameraRollDrafts()}}},[t._v("Load Camera Roll")])])])])])]):"poll"==t.page?i("div",[i("div",{staticClass:"card status-card card-md-rounded-0",staticStyle:{display:"flex"}},[i("div",{staticClass:"card-header d-inline-flex align-items-center justify-content-between bg-white"},[t._m(1),t._v(" "),i("span",{staticClass:"font-weight-bold"},[t._v("\n\t\t\t\t\t\tNew Poll\n\t\t\t\t\t")]),t._v(" "),t.postingPoll?i("span",[t._m(2)]):!t.postingPoll&&t.pollOptions.length>1&&t.composeText.length?i("button",{staticClass:"btn btn-primary btn-sm font-weight-bold",on:{click:t.postNewPoll}},[i("span",[t._v("Create Poll")])]):i("span",{staticClass:"font-weight-bold text-lighter"},[t._v("\n\t\t\t\t\t\tCreate Poll\n\t\t\t\t\t")])]),t._v(" "),i("div",{staticClass:"h-100 card-body p-0 border-top",staticStyle:{width:"100%","min-height":"400px"}},[i("div",{staticClass:"border-bottom mt-2"},[i("div",{staticClass:"media px-3"},[i("img",{staticClass:"rounded-circle",attrs:{src:t.profile.avatar,width:"42px",height:"42px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small d-none"},[t._v("Caption")]),t._v(" "),i("vue-tribute",{attrs:{options:t.tributeSettings}},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.composeText,expression:"composeText"}],staticClass:"form-control border-0 rounded-0 no-focus",attrs:{rows:"3",placeholder:"Write a poll question..."},domProps:{value:t.composeText},on:{keyup:function(e){t.composeTextLength=t.composeText.length},input:function(e){e.target.composing||(t.composeText=e.target.value)}}})]),t._v(" "),i("p",{staticClass:"help-text small text-right text-muted mb-0"},[t._v(t._s(t.composeTextLength)+"/"+t._s(t.config.uploader.max_caption_length))])],1)])])]),t._v(" "),i("div",{staticClass:"p-3"},[i("p",{staticClass:"font-weight-bold text-muted small"},[t._v("\n\t\t\t\t\t\t\tPoll Options\n\t\t\t\t\t\t")]),t._v(" "),t.pollOptions.length<4?i("div",{staticClass:"form-group mb-4"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.pollOptionModel,expression:"pollOptionModel"}],staticClass:"form-control rounded-pill",attrs:{type:"text",placeholder:"Add a poll option, press enter to save"},domProps:{value:t.pollOptionModel},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.savePollOption.apply(null,arguments)},input:function(e){e.target.composing||(t.pollOptionModel=e.target.value)}}})]):t._e(),t._v(" "),t._l(t.pollOptions,(function(e,n){return i("div",{staticClass:"form-group mb-4 d-flex align-items-center",staticStyle:{"max-width":"400px",position:"relative"}},[i("span",{staticClass:"font-weight-bold mr-2",staticStyle:{position:"absolute",left:"10px"}},[t._v(t._s(n+1)+".")]),t._v(" "),t.pollOptions[n].length<50?i("input",{directives:[{name:"model",rawName:"v-model",value:t.pollOptions[n],expression:"pollOptions[index]"}],staticClass:"form-control rounded-pill",staticStyle:{"padding-left":"30px","padding-right":"90px"},attrs:{type:"text",placeholder:"Add a poll option, press enter to save"},domProps:{value:t.pollOptions[n]},on:{input:function(e){e.target.composing||t.$set(t.pollOptions,n,e.target.value)}}}):i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.pollOptions[n],expression:"pollOptions[index]"}],staticClass:"form-control",staticStyle:{"padding-left":"30px","padding-right":"90px"},attrs:{placeholder:"Add a poll option, press enter to save",rows:"3"},domProps:{value:t.pollOptions[n]},on:{input:function(e){e.target.composing||t.$set(t.pollOptions,n,e.target.value)}}}),t._v(" "),i("button",{staticClass:"btn btn-danger btn-sm rounded-pill font-weight-bold",staticStyle:{position:"absolute",right:"5px"},on:{click:function(e){return t.deletePollOption(n)}}},[i("i",{staticClass:"fas fa-trash"}),t._v(" Delete\n\t\t\t\t\t\t\t")])])})),t._v(" "),i("hr"),t._v(" "),i("div",{staticClass:"d-flex justify-content-between"},[i("div",[i("p",{staticClass:"font-weight-bold text-muted small"},[t._v("\n\t\t\t\t\t\t\t\t\tPoll Expiry\n\t\t\t\t\t\t\t\t")]),t._v(" "),i("div",{staticClass:"form-group"},[i("select",{directives:[{name:"model",rawName:"v-model",value:t.pollExpiry,expression:"pollExpiry"}],staticClass:"form-control rounded-pill",staticStyle:{width:"200px"},on:{change:function(e){var i=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.pollExpiry=e.target.multiple?i:i[0]}}},[i("option",{attrs:{value:"60"}},[t._v("1 hour")]),t._v(" "),i("option",{attrs:{value:"360"}},[t._v("6 hours")]),t._v(" "),i("option",{attrs:{value:"1440",selected:""}},[t._v("24 hours")]),t._v(" "),i("option",{attrs:{value:"10080"}},[t._v("7 days")])])])]),t._v(" "),i("div",[i("p",{staticClass:"font-weight-bold text-muted small"},[t._v("\n\t\t\t\t\t\t\t\t\tPoll Visibility\n\t\t\t\t\t\t\t\t")]),t._v(" "),i("div",{staticClass:"form-group"},[i("select",{directives:[{name:"model",rawName:"v-model",value:t.visibility,expression:"visibility"}],staticClass:"form-control rounded-pill",staticStyle:{"max-width":"200px"},on:{change:function(e){var i=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.visibility=e.target.multiple?i:i[0]}}},[i("option",{attrs:{value:"public"}},[t._v("Public")]),t._v(" "),i("option",{attrs:{value:"private"}},[t._v("Followers Only")])])])])])],2)])])]):i("div",[i("div",{staticClass:"card status-card card-md-rounded-0 w-100 h-100",staticStyle:{display:"flex"}},[i("div",{staticClass:"card-header d-inline-flex align-items-center justify-content-between bg-white"},[i("div",[1==t.page?i("a",{staticClass:"font-weight-bold text-decoration-none text-muted",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.closeModal()}}},[i("i",{staticClass:"fas fa-times fa-lg"}),t._v(" "),i("span",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.pageTitle))])]):2==t.page?i("span",[t.config.uploader.album_limit>t.media.length?i("button",{staticClass:"btn btn-outline-primary btn-sm font-weight-bold",attrs:{id:"cm-add-media-btn"},on:{click:function(e){return e.preventDefault(),t.addMedia.apply(null,arguments)}}},[i("i",{staticClass:"fas fa-plus"})]):i("button",{staticClass:"btn btn-outline-secondary btn-sm font-weight-bold",attrs:{disabled:""}},[i("i",{staticClass:"fas fa-plus"})]),t._v(" "),i("b-tooltip",{attrs:{target:"cm-add-media-btn",triggers:"hover"}},[t._v("\n\t\t\t\t\t\t\t\tUpload another photo or video\n\t\t\t\t\t\t\t")])],1):3==t.page?i("span",[i("a",{staticClass:"text-lighter text-decoration-none mr-3 d-flex align-items-center",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.goBack()}}},[i("i",{staticClass:"fas fa-long-arrow-alt-left fa-lg mr-2"}),t._v(" "),i("span",{staticClass:"btn btn-outline-secondary btn-sm px-2 py-0 disabled",attrs:{disabled:""}},[t._v(t._s(t.media.length))])]),t._v(" "),i("span",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.pageTitle))])]):i("span",[i("a",{staticClass:"text-lighter text-decoration-none mr-3",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.goBack()}}},[i("i",{staticClass:"fas fa-long-arrow-alt-left fa-lg"})])]),t._v(" "),i("span",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.pageTitle))])]),t._v(" "),2==t.page?i("div",[1==t.media.length?i("a",{staticClass:"text-center text-dark",attrs:{href:"#",title:"Crop & Resize",id:"cm-crop-btn"},on:{click:function(e){return e.preventDefault(),t.showCropPhotoCard.apply(null,arguments)}}},[i("i",{staticClass:"fas fa-crop-alt fa-lg"})]):t._e(),t._v(" "),i("b-tooltip",{attrs:{target:"cm-crop-btn",triggers:"hover"}},[t._v("\n\t\t\t\t\t\t\tCrop & Resize\n\t\t\t\t\t\t")])],1):t._e(),t._v(" "),i("div",[t.pageLoading?i("span",[t._m(3)]):i("span",[!t.pageLoading&&t.page>1&&t.page<=2||1==t.page&&0!=t.ids.length||"cropPhoto"==t.page?i("a",{staticClass:"font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.nextPage.apply(null,arguments)}}},[t._v("Next")]):t._e(),t._v(" "),t.pageLoading||3!=t.page?t._e():i("a",{staticClass:"font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.compose()}}},[t._v("Post")]),t._v(" "),t.pageLoading||"addText"!=t.page?t._e():i("a",{staticClass:"font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.composeTextPost()}}},[t._v("Post")]),t._v(" "),t.pageLoading||"video-2"!=t.page?t._e():i("a",{staticClass:"font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.compose()}}},[t._v("Post")])])])]),t._v(" "),i("div",{staticClass:"card-body p-0 border-top"},["licensePicker"==t.page?i("div",{staticClass:"w-100 h-100",staticStyle:{"min-height":"280px"}},[i("div",{staticClass:"list-group list-group-flush"},t._l(t.availableLicenses,(function(e,n){return i("div",{staticClass:"list-group-item cursor-pointer",class:{"text-primary":t.licenseId===e.id,"font-weight-bold":t.licenseId===e.id},on:{click:function(i){return t.toggleLicense(e)}}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(e.name)+"\n\t\t\t\t\t\t\t")])})),0)]):t._e(),t._v(" "),"textOptions"==t.page?i("div",{staticClass:"w-100 h-100",staticStyle:{"min-height":"280px"}}):t._e(),t._v(" "),"addText"==t.page?i("div",{staticClass:"w-100 h-100",staticStyle:{"min-height":"280px"}},[i("div",{staticClass:"mt-2"},[i("div",{staticClass:"media px-3"},[i("div",{staticClass:"media-body"},[i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small d-none"},[t._v("Body")]),t._v(" "),i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.composeText,expression:"composeText"}],staticClass:"form-control border-0 rounded-0 no-focus",staticStyle:{"font-size":"18px",resize:"none"},attrs:{rows:"7",placeholder:"What's happening?"},domProps:{value:t.composeText},on:{keyup:function(e){t.composeTextLength=t.composeText.length},input:function(e){e.target.composing||(t.composeText=e.target.value)}}}),t._v(" "),i("div",{staticClass:"border-bottom"}),t._v(" "),i("p",{staticClass:"help-text small text-right text-muted mb-0 font-weight-bold"},[t._v(t._s(t.composeTextLength)+"/"+t._s(t.config.uploader.max_caption_length))]),t._v(" "),i("p",{staticClass:"mb-0 mt-2"},[i("a",{staticClass:"btn btn-primary rounded-pill mr-2",staticStyle:{height:"37px"},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showTextOptions()}}},[i("i",{staticClass:"fas fa-palette px-3 text-white"})]),t._v(" "),i("a",{staticClass:"btn rounded-pill mx-3 d-inline-flex align-items-center",class:[t.nsfw?"btn-danger":"btn-outline-lighter"],staticStyle:{height:"37px"},attrs:{href:"#",title:"Mark as sensitive/not safe for work"},on:{click:function(e){e.preventDefault(),t.nsfw=!t.nsfw}}},[i("i",{staticClass:"far fa-flag px-3"}),t._v(" "),i("span",{staticClass:"text-muted small font-weight-bold"})]),t._v(" "),i("a",{staticClass:"btn btn-outline-lighter rounded-pill d-inline-flex align-items-center",staticStyle:{height:"37px"},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[i("i",{staticClass:"fas fa-eye mr-2"}),t._v(" "),i("span",{staticClass:"text-muted small font-weight-bold"},[t._v(t._s(t.visibilityTag))])])])])])])])]):t._e(),t._v(" "),1==t.page?i("div",{staticClass:"w-100 h-100 d-flex justify-content-center align-items-center",staticStyle:{"min-height":"400px"}},[i("div",{staticClass:"text-center"},[0==t.media.length?i("div",{staticClass:"card my-md-3 shadow-none border compose-action text-decoration-none text-dark"},[i("div",{staticClass:"card-body py-2",on:{click:function(e){return e.preventDefault(),t.addMedia.apply(null,arguments)}}},[i("div",{staticClass:"media"},[t._m(4),t._v(" "),i("div",{staticClass:"media-body text-left"},[t._m(5),t._v(" "),i("p",{staticClass:"mb-0 text-muted"},[t._v("Share up to "+t._s(t.config.uploader.album_limit)+" photos or videos")]),t._v(" "),i("p",{staticClass:"mb-0 text-muted small"},[i("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.config.uploader.media_types.split(",").map((function(t){return t.split("/")[1]})).join(", ")))]),t._v(" allowed up to "),i("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.filesize(t.config.uploader.max_photo_size)))])])])])])]):t._e(),t._v(" "),t._e(),t._v(" "),1==t.config.features.stories?i("a",{staticClass:"card my-md-3 shadow-none border compose-action text-decoration-none text-dark",attrs:{href:"/i/stories/new"}},[t._m(7)]):t._e(),t._v(" "),t._e(),t._v(" "),t._m(9),t._v(" "),t._m(10)])]):t._e(),t._v(" "),"cropPhoto"==t.page?i("div",{staticClass:"w-100 h-100"},[t.ids.length>0?i("div",[i("vue-cropper",{ref:"cropper",attrs:{relativeZoom:t.cropper.zoom,aspectRatio:t.cropper.aspectRatio,viewMode:t.cropper.viewMode,zoomable:t.cropper.zoomable,rotatable:!0,src:t.media[t.carouselCursor].url}})],1):t._e()]):t._e(),t._v(" "),2==t.page?i("div",{staticClass:"w-100 h-100"},[1==t.media.length?i("div",[i("div",{staticStyle:{display:"flex","min-height":"420px","align-items":"center"},attrs:{slot:"img"},slot:"img"},[i("img",{class:"d-block img-fluid w-100 "+[t.media[t.carouselCursor].filter_class?t.media[t.carouselCursor].filter_class:""],attrs:{src:t.media[t.carouselCursor].url,alt:t.media[t.carouselCursor].description,title:t.media[t.carouselCursor].description}})]),t._v(" "),i("hr"),t._v(" "),t.ids.length>0&&"Image"==t.media[t.carouselCursor].type?i("div",{staticClass:"align-items-center px-2 pt-2"},[i("ul",{staticClass:"nav media-drawer-filters text-center"},[i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{staticClass:"cursor-pointer",attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}})]),t._v(" "),i("a",{class:[null==t.media[t.carouselCursor].filter_class?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}},[t._v("No Filter")])]),t._v(" "),t._l(t.filters,(function(e,n){return i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{class:e[1],attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}})]),t._v(" "),i("a",{class:[t.media[t.carouselCursor].filter_class==e[1]?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}},[t._v(t._s(e[0]))])])}))],2)]):t._e()]):t.media.length>1?i("div",{staticClass:"d-flex-inline px-2 pt-2"},[i("ul",{staticClass:"nav media-drawer-filters text-center"},[i("li",{staticClass:"nav-item mx-md-4"},[t._v(" ")]),t._v(" "),t._l(t.media,(function(e,n){return i("li",{staticClass:"nav-item mx-md-4"},[i("div",{staticClass:"nav-link",staticStyle:{display:"block",width:"300px",height:"300px"},on:{click:function(e){t.carouselCursor=n}}},[i("span",{class:[e.filter_class?e.filter_class:""]},[i("span",{class:"rounded border "+[n==t.carouselCursor?" border-primary shadow":""],style:"display:block;padding:5px;width:100%;height:100%;background-image: url("+e.url+");background-size:cover;border-width:3px !important;"})])]),t._v(" "),n==t.carouselCursor?i("div",{staticClass:"text-center mb-0 small text-lighter font-weight-bold pt-2"},[i("span",{staticClass:"cursor-pointer",on:{click:function(e){return e.preventDefault(),t.showCropPhotoCard.apply(null,arguments)}}},[t._v("Crop")]),t._v(" "),i("span",{staticClass:"cursor-pointer px-3",on:{click:function(e){return e.preventDefault(),t.showEditMediaCard()}}},[t._v("Edit")]),t._v(" "),i("span",{staticClass:"cursor-pointer",on:{click:function(e){return t.deleteMedia()}}},[t._v("Delete")])]):t._e()])})),t._v(" "),i("li",{staticClass:"nav-item mx-md-4"},[t._v(" ")])],2),t._v(" "),i("hr"),t._v(" "),t.ids.length>0&&"Image"==t.media[t.carouselCursor].type?i("div",{staticClass:"align-items-center px-2 pt-2"},[i("ul",{staticClass:"nav media-drawer-filters text-center"},[i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{staticClass:"cursor-pointer",attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}})]),t._v(" "),i("a",{class:[null==t.media[t.carouselCursor].filter_class?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}},[t._v("No Filter")])]),t._v(" "),t._l(t.filters,(function(e,n){return i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{class:e[1],attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}})]),t._v(" "),i("a",{class:[t.media[t.carouselCursor].filter_class==e[1]?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}},[t._v(t._s(e[0]))])])}))],2)]):t._e()]):i("div",[i("p",{staticClass:"mb-0 p-5 text-center font-weight-bold"},[t._v("An error occured, please refresh the page.")])])]):t._e(),t._v(" "),3==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"border-bottom mt-2"},[i("div",{staticClass:"media px-3"},[i("img",{class:[t.media[0].filter_class?"mr-2 "+t.media[0].filter_class:"mr-2"],attrs:{src:t.media[0].url,width:"42px",height:"42px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small d-none"},[t._v("Caption")]),t._v(" "),i("vue-tribute",{attrs:{options:t.tributeSettings}},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.composeText,expression:"composeText"}],staticClass:"form-control border-0 rounded-0 no-focus",attrs:{rows:"3",placeholder:"Write a caption..."},domProps:{value:t.composeText},on:{keyup:function(e){t.composeTextLength=t.composeText.length},input:function(e){e.target.composing||(t.composeText=e.target.value)}}})]),t._v(" "),i("p",{staticClass:"help-text small text-right text-muted mb-0"},[t._v(t._s(t.composeTextLength)+"/"+t._s(t.config.uploader.max_caption_length))])],1)])])]),t._v(" "),i("div",{staticClass:"border-bottom d-flex justify-content-between px-4 mb-0 py-2 "},[t._m(11),t._v(" "),i("div",[i("div",{staticClass:"custom-control custom-switch",staticStyle:{"z-index":"9999"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.nsfw,expression:"nsfw"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"asnsfw"},domProps:{checked:Array.isArray(t.nsfw)?t._i(t.nsfw,null)>-1:t.nsfw},on:{change:function(e){var i=t.nsfw,n=e.target,o=!!n.checked;if(Array.isArray(i)){var a=t._i(i,null);n.checked?a<0&&(t.nsfw=i.concat([null])):a>-1&&(t.nsfw=i.slice(0,a).concat(i.slice(a+1)))}else t.nsfw=o}}}),t._v(" "),i("label",{staticClass:"custom-control-label",attrs:{for:"asnsfw"}})])])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2 cursor-pointer",on:{click:function(e){return t.showTagCard()}}},[t._v("Tag people")])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2 cursor-pointer",on:{click:function(e){return t.showCollectionCard()}}},[t._m(12),t._v(" "),i("span",{staticClass:"float-right"},[t.collectionsSelected.length?i("span",{staticClass:"btn btn-outline-secondary btn-sm small mr-3 mt-n1 disabled",staticStyle:{"font-size":"10px",padding:"3px 5px","text-transform":"uppercase"},attrs:{href:"#",disabled:""}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(t.collectionsSelected.length)+"\n\t\t\t\t\t\t\t\t\t")]):t._e(),t._v(" "),t._m(13)])])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2 cursor-pointer",on:{click:function(e){return t.showLicenseCard()}}},[i("span",[t._v("Add license")]),t._v(" "),i("span",{staticClass:"float-right"},[t.licenseTitle?i("a",{staticClass:"btn btn-outline-secondary btn-sm small mr-3 mt-n1 disabled",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#",disabled:""},on:{click:function(e){return e.preventDefault(),t.showLicenseCard()}}},[t._v(t._s(t.licenseTitle))]):t._e(),t._v(" "),i("a",{staticClass:"text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showLicenseCard()}}},[i("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])])])]),t._v(" "),i("div",{staticClass:"border-bottom"},[t.place?i("p",{staticClass:"px-4 mb-0 py-2"},[i("span",{staticClass:"text-lighter"},[t._v("Location:")]),t._v(" "+t._s(t.place.name)+", "+t._s(t.place.country)+"\n\t\t\t\t\t\t\t\t"),i("span",{staticClass:"float-right"},[i("a",{staticClass:"btn btn-outline-secondary btn-sm small mr-2",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showLocationCard()}}},[t._v("Edit")]),t._v(" "),i("a",{staticClass:"btn btn-outline-secondary btn-sm small",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.place=!1}}},[t._v("Remove")])])]):i("p",{staticClass:"px-4 mb-0 py-2 cursor-pointer",on:{click:function(e){return t.showLocationCard()}}},[t._v("Add location")])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2"},[i("span",[t._v("Audience")]),t._v(" "),i("span",{staticClass:"float-right"},[i("a",{staticClass:"btn btn-outline-secondary btn-sm small mr-3 mt-n1 disabled",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#",disabled:""},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[t._v(t._s(t.visibilityTag))]),t._v(" "),i("a",{staticClass:"text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[i("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])])])]),t._v(" "),i("div",{staticStyle:{"min-height":"200px"}},[i("p",{staticClass:"px-4 mb-0 py-2 small font-weight-bold text-muted cursor-pointer",on:{click:function(e){return t.showAdvancedSettingsCard()}}},[t._v("Advanced settings")])])]):t._e(),t._v(" "),"tagPeople"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("autocomplete",{directives:[{name:"show",rawName:"v-show",value:t.taggedUsernames.length<10,expression:"taggedUsernames.length < 10"}],ref:"autocomplete",attrs:{search:t.tagSearch,placeholder:"@pixelfed","aria-label":"Search usernames","get-result-value":t.getTagResultValue},on:{submit:t.onTagSubmitLocation}}),t._v(" "),i("p",{directives:[{name:"show",rawName:"v-show",value:t.taggedUsernames.length<10,expression:"taggedUsernames.length < 10"}],staticClass:"font-weight-bold text-muted small"},[t._v("You can tag "+t._s(10-t.taggedUsernames.length)+" more "+t._s(9==t.taggedUsernames.length?"person":"people")+"!")]),t._v(" "),i("p",{staticClass:"font-weight-bold text-center mt-3"},[t._v("Tagged People")]),t._v(" "),i("div",{staticClass:"list-group"},[t._l(t.taggedUsernames,(function(e,n){return i("div",{staticClass:"list-group-item d-flex justify-content-between"},[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-2 rounded-circle border",attrs:{src:e.avatar,width:"24px",height:"24px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("span",{staticClass:"font-weight-bold"},[t._v(t._s(e.name))])])]),t._v(" "),i("div",{staticClass:"custom-control custom-switch"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.privacy,expression:"tag.privacy"}],staticClass:"custom-control-input disabled",attrs:{type:"checkbox",id:"cci-tagged-privacy-switch"+n,disabled:""},domProps:{checked:Array.isArray(e.privacy)?t._i(e.privacy,null)>-1:e.privacy},on:{change:function(i){var n=e.privacy,o=i.target,a=!!o.checked;if(Array.isArray(n)){var s=t._i(n,null);o.checked?s<0&&t.$set(e,"privacy",n.concat([null])):s>-1&&t.$set(e,"privacy",n.slice(0,s).concat(n.slice(s+1)))}else t.$set(e,"privacy",a)}}}),t._v(" "),i("label",{staticClass:"custom-control-label font-weight-bold text-lighter",attrs:{for:"cci-tagged-privacy-switch"+n}},[t._v(t._s(e.privacy?"Public":"Private"))]),t._v(" "),i("a",{staticClass:"ml-3",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.untagUsername(n)}}},[i("i",{staticClass:"fas fa-times text-muted"})])])])})),t._v(" "),0==t.taggedUsernames.length?i("div",{staticClass:"list-group-item p-3"},[i("p",{staticClass:"text-center mb-0 font-weight-bold text-lighter"},[t._v("Search usernames to tag.")])]):t._e()],2),t._v(" "),i("p",{staticClass:"font-weight-bold text-center small text-muted pt-3 mb-0"},[t._v("When you tag someone, they are sent a notification."),i("br"),t._v("For more information on tagging, "),i("a",{staticClass:"text-primary",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showTagHelpCard()}}},[t._v("click here")]),t._v(".")])],1):t._e(),t._v(" "),"tagPeopleHelp"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"mb-0 text-center py-3 px-2 lead"},[t._v("Tagging someone is like mentioning them, with the option to make it private between you.")]),t._v(" "),i("p",{staticClass:"mb-3 py-3 px-2 font-weight-lighter"},[t._v("\n\t\t\t\t\t\t\tYou can choose to tag someone in public or private mode. Public mode will allow others to see who you tagged in the post and private mode tagged users will not be shown to others.\n\t\t\t\t\t\t")])]):t._e(),t._v(" "),"addLocation"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"mb-0"},[t._v("Add Location")]),t._v(" "),i("autocomplete",{attrs:{search:t.locationSearch,placeholder:"Search locations ...","aria-label":"Search locations ...","get-result-value":t.getResultValue},on:{submit:t.onSubmitLocation}})],1):t._e(),t._v(" "),"advancedSettings"==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"list-group list-group-flush"},[i("div",{staticClass:"list-group-item d-flex justify-content-between"},[t._m(14),t._v(" "),i("div",[i("div",{staticClass:"custom-control custom-switch",staticStyle:{"z-index":"9999"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.commentsDisabled,expression:"commentsDisabled"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"asdisablecomments"},domProps:{checked:Array.isArray(t.commentsDisabled)?t._i(t.commentsDisabled,null)>-1:t.commentsDisabled},on:{change:function(e){var i=t.commentsDisabled,n=e.target,o=!!n.checked;if(Array.isArray(i)){var a=t._i(i,null);n.checked?a<0&&(t.commentsDisabled=i.concat([null])):a>-1&&(t.commentsDisabled=i.slice(0,a).concat(i.slice(a+1)))}else t.commentsDisabled=o}}}),t._v(" "),i("label",{staticClass:"custom-control-label",attrs:{for:"asdisablecomments"}})])])]),t._v(" "),i("a",{staticClass:"list-group-item",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showMediaDescriptionsCard()}}},[t._m(15)])])]):t._e(),t._v(" "),"visibility"==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"list-group list-group-flush"},[t.profile.locked?t._e():i("div",{staticClass:"list-group-item lead cursor-pointer",class:{"text-primary":"public"==t.visibility},on:{click:function(e){return t.toggleVisibility("public")}}},[t._v("\n\t\t\t\t\t\t\t\tPublic\n\t\t\t\t\t\t\t")]),t._v(" "),t.profile.locked?t._e():i("div",{staticClass:"list-group-item lead cursor-pointer",class:{"text-primary":"unlisted"==t.visibility},on:{click:function(e){return t.toggleVisibility("unlisted")}}},[t._v("\n\t\t\t\t\t\t\t\tUnlisted\n\t\t\t\t\t\t\t")]),t._v(" "),i("div",{staticClass:"list-group-item lead cursor-pointer",class:{"text-primary":"private"==t.visibility},on:{click:function(e){return t.toggleVisibility("private")}}},[t._v("\n\t\t\t\t\t\t\t\tFollowers Only\n\t\t\t\t\t\t\t")])])]):t._e(),t._v(" "),"altText"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[t._l(t.media,(function(e,n){return i("div",[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-3",attrs:{src:e.preview_url,width:"50px",height:"50px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:e.alt,expression:"m.alt"}],staticClass:"form-control",attrs:{placeholder:"Add a media description here...",maxlength:t.maxAltTextLength,rows:"4"},domProps:{value:e.alt},on:{input:function(i){i.target.composing||t.$set(e,"alt",i.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text small text-right text-muted mb-0"},[t._v(t._s(e.alt?e.alt.length:0)+"/"+t._s(t.maxAltTextLength))])])]),t._v(" "),i("hr")])})),t._v(" "),i("p",{staticClass:"d-flex justify-content-between mb-0"},[i("button",{staticClass:"btn btn-link text-muted font-weight-bold text-decoration-none",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Cancel")]),t._v(" "),i("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Save")])])],2):t._e(),t._v(" "),"addToCollection"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[t.collectionsLoaded&&t.collections.length?i("div",{staticClass:"list-group mb-3 collections-list-group"},[t._l(t.collections,(function(e,n){return i("div",{staticClass:"list-group-item cursor-pointer compose-action border",class:{active:t.collectionsSelected.includes(n)},on:{click:function(e){return t.toggleCollectionItem(n)}}},[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-3",attrs:{src:e.thumb,alt:"",width:"50px",height:"50px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("h5",{staticClass:"mt-0"},[t._v(t._s(e.title))]),t._v(" "),i("p",{staticClass:"mb-0 text-muted small"},[t._v(t._s(e.post_count)+" Posts - Created "+t._s(t.timeAgo(e.published_at))+" ago")])])])])})),t._v(" "),t.collectionsCanLoadMore?i("button",{staticClass:"btn btn-light btn-block font-weight-bold mt-3",on:{click:t.loadMoreCollections}},[t._v("\n\t\t\t\t\t\t\t\tLoad more\n\t\t\t\t\t\t\t")]):t._e()],2):t._e(),t._v(" "),i("p",{staticClass:"d-flex justify-content-between mb-0"},[i("button",{staticClass:"btn btn-link text-muted font-weight-bold text-decoration-none",attrs:{type:"button"},on:{click:function(e){return t.clearSelectedCollections()}}},[t._v("Clear")]),t._v(" "),i("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Save")])])]):t._e(),t._v(" "),"schedulePost"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):t._e(),t._v(" "),"mediaMetadata"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):t._e(),t._v(" "),"addToStory"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):t._e(),t._v(" "),"editMedia"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-3",attrs:{src:t.media[t.carouselCursor].preview_url,width:"50px",height:"50px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small"},[t._v("Media Description")]),t._v(" "),i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.media[t.carouselCursor].alt,expression:"media[carouselCursor].alt"}],staticClass:"form-control",attrs:{placeholder:"Add a media description here...",maxlength:"140"},domProps:{value:t.media[t.carouselCursor].alt},on:{input:function(e){e.target.composing||t.$set(t.media[t.carouselCursor],"alt",e.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text small text-muted mb-0 d-flex justify-content-between"},[i("span",[t._v("Describe your photo for people with visual impairments.")]),t._v(" "),i("span",[t._v(t._s(t.media[t.carouselCursor].alt?t.media[t.carouselCursor].alt.length:0)+"/140")])])]),t._v(" "),i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small"},[t._v("License")]),t._v(" "),i("select",{directives:[{name:"model",rawName:"v-model",value:t.licenseId,expression:"licenseId"}],staticClass:"form-control",on:{change:function(e){var i=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.licenseId=e.target.multiple?i:i[0]}}},t._l(t.availableLicenses,(function(e,n){return i("option",{domProps:{value:e.id,selected:e.id==t.licenseId}},[t._v("\n\t\t\t\t\t\t\t\t\t\t\t"+t._s(e.name)+"\n\t\t\t\t\t\t\t\t\t\t")])})),0)])])]),t._v(" "),i("hr"),t._v(" "),i("p",{staticClass:"d-flex justify-content-between mb-0"},[i("button",{staticClass:"btn btn-link text-muted font-weight-bold text-decoration-none",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Cancel")]),t._v(" "),i("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Save")])])]):t._e(),t._v(" "),"video-2"==t.page?i("div",{staticClass:"w-100 h-100"},[t.video.title.length?i("div",{staticClass:"border-bottom"},[i("div",{staticClass:"media p-3"},[i("img",{class:[t.media[0].filter_class?"mr-2 "+t.media[0].filter_class:"mr-2"],attrs:{src:t.media[0].url,width:"100px",height:"70px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("p",{staticClass:"font-weight-bold mb-1"},[t._v(t._s(t.video.title?t.video.title.slice(0,70):"Untitled"))]),t._v(" "),i("p",{staticClass:"mb-0 text-muted small"},[t._v(t._s(t.video.description?t.video.description.slice(0,90):"No description"))])])])]):t._e(),t._v(" "),i("div",{staticClass:"border-bottom d-flex justify-content-between px-4 mb-0 py-2 "},[t._m(16),t._v(" "),i("div",[i("div",{staticClass:"custom-control custom-switch",staticStyle:{"z-index":"9999"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.nsfw,expression:"nsfw"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"asnsfw"},domProps:{checked:Array.isArray(t.nsfw)?t._i(t.nsfw,null)>-1:t.nsfw},on:{change:function(e){var i=t.nsfw,n=e.target,o=!!n.checked;if(Array.isArray(i)){var a=t._i(i,null);n.checked?a<0&&(t.nsfw=i.concat([null])):a>-1&&(t.nsfw=i.slice(0,a).concat(i.slice(a+1)))}else t.nsfw=o}}}),t._v(" "),i("label",{staticClass:"custom-control-label",attrs:{for:"asnsfw"}})])])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2 cursor-pointer",on:{click:function(e){return t.showLicenseCard()}}},[t._v("Add license")])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2"},[i("span",[t._v("Audience")]),t._v(" "),i("span",{staticClass:"float-right"},[i("a",{staticClass:"btn btn-outline-secondary btn-sm small mr-3 mt-n1 disabled",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#",disabled:""},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[t._v(t._s(t.visibilityTag))]),t._v(" "),i("a",{staticClass:"text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[i("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])])])]),t._v(" "),i("div",{staticClass:"p-3"},[i("div",{staticClass:"form-group"},[i("p",{staticClass:"small font-weight-bold text-muted mb-0"},[t._v("Title")]),t._v(" "),i("input",{directives:[{name:"model",rawName:"v-model",value:t.video.title,expression:"video.title"}],staticClass:"form-control",attrs:{placeholder:"Add a good title"},domProps:{value:t.video.title},on:{input:function(e){e.target.composing||t.$set(t.video,"title",e.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text mb-0 small text-muted"},[t._v(t._s(t.video.title.length)+"/70")])]),t._v(" "),i("div",{staticClass:"form-group mb-0"},[i("p",{staticClass:"small font-weight-bold text-muted mb-0"},[t._v("Description")]),t._v(" "),i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.video.description,expression:"video.description"}],staticClass:"form-control",attrs:{placeholder:"Add an optional description",maxlength:"5000",rows:"5"},domProps:{value:t.video.description},on:{input:function(e){e.target.composing||t.$set(t.video,"description",e.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text mb-0 small text-muted"},[t._v(t._s(t.video.description.length)+"/5000")])])])]):t._e()]),t._v(" "),"cropPhoto"==t.page?i("div",{staticClass:"card-footer bg-white d-flex justify-content-between"},[i("div",[i("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button"},on:{click:t.rotate}},[i("i",{staticClass:"fas fa-redo"})])]),t._v(" "),i("div",[i("div",{staticClass:"d-inline-block button-group"},[i("button",{class:"btn font-weight-bold "+[t.cropper.aspectRatio==16/9?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(16/9)}}},[t._v("16:9")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[t.cropper.aspectRatio==4/3?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(4/3)}}},[t._v("4:3")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[1.5==t.cropper.aspectRatio?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(1.5)}}},[t._v("3:2")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[1==t.cropper.aspectRatio?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(1)}}},[t._v("1:1")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[t.cropper.aspectRatio==2/3?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(2/3)}}},[t._v("2:3")])])])]):t._e()])])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-header d-inline-flex align-items-center justify-content-between bg-white"},[e("span",{staticClass:"pr-3"},[e("i",{staticClass:"fas fa-cog fa-lg text-muted"})]),this._v(" "),e("span",{staticClass:"font-weight-bold"},[this._v("\n\t\t\t\t\t\tCamera Roll\n\t\t\t\t\t")]),this._v(" "),e("span",{staticClass:"text-primary font-weight-bold"},[this._v("Upload")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"pr-3"},[e("i",{staticClass:"fas fa-info-circle fa-lg text-primary"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"spinner-border spinner-border-sm",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"spinner-border spinner-border-sm",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%","background-color":"#008DF5"}},[e("i",{staticClass:"fal fa-bolt text-white fa-lg"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Post")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"media"},[e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%",border:"2px solid #008DF5"}},[e("i",{staticClass:"far fa-edit text-primary fa-lg"})]),this._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Text Post")]),this._v(" "),e("sup",{staticClass:"float-right mt-2"},[e("span",{staticClass:"btn btn-outline-lighter p-1 btn-sm font-weight-bold py-0",staticStyle:{"font-size":"10px","line-height":"0.6"}},[this._v("BETA")])])]),this._v(" "),e("p",{staticClass:"mb-0 text-muted"},[this._v("Share a text only post")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-body py-2"},[e("div",{staticClass:"media"},[e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%",border:"1px solid #008DF5"}},[e("i",{staticClass:"fas fa-history text-primary fa-lg"})]),this._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Story")]),this._v(" "),e("sup",{staticClass:"float-right mt-2"},[e("span",{staticClass:"btn btn-outline-lighter p-1 btn-sm font-weight-bold py-0",staticStyle:{"font-size":"10px","line-height":"0.6"}},[this._v("BETA")])])]),this._v(" "),e("p",{staticClass:"mb-0 text-muted"},[this._v("Add to your story")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-body py-2"},[e("div",{staticClass:"media"},[e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%",border:"2px solid #008DF5"}},[e("i",{staticClass:"fas fa-poll-h text-primary fa-lg"})]),this._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Poll")]),this._v(" "),e("sup",{staticClass:"float-right mt-2"},[e("span",{staticClass:"btn btn-outline-lighter p-1 btn-sm font-weight-bold py-0",staticStyle:{"font-size":"10px","line-height":"0.6"}},[this._v("BETA")])])]),this._v(" "),e("p",{staticClass:"mb-0 text-muted"},[this._v("Create a poll")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("a",{staticClass:"card my-md-3 shadow-none border compose-action text-decoration-none text-dark",attrs:{href:"/i/collections/create"}},[e("div",{staticClass:"card-body py-2"},[e("div",{staticClass:"media"},[e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%",border:"1px solid #008DF5"}},[e("i",{staticClass:"fal fa-images text-primary fa-lg"})]),this._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Collection")]),this._v(" "),e("sup",{staticClass:"float-right mt-2"},[e("span",{staticClass:"btn btn-outline-lighter p-1 btn-sm font-weight-bold py-0",staticStyle:{"font-size":"10px","line-height":"0.6"}},[this._v("BETA")])])]),this._v(" "),e("p",{staticClass:"mb-0 text-muted"},[this._v("New collection of posts")])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"py-3"},[e("a",{staticClass:"font-weight-bold",attrs:{href:"/site/help"}},[this._v("Help")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{staticClass:"text-dark "},[this._v("Contains NSFW Media")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",[this._v("Add to Collection "),e("span",{staticClass:"ml-2 badge badge-primary"},[this._v("NEW")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"text-decoration-none"},[e("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{staticClass:"text-dark "},[this._v("Turn off commenting")]),this._v(" "),e("p",{staticClass:"text-muted small mb-0"},[this._v("Disables comments for this post, you can change this later.")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"d-flex justify-content-between align-items-center"},[e("div",[e("div",{staticClass:"text-dark"},[this._v("Media Descriptions")]),this._v(" "),e("p",{staticClass:"text-muted small mb-0"},[this._v("Describe your photos for people with visual impairments.")])]),this._v(" "),e("div",[e("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{staticClass:"text-dark "},[this._v("Contains NSFW Media")])])}],!1,null,null,null);e.default=u.exports}},[[7,0]]]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{"0ox+":function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,'.autocomplete-input{border:1px solid #eee;border-radius:8px;width:100%;padding:12px 12px 12px 48px;box-sizing:border-box;position:relative;font-size:16px;line-height:1.5;flex:1;background-color:#eee;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNjY2IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iOCIvPjxwYXRoIGQ9Ik0yMSAyMWwtNC00Ii8+PC9zdmc+");background-repeat:no-repeat;background-position:12px}.autocomplete-input:focus,.autocomplete-input[aria-expanded=true]{border-color:rgba(0,0,0,.12);background-color:#fff;outline:none;box-shadow:0 2px 2px rgba(0,0,0,.16)}[data-position=below] .autocomplete-input[aria-expanded=true]{border-bottom-color:transparent;border-radius:8px 8px 0 0}[data-position=above] .autocomplete-input[aria-expanded=true]{border-top-color:transparent;border-radius:0 0 8px 8px;z-index:2}.autocomplete[data-loading=true]:after{content:"";border:3px solid rgba(0,0,0,.12);border-right-color:rgba(0,0,0,.48);border-radius:100%;width:20px;height:20px;position:absolute;right:12px;top:50%;transform:translateY(-50%);-webkit-animation:rotate 1s linear infinite;animation:rotate 1s linear infinite}.autocomplete-result-list{margin:0;border:1px solid rgba(0,0,0,.12);padding:0;box-sizing:border-box;max-height:296px;overflow-y:auto;background:#fff;list-style:none;box-shadow:0 2px 2px rgba(0,0,0,.16)}[data-position=below] .autocomplete-result-list{margin-top:-1px;border-top-color:transparent;border-radius:0 0 8px 8px;padding-bottom:8px}[data-position=above] .autocomplete-result-list{margin-bottom:-1px;border-bottom-color:transparent;border-radius:8px 8px 0 0;padding-top:8px}.autocomplete-result{cursor:default;padding:12px 12px 12px 48px;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjY2NjIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iOCIvPjxwYXRoIGQ9Ik0yMSAyMWwtNC00Ii8+PC9zdmc+");background-repeat:no-repeat;background-position:12px}.autocomplete-result:hover,.autocomplete-result[aria-selected=true]{background-color:rgba(0,0,0,.06)}@-webkit-keyframes rotate{0%{transform:translateY(-50%) rotate(0deg)}to{transform:translateY(-50%) rotate(359deg)}}@keyframes rotate{0%{transform:translateY(-50%) rotate(0deg)}to{transform:translateY(-50%) rotate(359deg)}}',""])},"3VoG":function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,"/*!\n * Cropper.js v1.5.12\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2021-06-12T08:00:11.623Z\n */\n\n.cropper-container {\n direction: ltr;\n font-size: 0;\n line-height: 0;\n position: relative;\n -ms-touch-action: none;\n touch-action: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.cropper-container img {\n display: block;\n height: 100%;\n image-orientation: 0deg;\n max-height: none !important;\n max-width: none !important;\n min-height: 0 !important;\n min-width: 0 !important;\n width: 100%;\n}\n\n.cropper-wrap-box,\n.cropper-canvas,\n.cropper-drag-box,\n.cropper-crop-box,\n.cropper-modal {\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.cropper-wrap-box,\n.cropper-canvas {\n overflow: hidden;\n}\n\n.cropper-drag-box {\n background-color: #fff;\n opacity: 0;\n}\n\n.cropper-modal {\n background-color: #000;\n opacity: 0.5;\n}\n\n.cropper-view-box {\n display: block;\n height: 100%;\n outline: 1px solid #39f;\n outline-color: rgba(51, 153, 255, 0.75);\n overflow: hidden;\n width: 100%;\n}\n\n.cropper-dashed {\n border: 0 dashed #eee;\n display: block;\n opacity: 0.5;\n position: absolute;\n}\n\n.cropper-dashed.dashed-h {\n border-bottom-width: 1px;\n border-top-width: 1px;\n height: calc(100% / 3);\n left: 0;\n top: calc(100% / 3);\n width: 100%;\n}\n\n.cropper-dashed.dashed-v {\n border-left-width: 1px;\n border-right-width: 1px;\n height: 100%;\n left: calc(100% / 3);\n top: 0;\n width: calc(100% / 3);\n}\n\n.cropper-center {\n display: block;\n height: 0;\n left: 50%;\n opacity: 0.75;\n position: absolute;\n top: 50%;\n width: 0;\n}\n\n.cropper-center::before,\n.cropper-center::after {\n background-color: #eee;\n content: ' ';\n display: block;\n position: absolute;\n}\n\n.cropper-center::before {\n height: 1px;\n left: -3px;\n top: 0;\n width: 7px;\n}\n\n.cropper-center::after {\n height: 7px;\n left: 0;\n top: -3px;\n width: 1px;\n}\n\n.cropper-face,\n.cropper-line,\n.cropper-point {\n display: block;\n height: 100%;\n opacity: 0.1;\n position: absolute;\n width: 100%;\n}\n\n.cropper-face {\n background-color: #fff;\n left: 0;\n top: 0;\n}\n\n.cropper-line {\n background-color: #39f;\n}\n\n.cropper-line.line-e {\n cursor: ew-resize;\n right: -3px;\n top: 0;\n width: 5px;\n}\n\n.cropper-line.line-n {\n cursor: ns-resize;\n height: 5px;\n left: 0;\n top: -3px;\n}\n\n.cropper-line.line-w {\n cursor: ew-resize;\n left: -3px;\n top: 0;\n width: 5px;\n}\n\n.cropper-line.line-s {\n bottom: -3px;\n cursor: ns-resize;\n height: 5px;\n left: 0;\n}\n\n.cropper-point {\n background-color: #39f;\n height: 5px;\n opacity: 0.75;\n width: 5px;\n}\n\n.cropper-point.point-e {\n cursor: ew-resize;\n margin-top: -3px;\n right: -3px;\n top: 50%;\n}\n\n.cropper-point.point-n {\n cursor: ns-resize;\n left: 50%;\n margin-left: -3px;\n top: -3px;\n}\n\n.cropper-point.point-w {\n cursor: ew-resize;\n left: -3px;\n margin-top: -3px;\n top: 50%;\n}\n\n.cropper-point.point-s {\n bottom: -3px;\n cursor: s-resize;\n left: 50%;\n margin-left: -3px;\n}\n\n.cropper-point.point-ne {\n cursor: nesw-resize;\n right: -3px;\n top: -3px;\n}\n\n.cropper-point.point-nw {\n cursor: nwse-resize;\n left: -3px;\n top: -3px;\n}\n\n.cropper-point.point-sw {\n bottom: -3px;\n cursor: nesw-resize;\n left: -3px;\n}\n\n.cropper-point.point-se {\n bottom: -3px;\n cursor: nwse-resize;\n height: 20px;\n opacity: 1;\n right: -3px;\n width: 20px;\n}\n\n@media (min-width: 768px) {\n .cropper-point.point-se {\n height: 15px;\n width: 15px;\n }\n}\n\n@media (min-width: 992px) {\n .cropper-point.point-se {\n height: 10px;\n width: 10px;\n }\n}\n\n@media (min-width: 1200px) {\n .cropper-point.point-se {\n height: 5px;\n opacity: 0.75;\n width: 5px;\n }\n}\n\n.cropper-point.point-se::before {\n background-color: #39f;\n bottom: -50%;\n content: ' ';\n display: block;\n height: 200%;\n opacity: 0;\n position: absolute;\n right: -50%;\n width: 200%;\n}\n\n.cropper-invisible {\n opacity: 0;\n}\n\n.cropper-bg {\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');\n}\n\n.cropper-hide {\n display: block;\n height: 0;\n position: absolute;\n width: 0;\n}\n\n.cropper-hidden {\n display: none !important;\n}\n\n.cropper-move {\n cursor: move;\n}\n\n.cropper-crop {\n cursor: crosshair;\n}\n\n.cropper-disabled .cropper-drag-box,\n.cropper-disabled .cropper-face,\n.cropper-disabled .cropper-line,\n.cropper-disabled .cropper-point {\n cursor: not-allowed;\n}\n",""])},"4KG8":function(t,e,i){t.exports=function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var i=0;i>>0,o=arguments[1],a=0;a container for the click");i.selectItemAtIndex(n.getAttribute("data-index"),e),i.hideMenu()}else i.current.element&&!i.current.externalTrigger&&(i.current.externalTrigger=!1,setTimeout((function(){return i.hideMenu()})))}},{key:"keyup",value:function(t,e){if(t.inputEvent&&(t.inputEvent=!1),t.updateSelection(this),27!==e.keyCode){if(!t.tribute.allowSpaces&&t.tribute.hasTrailingSpace)return t.tribute.hasTrailingSpace=!1,t.commandEvent=!0,void t.callbacks().space(e,this);if(!t.tribute.isActive)if(t.tribute.autocompleteMode)t.callbacks().triggerChar(e,this,"");else{var i=t.getKeyCode(t,this,e);if(isNaN(i)||!i)return;var n=t.tribute.triggers().find((function(t){return t.charCodeAt(0)===i}));void 0!==n&&t.callbacks().triggerChar(e,this,n)}t.tribute.current.mentionText.length=o.current.collection.menuShowMinLength&&o.inputEvent&&o.showMenuFor(i,!0)},enter:function(e,i){t.tribute.isActive&&t.tribute.current.filteredItems&&(e.preventDefault(),e.stopPropagation(),setTimeout((function(){t.tribute.selectItemAtIndex(t.tribute.menuSelected,e),t.tribute.hideMenu()}),0))},escape:function(e,i){t.tribute.isActive&&(e.preventDefault(),e.stopPropagation(),t.tribute.isActive=!1,t.tribute.hideMenu())},tab:function(e,i){t.callbacks().enter(e,i)},space:function(e,i){t.tribute.isActive&&(t.tribute.spaceSelectsMatch?t.callbacks().enter(e,i):t.tribute.allowSpaces||(e.stopPropagation(),setTimeout((function(){t.tribute.hideMenu(),t.tribute.isActive=!1}),0)))},up:function(e,i){if(t.tribute.isActive&&t.tribute.current.filteredItems){e.preventDefault(),e.stopPropagation();var n=t.tribute.current.filteredItems.length,o=t.tribute.menuSelected;n>o&&o>0?(t.tribute.menuSelected--,t.setActiveLi()):0===o&&(t.tribute.menuSelected=n-1,t.setActiveLi(),t.tribute.menu.scrollTop=t.tribute.menu.scrollHeight)}},down:function(e,i){if(t.tribute.isActive&&t.tribute.current.filteredItems){e.preventDefault(),e.stopPropagation();var n=t.tribute.current.filteredItems.length-1,o=t.tribute.menuSelected;n>o?(t.tribute.menuSelected++,t.setActiveLi()):n===o&&(t.tribute.menuSelected=0,t.setActiveLi(),t.tribute.menu.scrollTop=0)}},delete:function(e,i){t.tribute.isActive&&t.tribute.current.mentionText.length<1?t.tribute.hideMenu():t.tribute.isActive&&t.tribute.showMenuFor(i)}}}},{key:"setActiveLi",value:function(t){var e=this.tribute.menu.querySelectorAll("li"),i=e.length>>>0;t&&(this.tribute.menuSelected=parseInt(t));for(var n=0;ns.bottom){var r=a.bottom-s.bottom;this.tribute.menu.scrollTop+=r}else if(a.topn.width&&(o.left||o.right),s=window.innerHeight>n.height&&(o.top||o.bottom);(a||s)&&(i.tribute.menu.style.cssText="display: none",i.positionMenuAtCaret(t))}),0)}else this.tribute.menu.style.cssText="display: none"}},{key:"selectElement",value:function(t,e,i){var n,o=t;if(e)for(var a=0;a=0&&(e=n.substring(0,o))}}else{var a=this.tribute.current.element;if(a){var s=a.selectionStart;a.value&&s>=0&&(e=a.value.substring(0,s))}}return e}},{key:"getLastWordInText",value:function(t){var e=(t=t.replace(/\u00A0/g," ")).split(/\s+/);return e[e.length-1].trim()}},{key:"getTriggerInfo",value:function(t,e,i,n,o){var a,s,r,l=this,c=this.tribute.current;if(this.isContentEditable(c.element)){var d=this.getContentEditableSelectedPath(c);d&&(a=d.selected,s=d.path,r=d.offset)}else a=this.tribute.current.element;var u=this.getTextPrecedingCurrentSelection(),p=this.getLastWordInText(u);if(o)return{mentionPosition:u.length-p.length,mentionText:p,mentionSelectedElement:a,mentionSelectedPath:s,mentionSelectedOffset:r};if(null!=u){var h,m=-1;if(this.tribute.collection.forEach((function(t){var e=t.trigger,n=t.requireLeadingSpace?l.lastIndexWithLeadingSpace(u,e):u.lastIndexOf(e);n>m&&(m=n,h=e,i=t.requireLeadingSpace)})),m>=0&&(0===m||!i||/[\xA0\s]/g.test(u.substring(m-1,m)))){var f=u.substring(m+h.length,u.length);h=u.substring(m,m+h.length);var g=f.substring(0,1),v=f.length>0&&(" "===g||" "===g);e&&(f=f.trim());var b=n?/[^\S ]/g:/[\xA0\s]/g;if(this.tribute.hasTrailingSpace=b.test(f),!v&&(t||!b.test(f)))return{mentionPosition:m,mentionText:f,mentionSelectedElement:a,mentionSelectedPath:s,mentionSelectedOffset:r,mentionTriggerChar:h}}}}},{key:"lastIndexWithLeadingSpace",value:function(t,e){for(var i=t.split("").reverse().join(""),n=-1,o=0,a=t.length;o=0;c--)if(e[c]!==i[o-c]){l=!1;break}if(l&&(s||r)){n=t.length-1-o;break}}return n}},{key:"isContentEditable",value:function(t){return"INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName}},{key:"isMenuOffScreen",value:function(t,e){var i=window.innerWidth,n=window.innerHeight,o=document.documentElement,a=(window.pageXOffset||o.scrollLeft)-(o.clientLeft||0),s=(window.pageYOffset||o.scrollTop)-(o.clientTop||0),r="number"==typeof t.top?t.top:s+n-t.bottom-e.height,l="number"==typeof t.right?t.right:t.left+e.width,c="number"==typeof t.bottom?t.bottom:t.top+e.height,d="number"==typeof t.left?t.left:a+i-t.right-e.width;return{top:rMath.ceil(a+i),bottom:c>Math.ceil(s+n),left:dparseInt(s.height)&&(a.overflowY="scroll")):a.overflow="hidden",o.textContent=t.value.substring(0,e),"INPUT"===t.nodeName&&(o.textContent=o.textContent.replace(/\s/g," "));var r=this.getDocument().createElement("span");r.textContent=t.value.substring(e)||".",o.appendChild(r);var l=t.getBoundingClientRect(),c=document.documentElement,d=(window.pageXOffset||c.scrollLeft)-(c.clientLeft||0),u=(window.pageYOffset||c.scrollTop)-(c.clientTop||0),p=0,h=0;this.menuContainerIsBody&&(p=l.top,h=l.left);var m={top:p+u+r.offsetTop+parseInt(s.borderTopWidth)+parseInt(s.fontSize)-t.scrollTop,left:h+d+r.offsetLeft+parseInt(s.borderLeftWidth)},f=window.innerWidth,g=window.innerHeight,v=this.getMenuDimensions(),b=this.isMenuOffScreen(m,v);b.right&&(m.right=f-m.left,m.left="auto");var w=this.tribute.menuContainer?this.tribute.menuContainer.offsetHeight:this.getDocument().body.offsetHeight;if(b.bottom){var y=w-(g-(this.tribute.menuContainer?this.tribute.menuContainer.getBoundingClientRect():this.getDocument().body.getBoundingClientRect()).top);m.bottom=y+(g-l.top-r.offsetTop),m.top="auto"}return(b=this.isMenuOffScreen(m,v)).left&&(m.left=f>v.width?d+f-v.width:d,delete m.right),b.top&&(m.top=g>v.height?u+g-v.height:u,delete m.bottom),this.getDocument().body.removeChild(o),m}},{key:"getContentEditableCaretPosition",value:function(t){var e,i=this.getWindowSelection();(e=this.getDocument().createRange()).setStart(i.anchorNode,t),e.setEnd(i.anchorNode,t),e.collapse(!1);var n=e.getBoundingClientRect(),o=document.documentElement,a=(window.pageXOffset||o.scrollLeft)-(o.clientLeft||0),s=(window.pageYOffset||o.scrollTop)-(o.clientTop||0),r={left:n.left+a,top:n.top+n.height+s},l=window.innerWidth,c=window.innerHeight,d=this.getMenuDimensions(),u=this.isMenuOffScreen(r,d);u.right&&(r.left="auto",r.right=l-n.left-a);var p=this.tribute.menuContainer?this.tribute.menuContainer.offsetHeight:this.getDocument().body.offsetHeight;if(u.bottom){var h=p-(c-(this.tribute.menuContainer?this.tribute.menuContainer.getBoundingClientRect():this.getDocument().body.getBoundingClientRect()).top);r.top="auto",r.bottom=h+(c-n.top)}return(u=this.isMenuOffScreen(r,d)).left&&(r.left=l>d.width?a+l-d.width:a,delete r.right),u.top&&(r.top=c>d.height?s+c-d.height:s,delete r.bottom),this.menuContainerIsBody||(r.left=r.left?r.left-this.tribute.menuContainer.offsetLeft:r.left,r.top=r.top?r.top-this.tribute.menuContainer.offsetTop:r.top),r}},{key:"scrollIntoView",value:function(t){var e,i=this.menu;if(void 0!==i){for(;void 0===e||0===e.height;)if(0===(e=i.getBoundingClientRect()).height&&(void 0===(i=i.childNodes[0])||!i.getBoundingClientRect))return;var n=e.top,o=n+e.height;if(n<0)window.scrollTo(0,window.pageYOffset+e.top-20);else if(o>window.innerHeight){var a=window.pageYOffset+e.top-20;a-window.pageYOffset>100&&(a=window.pageYOffset+100);var s=window.pageYOffset-(window.innerHeight-o);s>a&&(s=a),window.scrollTo(0,s)}}}},{key:"menuContainerIsBody",get:function(){return this.tribute.menuContainer===document.body||!this.tribute.menuContainer}}]),e}(),r=function(){function e(i){t(this,e),this.tribute=i,this.tribute.search=this}return i(e,[{key:"simpleFilter",value:function(t,e){var i=this;return e.filter((function(e){return i.test(t,e)}))}},{key:"test",value:function(t,e){return null!==this.match(t,e)}},{key:"match",value:function(t,e,i){i=i||{},e.length;var n=i.pre||"",o=i.post||"",a=i.caseSensitive&&e||e.toLowerCase();if(i.skip)return{rendered:e,score:0};t=i.caseSensitive&&t||t.toLowerCase();var s=this.traverse(a,t,0,0,[]);return s?{rendered:this.render(e,s.cache,n,o),score:s.score}:null}},{key:"traverse",value:function(t,e,i,n,o){if(e.length===n)return{score:this.calculateScore(o),cache:o.slice()};if(!(t.length===i||e.length-n>t.length-i)){for(var a,s,r=e[n],l=t.indexOf(r,i);l>-1;){if(o.push(l),s=this.traverse(t,e,l+1,n+1,o),o.pop(),!s)return a;(!a||a.score0&&(t[o-1]+1===n?i+=i+1:i=1),e+=i})),e}},{key:"render",value:function(t,e,i,n){var o=t.substring(0,e[0]);return e.forEach((function(a,s){o+=i+t[a]+n+t.substring(a+1,e[s+1]?e[s+1]:t.length)})),o}},{key:"filter",value:function(t,e,i){var n=this;return i=i||{},e.reduce((function(e,o,a,s){var r=o;i.extract&&((r=i.extract(o))||(r=""));var l=n.match(t,r,i);return null!=l&&(e[e.length]={string:l.rendered,score:l.score,index:a,original:o}),e}),[]).sort((function(t,e){return e.score-t.score||t.index-e.index}))}}]),e}();return function(){function e(i){var n,l=this,c=i.values,d=void 0===c?null:c,u=i.iframe,p=void 0===u?null:u,h=i.selectClass,m=void 0===h?"highlight":h,f=i.containerClass,g=void 0===f?"tribute-container":f,v=i.itemClass,b=void 0===v?"":v,w=i.trigger,y=void 0===w?"@":w,x=i.autocompleteMode,C=void 0!==x&&x,_=i.selectTemplate,k=void 0===_?null:_,T=i.menuItemTemplate,S=void 0===T?null:T,M=i.lookup,A=void 0===M?"key":M,D=i.fillAttr,E=void 0===D?"value":D,L=i.collection,P=void 0===L?null:L,O=i.menuContainer,I=void 0===O?null:O,N=i.noMatchTemplate,R=void 0===N?null:N,B=i.requireLeadingSpace,z=void 0===B||B,j=i.allowSpaces,H=void 0!==j&&j,W=i.replaceTextSuffix,U=void 0===W?null:W,Y=i.positionMenu,$=void 0===Y||Y,F=i.spaceSelectsMatch,V=void 0!==F&&F,X=i.searchOpts,q=void 0===X?{}:X,Z=i.menuItemLimit,K=void 0===Z?null:Z,G=i.menuShowMinLength,Q=void 0===G?0:G;if(t(this,e),this.autocompleteMode=C,this.menuSelected=0,this.current={},this.inputEvent=!1,this.isActive=!1,this.menuContainer=I,this.allowSpaces=H,this.replaceTextSuffix=U,this.positionMenu=$,this.hasTrailingSpace=!1,this.spaceSelectsMatch=V,this.autocompleteMode&&(y="",H=!1),d)this.collection=[{trigger:y,iframe:p,selectClass:m,containerClass:g,itemClass:b,selectTemplate:(k||e.defaultSelectTemplate).bind(this),menuItemTemplate:(S||e.defaultMenuItemTemplate).bind(this),noMatchTemplate:(n=R,"string"==typeof n?""===n.trim()?null:n:"function"==typeof n?n.bind(l):R||function(){return"
  • No Match Found!
  • "}.bind(l)),lookup:A,fillAttr:E,values:d,requireLeadingSpace:z,searchOpts:q,menuItemLimit:K,menuShowMinLength:Q}];else{if(!P)throw new Error("[Tribute] No collection specified.");this.autocompleteMode&&console.warn("Tribute in autocomplete mode does not work for collections"),this.collection=P.map((function(t){return{trigger:t.trigger||y,iframe:t.iframe||p,selectClass:t.selectClass||m,containerClass:t.containerClass||g,itemClass:t.itemClass||b,selectTemplate:(t.selectTemplate||e.defaultSelectTemplate).bind(l),menuItemTemplate:(t.menuItemTemplate||e.defaultMenuItemTemplate).bind(l),noMatchTemplate:function(t){return"string"==typeof t?""===t.trim()?null:t:"function"==typeof t?t.bind(l):R||function(){return"
  • No Match Found!
  • "}.bind(l)}(R),lookup:t.lookup||A,fillAttr:t.fillAttr||E,values:t.values,requireLeadingSpace:t.requireLeadingSpace,searchOpts:t.searchOpts||q,menuItemLimit:t.menuItemLimit||K,menuShowMinLength:t.menuShowMinLength||Q}}))}new s(this),new o(this),new a(this),new r(this)}return i(e,[{key:"triggers",value:function(){return this.collection.map((function(t){return t.trigger}))}},{key:"attach",value:function(t){if(!t)throw new Error("[Tribute] Must pass in a DOM node or NodeList.");if("undefined"!=typeof jQuery&&t instanceof jQuery&&(t=t.get()),t.constructor===NodeList||t.constructor===HTMLCollection||t.constructor===Array)for(var e=t.length,i=0;i",post:i.current.collection.searchOpts.post||"",skip:i.current.collection.searchOpts.skip,extract:function(t){if("string"==typeof i.current.collection.lookup)return t[i.current.collection.lookup];if("function"==typeof i.current.collection.lookup)return i.current.collection.lookup(t,i.current.mentionText);throw new Error("Invalid lookup attribute, lookup must be string or function.")}});i.current.collection.menuItemLimit&&(n=n.slice(0,i.current.collection.menuItemLimit)),i.current.filteredItems=n;var o=i.menu.querySelector("ul");if(i.range.positionMenuAtCaret(e),!n.length){var a=new CustomEvent("tribute-no-match",{detail:i.menu});return i.current.element.dispatchEvent(a),void("function"==typeof i.current.collection.noMatchTemplate&&!i.current.collection.noMatchTemplate()||!i.current.collection.noMatchTemplate?i.hideMenu():"function"==typeof i.current.collection.noMatchTemplate?o.innerHTML=i.current.collection.noMatchTemplate():o.innerHTML=i.current.collection.noMatchTemplate)}o.innerHTML="";var s=i.range.getDocument().createDocumentFragment();n.forEach((function(t,e){var n=i.range.getDocument().createElement("li");n.setAttribute("data-index",e),n.className=i.current.collection.itemClass,n.addEventListener("mousemove",(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var i=[],n=!0,o=!1,a=void 0;try{for(var s,r=t[Symbol.iterator]();!(n=(s=r.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(t){o=!0,a=t}finally{try{n||null==r.return||r.return()}finally{if(o)throw a}}return i}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(i._findLiTarget(t.target),2),n=(e[0],e[1]);0!==t.movementY&&i.events.setActiveLi(n)})),i.menuSelected===e&&n.classList.add(i.current.collection.selectClass),n.innerHTML=i.current.collection.menuItemTemplate(t),s.appendChild(n)})),o.appendChild(s)}};"function"==typeof this.current.collection.values?this.current.collection.values(this.current.mentionText,n):n(this.current.collection.values)}}},{key:"_findLiTarget",value:function(t){if(!t)return[];var e=t.getAttribute("data-index");return e?[t,e]:this._findLiTarget(t.parentNode)}},{key:"showMenuForCollection",value:function(t,e){t!==document.activeElement&&this.placeCaretAtEnd(t),this.current.collection=this.collection[e||0],this.current.externalTrigger=!0,this.current.element=t,t.isContentEditable?this.insertTextAtCursor(this.current.collection.trigger):this.insertAtCaret(t,this.current.collection.trigger),this.showMenuFor(t)}},{key:"placeCaretAtEnd",value:function(t){if(t.focus(),void 0!==window.getSelection&&void 0!==document.createRange){var e=document.createRange();e.selectNodeContents(t),e.collapse(!1);var i=window.getSelection();i.removeAllRanges(),i.addRange(e)}else if(void 0!==document.body.createTextRange){var n=document.body.createTextRange();n.moveToElementText(t),n.collapse(!1),n.select()}}},{key:"insertTextAtCursor",value:function(t){var e,i;(i=(e=window.getSelection()).getRangeAt(0)).deleteContents();var n=document.createTextNode(t);i.insertNode(n),i.selectNodeContents(n),i.collapse(!1),e.removeAllRanges(),e.addRange(i)}},{key:"insertAtCaret",value:function(t,e){var i=t.scrollTop,n=t.selectionStart,o=t.value.substring(0,n),a=t.value.substring(t.selectionEnd,t.value.length);t.value=o+e+a,n+=e.length,t.selectionStart=n,t.selectionEnd=n,t.focus(),t.scrollTop=i}},{key:"hideMenu",value:function(){this.menu&&(this.menu.style.cssText="display: none;",this.isActive=!1,this.menuSelected=0,this.current={})}},{key:"selectItemAtIndex",value:function(t,e){if("number"==typeof(t=parseInt(t))&&!isNaN(t)){var i=this.current.filteredItems[t],n=this.current.collection.selectTemplate(i);null!==n&&this.replaceText(n,e,i)}}},{key:"replaceText",value:function(t,e,i){this.range.replaceTriggerText(t,!0,!0,e,i)}},{key:"_append",value:function(t,e,i){if("function"==typeof t.values)throw new Error("Unable to append to values, as it is a function.");t.values=i?e:t.values.concat(e)}},{key:"append",value:function(t,e,i){var n=parseInt(t);if("number"!=typeof n)throw new Error("please provide an index for the collection to update.");var o=this.collection[n];this._append(o,e,i)}},{key:"appendCurrent",value:function(t,e){if(!this.isActive)throw new Error("No active state. Please use append instead and pass an index.");this._append(this.current.collection,t,e)}},{key:"detach",value:function(t){if(!t)throw new Error("[Tribute] Must pass in a DOM node or NodeList.");if("undefined"!=typeof jQuery&&t instanceof jQuery&&(t=t.get()),t.constructor===NodeList||t.constructor===HTMLCollection||t.constructor===Array)for(var e=t.length,i=0;i'+(this.current.collection.trigger+t.original[this.current.collection.fillAttr])+"":this.current.collection.trigger+t.original[this.current.collection.fillAttr]}},{key:"defaultMenuItemTemplate",value:function(t){return t.string}},{key:"inputTypes",value:function(){return["TEXTAREA","INPUT"]}}]),e}()}()},"6Wrw":function(t,e,i){"use strict";i("E/WS")},7:function(t,e,i){t.exports=i("K0g3")},"9tPo":function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var i=e.protocol+"//"+e.host,n=i+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var o,a=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?t:(o=0===a.indexOf("//")?a:0===a.indexOf("/")?i+a:n+a.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},"E/WS":function(t,e,i){var n=i("t9kD");"string"==typeof n&&(n=[[t.i,n,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};i("aET+")(n,o);n.locals&&(t.exports=n.locals)},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var o=(s=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),a=n.sources.map((function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"}));return[i].concat(a).concat([o]).join("\n")}var s;return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i})).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},o=0;o=0&&u.splice(e,1)}function v(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var n=function(){0;return i.nc}();n&&(t.attrs.nonce=n)}return b(e,t.attrs),f(t,e),e}function b(t,e){Object.keys(e).forEach((function(i){t.setAttribute(i,e[i])}))}function w(t,e){var i,n,o,a;if(e.transform&&t.css){if(!(a="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=a}if(e.singleton){var s=d++;i=c||(c=v(e)),n=C.bind(null,i,s,!1),o=C.bind(null,i,s,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(e,t.attrs),f(t,e),e}(e),n=k.bind(null,i,e),o=function(){g(i),i.href&&URL.revokeObjectURL(i.href)}):(i=v(e),n=_.bind(null,i),o=function(){g(i)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=s()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var i=m(t,e);return h(i,e),function(t){for(var n=[],o=0;o0&&void 0!==arguments[0]?arguments[0]:{},a=o.search,s=o.autoSelect,c=void 0!==s&&s,d=o.setValue,u=void 0===d?function(){}:d,p=o.setAttribute,h=void 0===p?function(){}:p,m=o.onUpdate,f=void 0===m?function(){}:m,g=o.onSubmit,v=void 0===g?function(){}:g,b=o.onShow,w=void 0===b?function(){}:b,y=o.onHide,x=void 0===y?function(){}:y,C=o.onLoading,_=void 0===C?function(){}:C,k=o.onLoaded,T=void 0===k?function(){}:k;i(this,t),n(this,"value",""),n(this,"searchCounter",0),n(this,"results",[]),n(this,"selectedIndex",-1),n(this,"handleInput",(function(t){var i=t.target.value;e.updateResults(i),e.value=i})),n(this,"handleKeyDown",(function(t){var i=t.key;switch(i){case"Up":case"Down":case"ArrowUp":case"ArrowDown":var n="ArrowUp"===i||"Up"===i?e.selectedIndex-1:e.selectedIndex+1;t.preventDefault(),e.handleArrows(n);break;case"Tab":e.selectResult();break;case"Enter":var o=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(o);break;case"Esc":case"Escape":e.hideResults(),e.setValue();break;default:return}})),n(this,"handleFocus",(function(t){var i=t.target.value;e.updateResults(i),e.value=i})),n(this,"handleBlur",(function(){e.hideResults()})),n(this,"handleResultMouseDown",(function(t){t.preventDefault()})),n(this,"handleResultClick",(function(t){var i=t.target,n=r(i,"[data-result-index]");if(n){e.selectedIndex=parseInt(n.dataset.resultIndex,10);var o=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(o)}})),n(this,"handleArrows",(function(t){var i=e.results.length;e.selectedIndex=(t%i+i)%i,e.onUpdate(e.results,e.selectedIndex)})),n(this,"selectResult",(function(){var t=e.results[e.selectedIndex];t&&e.setValue(t),e.hideResults()})),n(this,"updateResults",(function(t){var i=++e.searchCounter;e.onLoading(),e.search(t).then((function(t){i===e.searchCounter&&(e.results=t,e.onLoaded(),0!==e.results.length?(e.selectedIndex=e.autoSelect?0:-1,e.onUpdate(e.results,e.selectedIndex),e.showResults()):e.hideResults())}))})),n(this,"showResults",(function(){e.setAttribute("aria-expanded",!0),e.onShow()})),n(this,"hideResults",(function(){e.selectedIndex=-1,e.results=[],e.setAttribute("aria-expanded",!1),e.setAttribute("aria-activedescendant",""),e.onUpdate(e.results,e.selectedIndex),e.onHide()})),n(this,"checkSelectedResultVisible",(function(t){var i=t.querySelector('[data-result-index="'.concat(e.selectedIndex,'"]'));if(i){var n=t.getBoundingClientRect(),o=i.getBoundingClientRect();o.topn.bottom&&(t.scrollTop+=o.bottom-n.bottom)}})),this.search=l(a)?a:function(t){return Promise.resolve(a(t))},this.autoSelect=c,this.setValue=u,this.setAttribute=h,this.onUpdate=f,this.onSubmit=v,this.onShow=w,this.onHide=x,this.onLoading=_,this.onLoaded=T},d=0,u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(t).concat(++d)};const p=function(t,e,i,n,o,a,s,r,l,c){"boolean"!=typeof s&&(l=r,r=s,s=!1);const d="function"==typeof i?i.options:i;let u;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),n&&(d._scopeId=n),a?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(a)},d._ssrRegister=u):e&&(u=s?function(t){e.call(this,c(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,r(t))}),u)if(d.functional){const t=d.render;d.render=function(e,i){return u.call(i),t(e,i)}}else{const t=d.beforeCreate;d.beforeCreate=t?[].concat(t,u):[u]}return i}({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"root"},[t._t("default",[i("div",t._b({},"div",t.rootProps,!1),[i("input",t._g(t._b({ref:"input",on:{input:t.handleInput,keydown:t.core.handleKeyDown,focus:t.core.handleFocus,blur:t.core.handleBlur}},"input",t.inputProps,!1),t.$listeners)),t._v(" "),i("ul",t._g(t._b({ref:"resultList"},"ul",t.resultListProps,!1),t.resultListListeners),[t._l(t.results,(function(e,n){return[t._t("result",[i("li",t._b({key:t.resultProps[n].id},"li",t.resultProps[n],!1),[t._v("\n "+t._s(t.getResultValue(e))+"\n ")])],{result:e,props:t.resultProps[n]})]}))],2)])],{rootProps:t.rootProps,inputProps:t.inputProps,inputListeners:t.inputListeners,resultListProps:t.resultListProps,resultListListeners:t.resultListListeners,results:t.results,resultProps:t.resultProps})],2)},staticRenderFns:[]},void 0,{name:"Autocomplete",inheritAttrs:!1,props:{search:{type:Function,required:!0},baseClass:{type:String,default:"autocomplete"},autoSelect:{type:Boolean,default:!1},getResultValue:{type:Function,default:function(t){return t}},defaultValue:{type:String,default:""},debounceTime:{type:Number,default:0}},data:function(){var t,e,i,n,o=new c({search:this.search,autoSelect:this.autoSelect,setValue:this.setValue,onUpdate:this.handleUpdate,onSubmit:this.handleSubmit,onShow:this.handleShow,onHide:this.handleHide,onLoading:this.handleLoading,onLoaded:this.handleLoaded});return this.debounceTime>0&&(o.handleInput=(t=o.handleInput,e=this.debounceTime,function(){var o=this,a=arguments,s=function(){n=null,i||t.apply(o,a)},r=i&&!n;clearTimeout(n),n=setTimeout(s,e),r&&t.apply(o,a)})),{core:o,value:this.defaultValue,resultListId:u("".concat(this.baseClass,"-result-list-")),results:[],selectedIndex:-1,expanded:!1,loading:!1,position:"below",resetPosition:!0}},computed:{rootProps:function(){return{class:this.baseClass,style:{position:"relative"},"data-expanded":this.expanded,"data-loading":this.loading,"data-position":this.position}},inputProps:function(){return a({class:"".concat(this.baseClass,"-input"),value:this.value,role:"combobox",autocomplete:"off",autocapitalize:"off",autocorrect:"off",spellcheck:"false","aria-autocomplete":"list","aria-haspopup":"listbox","aria-owns":this.resultListId,"aria-expanded":this.expanded?"true":"false","aria-activedescendant":this.selectedIndex>-1?this.resultProps[this.selectedIndex].id:""},this.$attrs)},inputListeners:function(){return{input:this.handleInput,keydown:this.core.handleKeyDown,focus:this.core.handleFocus,blur:this.core.handleBlur}},resultListProps:function(){var t="below"===this.position?"top":"bottom";return{id:this.resultListId,class:"".concat(this.baseClass,"-result-list"),role:"listbox",style:n({position:"absolute",zIndex:1,width:"100%",visibility:this.expanded?"visible":"hidden",pointerEvents:this.expanded?"auto":"none"},t,"100%")}},resultListListeners:function(){return{mousedown:this.core.handleResultMouseDown,click:this.core.handleResultClick}},resultProps:function(){var t=this;return this.results.map((function(e,i){return a({id:"".concat(t.baseClass,"-result-").concat(i),class:"".concat(t.baseClass,"-result"),"data-result-index":i,role:"option"},t.selectedIndex===i?{"aria-selected":"true"}:{})}))}},mounted:function(){document.body.addEventListener("click",this.handleDocumentClick)},beforeDestroy:function(){document.body.removeEventListener("click",this.handleDocumentClick)},updated:function(){var t,e,i,n;this.$refs.input&&this.$refs.resultList&&(this.resetPosition&&this.results.length>0&&(this.resetPosition=!1,this.position=(t=this.$refs.input,e=this.$refs.resultList,i=t.getBoundingClientRect(),n=e.getBoundingClientRect(),i.bottom+n.height>window.innerHeight&&window.innerHeight-i.bottom0?"above":"below")),this.core.checkSelectedResultVisible(this.$refs.resultList))},methods:{setValue:function(t){this.value=t?this.getResultValue(t):""},handleUpdate:function(t,e){this.results=t,this.selectedIndex=e,this.$emit("update",t,e)},handleShow:function(){this.expanded=!0},handleHide:function(){this.expanded=!1,this.resetPosition=!0},handleLoading:function(){this.loading=!0},handleLoaded:function(){this.loading=!1},handleInput:function(t){this.value=t.target.value,this.core.handleInput(t)},handleSubmit:function(t){this.$emit("submit",t)},handleDocumentClick:function(t){this.$refs.root.contains(t.target)||this.core.hideResults()}}},void 0,!1,void 0,!1,void 0,void 0,void 0);function h(t){h.installed||(h.installed=!0,t.component("Autocomplete",p))}var m,f={install:h};"undefined"!=typeof window?m=window.Vue:void 0!==t&&(m=t.Vue),m&&m.use(f),p.install=h,e.a=p}).call(this,i("yLpj"))},lcPr:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,o=i("urRO"),a=(n=o)&&n.__esModule?n:{default:n};var s="undefined"==typeof window?[String,Array]:[String,Array,Element,NodeList];e.default={render:function(t){var e=this.crossorigin||void 0;return t("div",{style:this.containerStyle},[t("img",{ref:"img",attrs:{src:this.src,alt:this.alt||"image",style:"max-width: 100%",crossorigin:e},on:this.$listeners,style:this.imgStyle})])},props:{containerStyle:Object,src:{type:String,default:""},alt:String,imgStyle:Object,viewMode:Number,dragMode:String,initialAspectRatio:Number,aspectRatio:Number,data:Object,preview:s,responsive:{type:Boolean,default:!0},restore:{type:Boolean,default:!0},checkCrossOrigin:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},crossorigin:{type:String},modal:{type:Boolean,default:!0},guides:{type:Boolean,default:!0},center:{type:Boolean,default:!0},highlight:{type:Boolean,default:!0},background:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!0},autoCropArea:Number,movable:{type:Boolean,default:!0},rotatable:{type:Boolean,default:!0},scalable:{type:Boolean,default:!0},zoomable:{type:Boolean,default:!0},zoomOnTouch:{type:Boolean,default:!0},zoomOnWheel:{type:Boolean,default:!0},wheelZoomRatio:Number,cropBoxMovable:{type:Boolean,default:!0},cropBoxResizable:{type:Boolean,default:!0},toggleDragModeOnDblclick:{type:Boolean,default:!0},minCanvasWidth:Number,minCanvasHeight:Number,minCropBoxWidth:Number,minCropBoxHeight:Number,minContainerWidth:Number,minContainerHeight:Number,ready:Function,cropstart:Function,cropmove:Function,cropend:Function,crop:Function,zoom:Function},mounted:function(){var t=this.$options.props,e=(t.containerStyle,t.src,t.alt,t.imgStyle,function(t,e){var i={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n]);return i}(t,["containerStyle","src","alt","imgStyle"])),i={};for(var n in e)void 0!==this[n]&&(i[n]=this[n]);this.cropper=new a.default(this.$refs.img,i)},methods:{reset:function(){return this.cropper.reset()},clear:function(){return this.cropper.clear()},initCrop:function(){return this.cropper.crop()},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.cropper.replace(t,e)},enable:function(){return this.cropper.enable()},disable:function(){return this.cropper.disable()},destroy:function(){return this.cropper.destroy()},move:function(t,e){return this.cropper.move(t,e)},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.cropper.moveTo(t,e)},relativeZoom:function(t,e){return this.cropper.zoom(t,e)},zoomTo:function(t,e){return this.cropper.zoomTo(t,e)},rotate:function(t){return this.cropper.rotate(t)},rotateTo:function(t){return this.cropper.rotateTo(t)},scaleX:function(t){return this.cropper.scaleX(t)},scaleY:function(t){return this.cropper.scaleY(t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.cropper.scale(t,e)},getData:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.cropper.getData(t)},setData:function(t){return this.cropper.setData(t)},getContainerData:function(){return this.cropper.getContainerData()},getImageData:function(){return this.cropper.getImageData()},getCanvasData:function(){return this.cropper.getCanvasData()},setCanvasData:function(t){return this.cropper.setCanvasData(t)},getCropBoxData:function(){return this.cropper.getCropBoxData()},setCropBoxData:function(t){return this.cropper.setCropBoxData(t)},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.cropper.getCroppedCanvas(t)},setAspectRatio:function(t){return this.cropper.setAspectRatio(t)},setDragMode:function(t){return this.cropper.setDragMode(t)}}}},t9kD:function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,".compose-modal-component .media-drawer-filters {\n overflow-x: scroll;\n flex-wrap: unset;\n}\n.compose-modal-component .media-drawer-filters::-webkit-scrollbar {\n width: 0px;\n background: transparent;\n}\n.compose-modal-component .media-drawer-filters .nav-link {\n min-width: 100px;\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.compose-modal-component .media-drawer-filters .active {\n color: #fff;\n font-weight: bold;\n}\n@media (hover: none) and (pointer: coarse) {\n.compose-modal-component .media-drawer-filters::-webkit-scrollbar {\n display: none;\n}\n}\n.compose-modal-component .no-focus {\n border-color: none;\n outline: 0;\n box-shadow: none;\n}\n.compose-modal-component a.list-group-item {\n text-decoration: none;\n}\n.compose-modal-component a.list-group-item:hover {\n text-decoration: none;\n background-color: #f8f9fa !important;\n}\n.compose-modal-component .compose-action:hover {\n cursor: pointer;\n background-color: #f8f9fa !important;\n}\n.compose-modal-component .collections-list-group {\n max-height: 500px;\n overflow-y: auto;\n}\n.compose-modal-component .collections-list-group .list-group-item.active {\n color: #212529;\n border-color: #60a5fa !important;\n background-color: #dbeafe !important;\n}",""])},urRO:function(t,e,i){t.exports=function(){"use strict";function t(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function e(e){for(var i=1;it.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&t<1/0};function N(t){return void 0===t}function R(t){return"object"===i(t)&&null!==t}var B=Object.prototype.hasOwnProperty;function z(t){if(!R(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&B.call(i,"isPrototypeOf")}catch(t){return!1}}function j(t){return"function"==typeof t}var H=Array.prototype.slice;function W(t){return Array.from?Array.from(t):H.call(t)}function U(t,e){return t&&j(e)&&(Array.isArray(t)||O(t.length)?W(t).forEach((function(i,n){e.call(t,i,n,t)})):R(t)&&Object.keys(t).forEach((function(i){e.call(t,t[i],i,t)}))),t}var Y=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n0&&i.forEach((function(e){R(e)&&Object.keys(e).forEach((function(i){t[i]=e[i]}))})),t},$=/\.\d*(?:0|9){12}\d*$/;function F(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return $.test(t)?Math.round(t*e)/e:t}var V=/^width|height|left|top|marginLeft|marginTop$/;function X(t,e){var i=t.style;U(e,(function(t,e){V.test(e)&&O(t)&&(t="".concat(t,"px")),i[e]=t}))}function q(t,e){if(e)if(O(t.length))U(t,(function(t){q(t,e)}));else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function Z(t,e){e&&(O(t.length)?U(t,(function(t){Z(t,e)})):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function K(t,e,i){e&&(O(t.length)?U(t,(function(t){K(t,e,i)})):i?q(t,e):Z(t,e))}var G=/([a-z\d])([A-Z])/g;function Q(t){return t.replace(G,"$1-$2").toLowerCase()}function J(t,e){return R(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(Q(e)))}function tt(t,e,i){R(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(Q(e)),i)}var et=/\s\s*/,it=function(){var t=!1;if(l){var e=!1,i=function(){},n=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});c.addEventListener("test",i,n),c.removeEventListener("test",i,n)}return t}();function nt(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=i;e.trim().split(et).forEach((function(e){if(!it){var a=t.listeners;a&&a[e]&&a[e][i]&&(o=a[e][i],delete a[e][i],0===Object.keys(a[e]).length&&delete a[e],0===Object.keys(a).length&&delete t.listeners)}t.removeEventListener(e,o,n)}))}function ot(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=i;e.trim().split(et).forEach((function(e){if(n.once&&!it){var a=t.listeners,s=void 0===a?{}:a;o=function(){delete s[e][i],t.removeEventListener(e,o,n);for(var a=arguments.length,r=new Array(a),l=0;l1&&void 0!==arguments[1]?arguments[1]:"contain",a=I(n),s=I(i);if(a&&s){var r=i*e;"contain"===o&&r>n||"cover"===o&&r=8&&(a=l+d)}}}if(a){var u,p,h=i.getUint16(a,n);for(p=0;p=0?o:200),height:Math.max(i.offsetHeight,a>=0?a:100)};this.containerData=s,X(n,{width:s.width,height:s.height}),q(t,m),Z(n,m)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,n=Math.abs(e.rotate)%180==90,o=n?e.naturalHeight:e.naturalWidth,a=n?e.naturalWidth:e.naturalHeight,s=o/a,r=t.width,l=t.height;t.height*s>t.width?3===i?r=t.height*s:l=t.width/s:3===i?l=t.width/s:r=t.height*s;var c={aspectRatio:s,naturalWidth:o,naturalHeight:a,width:r,height:l};this.canvasData=c,this.limited=1===i||2===i,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=Y({},c)},limitCanvas:function(t,e){var i=this.options,n=this.containerData,o=this.canvasData,a=this.cropBoxData,s=i.viewMode,r=o.aspectRatio,l=this.cropped&&a;if(t){var c=Number(i.minCanvasWidth)||0,d=Number(i.minCanvasHeight)||0;s>1?(c=Math.max(c,n.width),d=Math.max(d,n.height),3===s&&(d*r>c?c=d*r:d=c/r)):s>0&&(c?c=Math.max(c,l?a.width:0):d?d=Math.max(d,l?a.height:0):l&&(c=a.width,(d=a.height)*r>c?c=d*r:d=c/r));var u=ht({aspectRatio:r,width:c,height:d});c=u.width,d=u.height,o.minWidth=c,o.minHeight=d,o.maxWidth=1/0,o.maxHeight=1/0}if(e)if(s>(l?0:1)){var p=n.width-o.width,h=n.height-o.height;o.minLeft=Math.min(0,p),o.minTop=Math.min(0,h),o.maxLeft=Math.max(0,p),o.maxTop=Math.max(0,h),l&&this.limited&&(o.minLeft=Math.min(a.left,a.left+(a.width-o.width)),o.minTop=Math.min(a.top,a.top+(a.height-o.height)),o.maxLeft=a.left,o.maxTop=a.top,2===s&&(o.width>=n.width&&(o.minLeft=Math.min(0,p),o.maxLeft=Math.max(0,p)),o.height>=n.height&&(o.minTop=Math.min(0,h),o.maxTop=Math.max(0,h))))}else o.minLeft=-o.width,o.minTop=-o.height,o.maxLeft=n.width,o.maxTop=n.height},renderCanvas:function(t,e){var i=this.canvasData,n=this.imageData;if(e){var o=function(t){var e=t.width,i=t.height,n=t.degree;if(90==(n=Math.abs(n)%180))return{width:i,height:e};var o=n%90*Math.PI/180,a=Math.sin(o),s=Math.cos(o),r=e*s+i*a,l=e*a+i*s;return n>90?{width:l,height:r}:{width:r,height:l}}({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),a=o.width,s=o.height,r=i.width*(a/i.naturalWidth),l=i.height*(s/i.naturalHeight);i.left-=(r-i.width)/2,i.top-=(l-i.height)/2,i.width=r,i.height=l,i.aspectRatio=a/s,i.naturalWidth=a,i.naturalHeight=s,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.widthi.maxHeight||i.heighte.width?o.height=o.width/i:o.width=o.height*i),this.cropBoxData=o,this.limitCropBox(!0,!0),o.width=Math.min(Math.max(o.width,o.minWidth),o.maxWidth),o.height=Math.min(Math.max(o.height,o.minHeight),o.maxHeight),o.width=Math.max(o.minWidth,o.width*n),o.height=Math.max(o.minHeight,o.height*n),o.left=e.left+(e.width-o.width)/2,o.top=e.top+(e.height-o.height)/2,o.oldLeft=o.left,o.oldTop=o.top,this.initialCropBoxData=Y({},o)},limitCropBox:function(t,e){var i=this.options,n=this.containerData,o=this.canvasData,a=this.cropBoxData,s=this.limited,r=i.aspectRatio;if(t){var l=Number(i.minCropBoxWidth)||0,c=Number(i.minCropBoxHeight)||0,d=s?Math.min(n.width,o.width,o.width+o.left,n.width-o.left):n.width,u=s?Math.min(n.height,o.height,o.height+o.top,n.height-o.top):n.height;l=Math.min(l,n.width),c=Math.min(c,n.height),r&&(l&&c?c*r>l?c=l/r:l=c*r:l?c=l/r:c&&(l=c*r),u*r>d?u=d/r:d=u*r),a.minWidth=Math.min(l,d),a.minHeight=Math.min(c,u),a.maxWidth=d,a.maxHeight=u}e&&(s?(a.minLeft=Math.max(0,o.left),a.minTop=Math.max(0,o.top),a.maxLeft=Math.min(n.width,o.left+o.width)-a.width,a.maxTop=Math.min(n.height,o.top+o.height)-a.height):(a.minLeft=0,a.minTop=0,a.maxLeft=n.width-a.width,a.maxTop=n.height-a.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.widthi.maxHeight||i.height=e.width&&i.height>=e.height?"move":"all"),X(this.cropBox,Y({width:i.width,height:i.height},ut({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),at(this.element,"crop",this.getData())}},wt={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,n=e?this.crossOriginUrl:this.url,o=t.alt||"The image to preview",a=document.createElement("img");if(e&&(a.crossOrigin=e),a.src=n,a.alt=o,this.viewBox.appendChild(a),this.viewBoxImage=a,i){var s=i;"string"==typeof i?s=t.ownerDocument.querySelectorAll(i):i.querySelector&&(s=[i]),this.previews=s,U(s,(function(t){var i=document.createElement("img");tt(t,y,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=n,i.alt=o,i.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(i)}))}},resetPreview:function(){U(this.previews,(function(t){var e=J(t,y);X(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(R(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(Q(e)))}(t,y)}))},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,n=i.width,o=i.height,a=t.width,s=t.height,r=i.left-e.left-t.left,l=i.top-e.top-t.top;this.cropped&&!this.disabled&&(X(this.viewBoxImage,Y({width:a,height:s},ut(Y({translateX:-r,translateY:-l},t)))),U(this.previews,(function(e){var i=J(e,y),c=i.width,d=i.height,u=c,p=d,h=1;n&&(p=o*(h=c/n)),o&&p>d&&(u=n*(h=d/o),p=d),X(e,{width:u,height:p}),X(e.getElementsByTagName("img")[0],Y({width:a*h,height:s*h},ut(Y({translateX:-r*h,translateY:-l*h},t))))})))}},yt={bind:function(){var t=this.element,e=this.options,i=this.cropper;j(e.cropstart)&&ot(t,"cropstart",e.cropstart),j(e.cropmove)&&ot(t,"cropmove",e.cropmove),j(e.cropend)&&ot(t,"cropend",e.cropend),j(e.crop)&&ot(t,"crop",e.crop),j(e.zoom)&&ot(t,"zoom",e.zoom),ot(i,k,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&ot(i,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&ot(i,"dblclick",this.onDblclick=this.dblclick.bind(this)),ot(t.ownerDocument,T,this.onCropMove=this.cropMove.bind(this)),ot(t.ownerDocument,S,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&ot(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;j(e.cropstart)&&nt(t,"cropstart",e.cropstart),j(e.cropmove)&&nt(t,"cropmove",e.cropmove),j(e.cropend)&&nt(t,"cropend",e.cropend),j(e.crop)&&nt(t,"crop",e.crop),j(e.zoom)&&nt(t,"zoom",e.zoom),nt(i,k,this.onCropStart),e.zoomable&&e.zoomOnWheel&&nt(i,"wheel",this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&nt(i,"dblclick",this.onDblclick),nt(t.ownerDocument,T,this.onCropMove),nt(t.ownerDocument,S,this.onCropEnd),e.responsive&&nt(window,"resize",this.onResize)}},xt={resize:function(){if(!this.disabled){var t,e,i=this.options,n=this.container,o=this.containerData,a=n.offsetWidth/o.width,s=n.offsetHeight/o.height,r=Math.abs(a-1)>Math.abs(s-1)?a:s;1!==r&&(i.restore&&(t=this.getCanvasData(),e=this.getCropBoxData()),this.render(),i.restore&&(this.setCanvasData(U(t,(function(e,i){t[i]=e*r}))),this.setCropBoxData(U(e,(function(t,i){e[i]=t*r})))))}},dblclick:function(){var t,e;this.disabled||"none"===this.options.dragMode||this.setDragMode((t=this.dragBox,e=p,(t.classList?t.classList.contains(e):t.className.indexOf(e)>-1)?"move":"crop"))},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(O(e)&&1!==e||O(i)&&0!==i||t.ctrlKey))){var n,o=this.options,a=this.pointers;t.changedTouches?U(t.changedTouches,(function(t){a[t.identifier]=pt(t)})):a[t.pointerId||0]=pt(t),n=Object.keys(a).length>1&&o.zoomable&&o.zoomOnTouch?"zoom":J(t.target,w),M.test(n)&&!1!==at(this.element,"cropstart",{originalEvent:t,action:n})&&(t.preventDefault(),this.action=n,this.cropping=!1,"crop"===n&&(this.cropping=!0,q(this.dragBox,v)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==at(this.element,"cropmove",{originalEvent:t,action:e})&&(t.changedTouches?U(t.changedTouches,(function(t){Y(i[t.identifier]||{},pt(t,!0))})):Y(i[t.pointerId||0]||{},pt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?U(t.changedTouches,(function(t){delete i[t.identifier]})):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,K(this.dragBox,v,this.cropped&&this.options.modal)),at(this.element,"cropend",{originalEvent:t,action:e}))}}},Ct={change:function(t){var i,n=this.options,o=this.canvasData,a=this.containerData,s=this.cropBoxData,r=this.pointers,l=this.action,c=n.aspectRatio,d=s.left,u=s.top,p=s.width,h=s.height,f=d+p,g=u+h,v=0,b=0,w=a.width,y=a.height,x=!0;!c&&t.shiftKey&&(c=p&&h?p/h:1),this.limited&&(v=s.minLeft,b=s.minTop,w=v+Math.min(a.width,o.width,o.left+o.width),y=b+Math.min(a.height,o.height,o.top+o.height));var C=r[Object.keys(r)[0]],_={x:C.endX-C.startX,y:C.endY-C.startY},k=function(t){switch(t){case"e":f+_.x>w&&(_.x=w-f);break;case"w":d+_.xy&&(_.y=y-g)}};switch(l){case"all":d+=_.x,u+=_.y;break;case"e":if(_.x>=0&&(f>=w||c&&(u<=b||g>=y))){x=!1;break}k("e"),(p+=_.x)<0&&(l="w",d-=p=-p),c&&(h=p/c,u+=(s.height-h)/2);break;case"n":if(_.y<=0&&(u<=b||c&&(d<=v||f>=w))){x=!1;break}k("n"),h-=_.y,u+=_.y,h<0&&(l="s",u-=h=-h),c&&(p=h*c,d+=(s.width-p)/2);break;case"w":if(_.x<=0&&(d<=v||c&&(u<=b||g>=y))){x=!1;break}k("w"),p-=_.x,d+=_.x,p<0&&(l="e",d-=p=-p),c&&(h=p/c,u+=(s.height-h)/2);break;case"s":if(_.y>=0&&(g>=y||c&&(d<=v||f>=w))){x=!1;break}k("s"),(h+=_.y)<0&&(l="n",u-=h=-h),c&&(p=h*c,d+=(s.width-p)/2);break;case"ne":if(c){if(_.y<=0&&(u<=b||f>=w)){x=!1;break}k("n"),h-=_.y,u+=_.y,p=h*c}else k("n"),k("e"),_.x>=0?fb&&(h-=_.y,u+=_.y):(h-=_.y,u+=_.y);p<0&&h<0?(l="sw",u-=h=-h,d-=p=-p):p<0?(l="nw",d-=p=-p):h<0&&(l="se",u-=h=-h);break;case"nw":if(c){if(_.y<=0&&(u<=b||d<=v)){x=!1;break}k("n"),h-=_.y,u+=_.y,p=h*c,d+=s.width-p}else k("n"),k("w"),_.x<=0?d>v?(p-=_.x,d+=_.x):_.y<=0&&u<=b&&(x=!1):(p-=_.x,d+=_.x),_.y<=0?u>b&&(h-=_.y,u+=_.y):(h-=_.y,u+=_.y);p<0&&h<0?(l="se",u-=h=-h,d-=p=-p):p<0?(l="ne",d-=p=-p):h<0&&(l="sw",u-=h=-h);break;case"sw":if(c){if(_.x<=0&&(d<=v||g>=y)){x=!1;break}k("w"),p-=_.x,d+=_.x,h=p/c}else k("s"),k("w"),_.x<=0?d>v?(p-=_.x,d+=_.x):_.y>=0&&g>=y&&(x=!1):(p-=_.x,d+=_.x),_.y>=0?g=0&&(f>=w||g>=y)){x=!1;break}k("e"),h=(p+=_.x)/c}else k("s"),k("e"),_.x>=0?f=0&&g>=y&&(x=!1):p+=_.x,_.y>=0?gMath.abs(n)&&(n=l)}))})),n}(r),t),x=!1;break;case"crop":if(!_.x||!_.y){x=!1;break}i=st(this.cropper),d=C.startX-i.left,u=C.startY-i.top,p=s.minWidth,h=s.minHeight,_.x>0?l=_.y>0?"se":"ne":_.x<0&&(d-=p,l=_.y>0?"sw":"nw"),_.y<0&&(u-=h),this.cropped||(Z(this.cropBox,m),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}x&&(s.width=p,s.height=h,s.left=d,s.top=u,this.action=l,this.renderCropBox()),U(r,(function(t){t.startX=t.endX,t.startY=t.endY}))}},_t={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&q(this.dragBox,v),Z(this.cropBox,m),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Y({},this.initialImageData),this.canvasData=Y({},this.initialCanvasData),this.cropBoxData=Y({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Y(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Z(this.dragBox,v),q(this.cropBox,m)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,U(this.previews,(function(e){e.getElementsByTagName("img")[0].src=t})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Z(this.cropper,h)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,q(this.cropper,h)),this},destroy:function(){var t=this.element;return t.cropper?(t.cropper=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,n=i.left,o=i.top;return this.moveTo(N(t)?t:n+Number(t),N(e)?e:o+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,n=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(O(t)&&(i.left=t,n=!0),O(e)&&(i.top=e,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var n=this.options,o=this.canvasData,a=o.width,s=o.height,r=o.naturalWidth,l=o.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&n.zoomable){var c=r*t,d=l*t;if(!1===at(this.element,"zoom",{ratio:t,oldRatio:a/r,originalEvent:i}))return this;if(i){var u=this.pointers,p=st(this.cropper),h=u&&Object.keys(u).length?function(t){var e=0,i=0,n=0;return U(t,(function(t){var o=t.startX,a=t.startY;e+=o,i+=a,n+=1})),{pageX:e/=n,pageY:i/=n}}(u):{pageX:i.pageX,pageY:i.pageY};o.left-=(c-a)*((h.pageX-p.left-o.left)/a),o.top-=(d-s)*((h.pageY-p.top-o.top)/s)}else z(e)&&O(e.x)&&O(e.y)?(o.left-=(c-a)*((e.x-o.left)/a),o.top-=(d-s)*((e.y-o.top)/s)):(o.left-=(c-a)/2,o.top-=(d-s)/2);o.width=c,o.height=d,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return O(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,O(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(O(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,n=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(O(t)&&(i.scaleX=t,n=!0),O(e)&&(i.scaleY=e,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,n=this.imageData,o=this.canvasData,a=this.cropBoxData;if(this.ready&&this.cropped){t={x:a.left-o.left,y:a.top-o.top,width:a.width,height:a.height};var s=n.width/n.naturalWidth;if(U(t,(function(e,i){t[i]=e/s})),e){var r=Math.round(t.y+t.height),l=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=l-t.x,t.height=r-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=n.rotate||0),i.scalable&&(t.scaleX=n.scaleX||1,t.scaleY=n.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,n=this.canvasData,o={};if(this.ready&&!this.disabled&&z(t)){var a=!1;e.rotatable&&O(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,a=!0),e.scalable&&(O(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,a=!0),O(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,a=!0)),a&&this.renderCanvas(!0,!0);var s=i.width/i.naturalWidth;O(t.x)&&(o.left=t.x*s+n.left),O(t.y)&&(o.top=t.y*s+n.top),O(t.width)&&(o.width=t.width*s),O(t.height)&&(o.height=t.height*s),this.setCropBoxData(o)}return this},getContainerData:function(){return this.ready?Y({},this.containerData):{}},getImageData:function(){return this.sized?Y({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&U(["left","top","width","height","naturalWidth","naturalHeight"],(function(i){e[i]=t[i]})),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&z(t)&&(O(t.left)&&(e.left=t.left),O(t.top)&&(e.top=t.top),O(t.width)?(e.width=t.width,e.height=t.width/i):O(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,n=this.cropBoxData,o=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&z(t)&&(O(t.left)&&(n.left=t.left),O(t.top)&&(n.top=t.top),O(t.width)&&t.width!==n.width&&(e=!0,n.width=t.width),O(t.height)&&t.height!==n.height&&(i=!0,n.height=t.height),o&&(e?n.height=n.width/o:i&&(n.width=n.height*o)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=mt(this.image,this.imageData,e,t);if(!this.cropped)return i;var n=this.getData(),o=n.x,a=n.y,r=n.width,l=n.height,c=i.width/Math.floor(e.naturalWidth);1!==c&&(o*=c,a*=c,r*=c,l*=c);var d=r/l,u=ht({aspectRatio:d,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=ht({aspectRatio:d,width:t.minWidth||0,height:t.minHeight||0},"cover"),h=ht({aspectRatio:d,width:t.width||(1!==c?i.width:r),height:t.height||(1!==c?i.height:l)}),m=h.width,f=h.height;m=Math.min(u.width,Math.max(p.width,m)),f=Math.min(u.height,Math.max(p.height,f));var g=document.createElement("canvas"),v=g.getContext("2d");g.width=F(m),g.height=F(f),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,m,f);var b=t.imageSmoothingEnabled,w=void 0===b||b,y=t.imageSmoothingQuality;v.imageSmoothingEnabled=w,y&&(v.imageSmoothingQuality=y);var x,C,_,k,T,S,M=i.width,A=i.height,D=o,E=a;D<=-r||D>M?(D=0,x=0,_=0,T=0):D<=0?(_=-D,D=0,T=x=Math.min(M,r+D)):D<=M&&(_=0,T=x=Math.min(r,M-D)),x<=0||E<=-l||E>A?(E=0,C=0,k=0,S=0):E<=0?(k=-E,E=0,S=C=Math.min(A,l+E)):E<=A&&(k=0,S=C=Math.min(l,A-E));var L=[D,E,x,C];if(T>0&&S>0){var P=m/r;L.push(_*P,k*P,T*P,S*P)}return v.drawImage.apply(v,[i].concat(s(L.map((function(t){return Math.floor(F(t))}))))),g},setAspectRatio:function(t){var e=this.options;return this.disabled||N(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var o="crop"===t,a=e.movable&&"move"===t;t=o||a?t:"none",e.dragMode=t,tt(i,w,t),K(i,p,o),K(i,b,a),e.cropBoxMovable||(tt(n,w,t),K(n,p,o),K(n,b,a))}return this}},kt=c.Cropper,Tt=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,t),!e||!E.test(e.tagName))throw new Error("The first argument is required and must be an or element.");this.element=e,this.options=Y({},L,z(i)&&i),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}var e,i,a;return e=t,a=[{key:"noConflict",value:function(){return window.Cropper=kt,t}},{key:"setDefaults",value:function(t){Y(L,z(t)&&t)}}],(i=[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e.cropper){if(e.cropper=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e=this;if(t){this.url=t,this.imageData={};var i=this.element,n=this.options;if(n.rotatable||n.scalable||(n.checkOrientation=!1),n.checkOrientation&&window.ArrayBuffer)if(A.test(t))D.test(t)?this.read((o=t.replace(gt,""),a=atob(o),s=new ArrayBuffer(a.length),U(r=new Uint8Array(s),(function(t,e){r[e]=a.charCodeAt(e)})),s)):this.clone();else{var o,a,s,r,l=new XMLHttpRequest,c=this.clone.bind(this);this.reloading=!0,this.xhr=l,l.onabort=c,l.onerror=c,l.ontimeout=c,l.onprogress=function(){"image/jpeg"!==l.getResponseHeader("content-type")&&l.abort()},l.onload=function(){e.read(l.response)},l.onloadend=function(){e.reloading=!1,e.xhr=null},n.checkCrossOrigin&&ct(t)&&i.crossOrigin&&(t=dt(t)),l.open("GET",t,!0),l.responseType="arraybuffer",l.withCredentials="use-credentials"===i.crossOrigin,l.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,n=vt(t),o=0,a=1,s=1;if(n>1){this.url=function(t,e){for(var i=[],n=new Uint8Array(t);n.length>0;)i.push(ft.apply(null,W(n.subarray(0,8192)))),n=n.subarray(8192);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}(t,"image/jpeg");var r=function(t){var e=0,i=1,n=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:n=-1;break;case 5:e=90,n=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:n}}(n);o=r.rotate,a=r.scaleX,s=r.scaleY}e.rotatable&&(i.rotate=o),e.scalable&&(i.scaleX=a,i.scaleY=s),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,n=e;this.options.checkCrossOrigin&&ct(e)&&(i||(i="anonymous"),n=dt(e)),this.crossOrigin=i,this.crossOriginUrl=n;var o=document.createElement("img");i&&(o.crossOrigin=i),o.src=n||e,o.alt=t.alt||"The image to crop",this.image=o,o.onload=this.start.bind(this),o.onerror=this.stop.bind(this),q(o,f),t.parentNode.insertBefore(o,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=c.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(c.navigator.userAgent),n=function(e,i){Y(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.initialImageData=Y({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var o=document.createElement("img"),a=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){n(o.width,o.height),i||a.removeChild(o)},o.src=e.src,i||(o.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",a.appendChild(o))}else n(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,n=t.parentNode,o=document.createElement("div");o.innerHTML='
    ';var a=o.querySelector(".".concat("cropper","-container")),s=a.querySelector(".".concat("cropper","-canvas")),r=a.querySelector(".".concat("cropper","-drag-box")),l=a.querySelector(".".concat("cropper","-crop-box")),c=l.querySelector(".".concat("cropper","-face"));this.container=n,this.cropper=a,this.canvas=s,this.dragBox=r,this.cropBox=l,this.viewBox=a.querySelector(".".concat("cropper","-view-box")),this.face=c,s.appendChild(i),q(t,m),n.insertBefore(a,t.nextSibling),this.isImg||Z(i,f),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,q(l,m),e.guides||q(l.getElementsByClassName("".concat("cropper","-dashed")),m),e.center||q(l.getElementsByClassName("".concat("cropper","-center")),m),e.background&&q(a,"".concat("cropper","-bg")),e.highlight||q(c,g),e.cropBoxMovable&&(q(c,b),tt(c,w,"all")),e.cropBoxResizable||(q(l.getElementsByClassName("".concat("cropper","-line")),m),q(l.getElementsByClassName("".concat("cropper","-point")),m)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),j(e.ready)&&ot(t,"ready",e.ready,{once:!0}),at(t,"ready")}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),Z(this.element,m))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}])&&o(e.prototype,i),a&&o(e,a),t}();return Y(Tt.prototype,bt,wt,yt,xt,Ct,_t),Tt}()},yLpj:function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},zlB4:function(t,e,i){"use strict";i.r(e);var n=i("lcPr"),o=i.n(n),a=(i("YQfW"),i("lb/t")),s=(i("i3gq"),i("JMt0"));function r(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return l(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i10&&(t.licenseTitle=t.availableLicenses.filter((function(e){return e.id==t.licenseId})).map((function(t){return t.title}))[0]),t.fetchProfile()}))},mounted:function(){this.mediaWatcher()},methods:{timeAgo:function(t){return App.util.format.timeAgo(t)},fetchProfile:function(){var t=this,e={public:"Public",private:"Followers Only",unlisted:"Unlisted"};if(window._sharedData.curUser.id){if(this.profile=window._sharedData.curUser,this.composeSettings&&this.composeSettings.hasOwnProperty("default_scope")&&this.composeSettings.default_scope){var i=this.composeSettings.default_scope;this.visibility=i,this.visibilityTag=e[i]}1==this.profile.locked&&(this.visibility="private",this.visibilityTag="Followers Only")}else axios.get("/api/pixelfed/v1/accounts/verify_credentials").then((function(i){if(window._sharedData.currentUser=i.data,t.profile=i.data,t.composeSettings&&t.composeSettings.hasOwnProperty("default_scope")&&t.composeSettings.default_scope){var n=t.composeSettings.default_scope;t.visibility=n,t.visibilityTag=e[n]}1==t.profile.locked&&(t.visibility="private",t.visibilityTag="Followers Only")})).catch((function(t){}))},addMedia:function(t){var e=$(t.target);e.attr("disabled",""),$('.file-input[name="media"]').trigger("click"),e.blur(),e.removeAttr("disabled")},addText:function(t){this.pageTitle="New Text Post",this.page="addText",this.textMode=!0,this.mode="text"},mediaWatcher:function(){var t=this;$(document).on("change","#pf-dz",(function(e){t.mediaUpload()}))},mediaUpload:function(){var t=this;t.uploading=!0;var e=document.querySelector("#pf-dz");e.files.length||(t.uploading=!1),Array.prototype.forEach.call(e.files,(function(e,i){if(t.media&&t.media.length+i>=t.config.uploader.album_limit)return swal("Error","You can only upload "+t.config.uploader.album_limit+" photos per album","error"),t.uploading=!1,void(t.page=2);var n=e.type,o=t.config.uploader.media_types.split(",");if(-1==$.inArray(n,o))return swal("Invalid File Type","The file you are trying to add is not a valid mime type. Please upload a "+t.config.uploader.media_types+" only.","error"),t.uploading=!1,void(t.page=2);var a=new FormData;a.append("file",e);var s={onUploadProgress:function(e){var i=Math.round(100*e.loaded/e.total);t.uploadProgress=i}};axios.post("/api/compose/v0/media/upload",a,s).then((function(e){t.uploadProgress=100,t.ids.push(e.data.id),t.media.push(e.data),t.uploading=!1,setTimeout((function(){t.page=3}),300)})).catch((function(i){switch(i.response.status){case 451:t.uploading=!1,e.value=null,swal("Banned Content","This content has been banned and cannot be uploaded.","error"),t.page=2;break;case 429:t.uploading=!1,e.value=null,swal("Limit Reached","You can upload up to 250 photos or videos per day and you've reached that limit. Please try again later.","error"),t.page=2;break;default:t.uploading=!1,e.value=null,swal("Oops, something went wrong!","An unexpected error occurred.","error"),t.page=2}})),e.value=null,t.uploadProgress=0}))},toggleFilter:function(t,e){this.media[this.carouselCursor].filter_class=e,this.currentFilter=e},deleteMedia:function(){var t=this;if(0!=window.confirm("Are you sure you want to delete this media?")){var e=this.media[this.carouselCursor].id;axios.delete("/api/compose/v0/media/delete",{params:{id:e}}).then((function(e){t.ids.splice(t.carouselCursor,1),t.media.splice(t.carouselCursor,1),0==t.media.length?(t.ids=[],t.media=[],t.carouselCursor=0):t.carouselCursor=0})).catch((function(t){swal("Whoops!","An error occured when attempting to delete this, please try again","error")}))}},compose:function(){var t=this,e=this.composeState;if(100==this.uploadProgress&&0!=this.ids.length)if(this.composeText.length>this.config.uploader.max_caption_length)swal("Error","Caption is too long","error");else switch(e){case"publish":if(!0===this.composeSettings.media_descriptions)if(this.media.filter((function(t){return!t.hasOwnProperty("alt")||t.alt.length<2})).length)return void swal("Missing media descriptions","You have enabled mandatory media descriptions. Please add media descriptions under Advanced settings to proceed. For more information, please see the media settings page.","warning");if(0==this.media.length)return void swal("Whoops!","You need to add media before you can save this!","warning");"Add optional caption..."==this.composeText&&(this.composeText="");var i={media:this.media,caption:this.composeText,visibility:this.visibility,cw:this.nsfw,comments_disabled:this.commentsDisabled,place:this.place,tagged:this.taggedUsernames,optimize_media:this.optimizeMedia,license:this.licenseId,video:this.video};return this.collectionsSelected.length&&(i.collections=this.collectionsSelected.map((function(e){return t.collections[e].id}))),void axios.post("/api/compose/v0/publish",i).then((function(t){var e=t.data;"/i/web/compose"===location.pathname?location.href="/i/web/post/"+e.split("/").at(-1):location.href=e})).catch((function(t){var e=t.response.data.message?t.response.data.message:"An unexpected error occured.";swal("Oops, something went wrong!",e,"error")}));case"delete":return this.ids=[],this.media=[],this.carouselCursor=0,this.composeText="",this.composeTextLength=0,void $("#composeModal").modal("hide")}},composeTextPost:function(){var t=this.composeState;if(this.composeText.length>this.config.uploader.max_caption_length)swal("Error","Caption is too long","error");else switch(t){case"publish":var e={caption:this.composeText,visibility:this.visibility,cw:this.nsfw,comments_disabled:this.commentsDisabled,place:this.place,tagged:this.taggedUsernames};return void axios.post("/api/compose/v0/publish/text",e).then((function(t){var e=t.data;window.location.href=e})).catch((function(t){var e=t.response.data.message?t.response.data.message:"An unexpected error occured.";swal("Oops, something went wrong!",e,"error")}));case"delete":return this.ids=[],this.media=[],this.carouselCursor=0,this.composeText="",this.composeTextLength=0,void $("#composeModal").modal("hide")}},closeModal:function(){$("#composeModal").modal("hide")},goBack:function(){switch(this.pageTitle="",this.mode){case"photo":switch(this.page){case"addText":this.page=1;break;case"textOptions":this.page="addText";break;case"cropPhoto":case"editMedia":this.page=2;break;case"tagPeopleHelp":this.showTagCard();break;case"licensePicker":this.page=3;break;case"video-2":this.page=1;break;default:-1!=this.namedPages.indexOf(this.page)?this.page=3:this.page--}break;case"video":switch(this.page){case"licensePicker":case"video-2":default:this.page="video-2"}break;default:switch(this.page){case"addText":this.page=1;break;case"textOptions":this.page="addText";break;case"cropPhoto":case"editMedia":this.page=2;break;case"tagPeopleHelp":this.showTagCard();break;case"licensePicker":this.page=3;break;case"video-2":this.page=1;break;default:-1!=this.namedPages.indexOf(this.page)?this.page="text"==this.mode?"addText":3:"text"==this.mode||this.page--}}},nextPage:function(){switch(this.pageTitle="",this.page){case 1:this.page=2;break;case"cropPhoto":this.pageLoading=!0;var t=this;this.$refs.cropper.getCroppedCanvas({maxWidth:4096,maxHeight:4096,fillColor:"#fff",imageSmoothingEnabled:!1,imageSmoothingQuality:"high"}).toBlob((function(e){t.mediaCropped=!0;var i=new FormData;i.append("file",e),i.append("id",t.ids[t.carouselCursor]);axios.post("/api/compose/v0/media/update",i).then((function(e){t.media[t.carouselCursor].url=e.data.url,t.pageLoading=!1,t.page=2})).catch((function(t){}))}));break;case 2:this.currentFilter?window.confirm("Are you sure you want to apply this filter?")&&(this.applyFilterToMedia(),this.page++):this.page++;break;case 3:this.page++}},rotate:function(){this.$refs.cropper.rotate(90)},changeAspect:function(t){this.cropper.aspectRatio=t,this.$refs.cropper.setAspectRatio(t)},showTagCard:function(){this.pageTitle="Tag People",this.page="tagPeople"},showTagHelpCard:function(){this.pageTitle="About Tag People",this.page="tagPeopleHelp"},showLocationCard:function(){this.pageTitle="Add Location",this.page="addLocation"},showAdvancedSettingsCard:function(){this.pageTitle="Advanced Settings",this.page="advancedSettings"},locationSearch:function(t){if(t.length<1)return[];return axios.get("/api/compose/v0/search/location",{params:{q:t}}).then((function(t){return t.data}))},getResultValue:function(t){return t.name+", "+t.country},onSubmitLocation:function(t){switch(this.place=t,this.mode){case"photo":this.pageTitle="",this.page=3;break;case"video":this.pageTitle="Edit Video Details",this.page="video-2";break;case"text":this.pageTitle="New Text Post",this.page="addText"}},showVisibilityCard:function(){this.pageTitle="Post Visibility",this.page="visibility"},showAddToStoryCard:function(){this.pageTitle="Add to Story",this.page="addToStory"},showCropPhotoCard:function(){this.pageTitle="Edit Photo",this.page="cropPhoto"},toggleVisibility:function(t){switch(this.visibility=t,this.visibilityTag={public:"Public",private:"Followers Only",unlisted:"Unlisted"}[t],this.mode){case"photo":this.pageTitle="",this.page=3;break;case"video":this.pageTitle="Edit Video Details",this.page="video-2";break;case"text":this.pageTitle="New Text Post",this.page="addText"}},showMediaDescriptionsCard:function(){this.pageTitle="Media Descriptions",this.page="altText"},showAddToCollectionsCard:function(){this.pageTitle="Add to Collection",this.page="addToCollection"},showSchedulePostCard:function(){this.pageTitle="Schedule Post",this.page="schedulePost"},showEditMediaCard:function(){this.pageTitle="Edit Media",this.page="editMedia"},fetchCameraRollDrafts:function(){var t=this;axios.get("/api/pixelfed/local/drafts").then((function(e){t.cameraRollMedia=e.data}))},applyFilterToMedia:function(){var t=navigator.userAgent.toLowerCase();if(-1!=t.indexOf("firefox")||-1!=t.indexOf("chrome"))for(var e=this.media,i=null,n=document.getElementById("pr_canvas"),o=n.getContext("2d"),a=document.getElementById("pr_img"),s=null,r=e.length-1;r>=0;r--)(i=e[r]).filter_class&&(a.src=i.url,a.addEventListener("load",(function(t){n.width=a.width,n.height=a.height,o.filter=App.util.filterCss[i.filter_class],o.drawImage(a,0,0,a.width,a.height),o.save(),n.toBlob((function(t){(s=new FormData).append("file",t),s.append("id",i.id),axios.post("/api/compose/v0/media/update",s).then((function(t){})).catch((function(t){}))}))}),i.mime,.9),o.clearRect(0,0,a.width,a.height));else swal("Oops!","Your browser does not support the filter feature.","error")},tagSearch:function(t){if(t.length<1)return[];var e=this;return axios.get("/api/compose/v0/search/tag",{params:{q:t}}).then((function(t){if(t.data.length)return t.data.filter((function(t){return 0==e.taggedUsernames.filter((function(e){return e.id==t.id})).length}))}))},getTagResultValue:function(t){return"@"+t.name},onTagSubmitLocation:function(t){this.taggedUsernames.filter((function(e){return e.id==t.id})).length||(this.taggedUsernames.push(t),this.$refs.autocomplete.value="")},untagUsername:function(t){this.taggedUsernames.splice(t,1)},showTextOptions:function(){this.page="textOptions",this.pageTitle="Text Post Options"},showLicenseCard:function(){this.pageTitle="Select a License",this.page="licensePicker"},toggleLicense:function(t){var e=this;switch(this.licenseId=t.id,this.licenseId>10?this.licenseTitle=this.availableLicenses.filter((function(t){return t.id==e.licenseId})).map((function(t){return t.title}))[0]:this.licenseTitle=null,this.mode){case"photo":this.pageTitle="",this.page=3;break;case"video":this.pageTitle="Edit Video Details",this.page="video-2";break;case"text":this.pageTitle="New Text Post",this.page="addText"}},newPoll:function(){this.page="poll"},savePollOption:function(){-1==this.pollOptions.indexOf(this.pollOptionModel)?(this.pollOptions.push(this.pollOptionModel),this.pollOptionModel=null):this.pollOptionModel=null},deletePollOption:function(t){this.pollOptions.splice(t,1)},postNewPoll:function(){var t=this;this.postingPoll=!0,axios.post("/api/compose/v0/poll",{caption:this.composeText,cw:!1,visibility:this.visibility,comments_disabled:!1,expiry:this.pollExpiry,pollOptions:this.pollOptions}).then((function(e){if(!e.data.hasOwnProperty("url"))return swal("Oops!","An error occured while attempting to create this poll. Please refresh the page and try again.","error"),void(t.postingPoll=!1);window.location.href=e.data.url})).catch((function(e){if(console.log(e.response.data.error),e.response.data.hasOwnProperty("error")&&"Duplicate detected."==e.response.data.error)return t.postingPoll=!1,void swal("Oops!","The poll you are trying to create is similar to an existing poll you created. Please make the poll question (caption) unique.","error");t.postingPoll=!1,swal("Oops!","An error occured while attempting to create this poll. Please refresh the page and try again.","error")}))},filesize:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){return filesize(1024*t,{round:0})})),showCollectionCard:function(){this.pageTitle="Add to Collection(s)",this.page="addToCollection",this.collectionsLoaded||this.fetchCollections()},fetchCollections:function(){var t=this;axios.get("/api/local/profile/collections/".concat(this.profile.id)).then((function(e){t.collections=e.data,t.collectionsLoaded=!0,t.collectionsCanLoadMore=9==e.data.length,t.collectionsPage++}))},toggleCollectionItem:function(t){if(this.collectionsSelected.includes(t))this.collectionsSelected=this.collectionsSelected.filter((function(e){return e!=t}));else{if(7==this.collectionsSelected.length)return void swal("Oops!","You can only share to 5 collections.","info");this.collectionsSelected.push(t)}},clearSelectedCollections:function(){this.collectionsSelected=[],this.pageTitle="Compose",this.page=3},loadMoreCollections:function(){var t=this;this.collectionsCanLoadMore=!1,axios.get("/api/local/profile/collections/".concat(this.profile.id),{params:{page:this.collectionsPage}}).then((function(e){var i,n=t.collections.map((function(t){return t.id})),o=e.data.filter((function(t){return!n.includes(t.id)}));o&&o.length&&((i=t.collections).push.apply(i,r(o)),t.collectionsPage++,t.collectionsCanLoadMore=!0)}))}}},d=(i("6Wrw"),i("KHd+")),u=Object(d.a)(c,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"compose-modal-component"},[i("input",{staticClass:"w-100 h-100 d-none file-input",attrs:{type:"file",id:"pf-dz",name:"media",multiple:"",accept:t.config.uploader.media_types}}),t._v(" "),i("canvas",{staticClass:"d-none",attrs:{id:"pr_canvas"}}),t._v(" "),i("img",{staticClass:"d-none",attrs:{id:"pr_img"}}),t._v(" "),i("div",{staticClass:"timeline"},[t.uploading?i("div",[i("div",{staticClass:"card status-card card-md-rounded-0 w-100 h-100 bg-light py-3",staticStyle:{"border-bottom":"1px solid #f1f1f1"}},[i("div",{staticClass:"p-5 mt-2"},[i("b-progress",{attrs:{value:t.uploadProgress,max:100,striped:"",animated:!0}}),t._v(" "),i("p",{staticClass:"text-center mb-0 font-weight-bold"},[t._v("Uploading ... ("+t._s(t.uploadProgress)+"%)")])],1)])]):"cameraRoll"==t.page?i("div",[i("div",{staticClass:"card status-card card-md-rounded-0",staticStyle:{display:"flex"}},[t._m(0),t._v(" "),i("div",{staticClass:"h-100 card-body p-0 border-top",staticStyle:{width:"100%","min-height":"400px"}},[t.cameraRollMedia.length>0?i("div",{staticClass:"row p-0 m-0"},t._l(t.cameraRollMedia,(function(t,e){return i("div",{class:[0==e?"col-12 p-0":"col-3 p-0"]},[i("div",{staticClass:"card info-overlay p-0 rounded-0 shadow-none border"},[i("div",{staticClass:"square"},[i("img",{staticClass:"square-content",attrs:{src:t.preview_url}})])])])})),0):i("div",{staticClass:"w-100 h-100 d-flex justify-content-center align-items-center"},[i("span",{staticClass:"w-100 h-100"},[i("button",{staticClass:"btn btn-primary",attrs:{type:"button"}},[t._v("Upload")]),t._v(" "),i("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:function(e){return t.fetchCameraRollDrafts()}}},[t._v("Load Camera Roll")])])])])])]):"poll"==t.page?i("div",[i("div",{staticClass:"card status-card card-md-rounded-0",staticStyle:{display:"flex"}},[i("div",{staticClass:"card-header d-inline-flex align-items-center justify-content-between bg-white"},[t._m(1),t._v(" "),i("span",{staticClass:"font-weight-bold"},[t._v("\n\t\t\t\t\t\tNew Poll\n\t\t\t\t\t")]),t._v(" "),t.postingPoll?i("span",[t._m(2)]):!t.postingPoll&&t.pollOptions.length>1&&t.composeText.length?i("button",{staticClass:"btn btn-primary btn-sm font-weight-bold",on:{click:t.postNewPoll}},[i("span",[t._v("Create Poll")])]):i("span",{staticClass:"font-weight-bold text-lighter"},[t._v("\n\t\t\t\t\t\tCreate Poll\n\t\t\t\t\t")])]),t._v(" "),i("div",{staticClass:"h-100 card-body p-0 border-top",staticStyle:{width:"100%","min-height":"400px"}},[i("div",{staticClass:"border-bottom mt-2"},[i("div",{staticClass:"media px-3"},[i("img",{staticClass:"rounded-circle",attrs:{src:t.profile.avatar,width:"42px",height:"42px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small d-none"},[t._v("Caption")]),t._v(" "),i("vue-tribute",{attrs:{options:t.tributeSettings}},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.composeText,expression:"composeText"}],staticClass:"form-control border-0 rounded-0 no-focus",attrs:{rows:"3",placeholder:"Write a poll question..."},domProps:{value:t.composeText},on:{keyup:function(e){t.composeTextLength=t.composeText.length},input:function(e){e.target.composing||(t.composeText=e.target.value)}}})]),t._v(" "),i("p",{staticClass:"help-text small text-right text-muted mb-0"},[t._v(t._s(t.composeTextLength)+"/"+t._s(t.config.uploader.max_caption_length))])],1)])])]),t._v(" "),i("div",{staticClass:"p-3"},[i("p",{staticClass:"font-weight-bold text-muted small"},[t._v("\n\t\t\t\t\t\t\tPoll Options\n\t\t\t\t\t\t")]),t._v(" "),t.pollOptions.length<4?i("div",{staticClass:"form-group mb-4"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.pollOptionModel,expression:"pollOptionModel"}],staticClass:"form-control rounded-pill",attrs:{type:"text",placeholder:"Add a poll option, press enter to save"},domProps:{value:t.pollOptionModel},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.savePollOption.apply(null,arguments)},input:function(e){e.target.composing||(t.pollOptionModel=e.target.value)}}})]):t._e(),t._v(" "),t._l(t.pollOptions,(function(e,n){return i("div",{staticClass:"form-group mb-4 d-flex align-items-center",staticStyle:{"max-width":"400px",position:"relative"}},[i("span",{staticClass:"font-weight-bold mr-2",staticStyle:{position:"absolute",left:"10px"}},[t._v(t._s(n+1)+".")]),t._v(" "),t.pollOptions[n].length<50?i("input",{directives:[{name:"model",rawName:"v-model",value:t.pollOptions[n],expression:"pollOptions[index]"}],staticClass:"form-control rounded-pill",staticStyle:{"padding-left":"30px","padding-right":"90px"},attrs:{type:"text",placeholder:"Add a poll option, press enter to save"},domProps:{value:t.pollOptions[n]},on:{input:function(e){e.target.composing||t.$set(t.pollOptions,n,e.target.value)}}}):i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.pollOptions[n],expression:"pollOptions[index]"}],staticClass:"form-control",staticStyle:{"padding-left":"30px","padding-right":"90px"},attrs:{placeholder:"Add a poll option, press enter to save",rows:"3"},domProps:{value:t.pollOptions[n]},on:{input:function(e){e.target.composing||t.$set(t.pollOptions,n,e.target.value)}}}),t._v(" "),i("button",{staticClass:"btn btn-danger btn-sm rounded-pill font-weight-bold",staticStyle:{position:"absolute",right:"5px"},on:{click:function(e){return t.deletePollOption(n)}}},[i("i",{staticClass:"fas fa-trash"}),t._v(" Delete\n\t\t\t\t\t\t\t")])])})),t._v(" "),i("hr"),t._v(" "),i("div",{staticClass:"d-flex justify-content-between"},[i("div",[i("p",{staticClass:"font-weight-bold text-muted small"},[t._v("\n\t\t\t\t\t\t\t\t\tPoll Expiry\n\t\t\t\t\t\t\t\t")]),t._v(" "),i("div",{staticClass:"form-group"},[i("select",{directives:[{name:"model",rawName:"v-model",value:t.pollExpiry,expression:"pollExpiry"}],staticClass:"form-control rounded-pill",staticStyle:{width:"200px"},on:{change:function(e){var i=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.pollExpiry=e.target.multiple?i:i[0]}}},[i("option",{attrs:{value:"60"}},[t._v("1 hour")]),t._v(" "),i("option",{attrs:{value:"360"}},[t._v("6 hours")]),t._v(" "),i("option",{attrs:{value:"1440",selected:""}},[t._v("24 hours")]),t._v(" "),i("option",{attrs:{value:"10080"}},[t._v("7 days")])])])]),t._v(" "),i("div",[i("p",{staticClass:"font-weight-bold text-muted small"},[t._v("\n\t\t\t\t\t\t\t\t\tPoll Visibility\n\t\t\t\t\t\t\t\t")]),t._v(" "),i("div",{staticClass:"form-group"},[i("select",{directives:[{name:"model",rawName:"v-model",value:t.visibility,expression:"visibility"}],staticClass:"form-control rounded-pill",staticStyle:{"max-width":"200px"},on:{change:function(e){var i=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.visibility=e.target.multiple?i:i[0]}}},[i("option",{attrs:{value:"public"}},[t._v("Public")]),t._v(" "),i("option",{attrs:{value:"private"}},[t._v("Followers Only")])])])])])],2)])])]):i("div",[i("div",{staticClass:"card status-card card-md-rounded-0 w-100 h-100",staticStyle:{display:"flex"}},[i("div",{staticClass:"card-header d-inline-flex align-items-center justify-content-between bg-white"},[i("div",[1==t.page?i("a",{staticClass:"font-weight-bold text-decoration-none text-muted",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.closeModal()}}},[i("i",{staticClass:"fas fa-times fa-lg"}),t._v(" "),i("span",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.pageTitle))])]):2==t.page?i("span",[t.config.uploader.album_limit>t.media.length?i("button",{staticClass:"btn btn-outline-primary btn-sm font-weight-bold",attrs:{id:"cm-add-media-btn"},on:{click:function(e){return e.preventDefault(),t.addMedia.apply(null,arguments)}}},[i("i",{staticClass:"fas fa-plus"})]):i("button",{staticClass:"btn btn-outline-secondary btn-sm font-weight-bold",attrs:{disabled:""}},[i("i",{staticClass:"fas fa-plus"})]),t._v(" "),i("b-tooltip",{attrs:{target:"cm-add-media-btn",triggers:"hover"}},[t._v("\n\t\t\t\t\t\t\t\tUpload another photo or video\n\t\t\t\t\t\t\t")])],1):3==t.page?i("span",[i("a",{staticClass:"text-lighter text-decoration-none mr-3 d-flex align-items-center",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.goBack()}}},[i("i",{staticClass:"fas fa-long-arrow-alt-left fa-lg mr-2"}),t._v(" "),i("span",{staticClass:"btn btn-outline-secondary btn-sm px-2 py-0 disabled",attrs:{disabled:""}},[t._v(t._s(t.media.length))])]),t._v(" "),i("span",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.pageTitle))])]):i("span",[i("a",{staticClass:"text-lighter text-decoration-none mr-3",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.goBack()}}},[i("i",{staticClass:"fas fa-long-arrow-alt-left fa-lg"})])]),t._v(" "),i("span",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.pageTitle))])]),t._v(" "),2==t.page?i("div",[1==t.media.length?i("a",{staticClass:"text-center text-dark",attrs:{href:"#",title:"Crop & Resize",id:"cm-crop-btn"},on:{click:function(e){return e.preventDefault(),t.showCropPhotoCard.apply(null,arguments)}}},[i("i",{staticClass:"fas fa-crop-alt fa-lg"})]):t._e(),t._v(" "),i("b-tooltip",{attrs:{target:"cm-crop-btn",triggers:"hover"}},[t._v("\n\t\t\t\t\t\t\tCrop & Resize\n\t\t\t\t\t\t")])],1):t._e(),t._v(" "),i("div",[t.pageLoading?i("span",[t._m(3)]):i("span",[!t.pageLoading&&t.page>1&&t.page<=2||1==t.page&&0!=t.ids.length||"cropPhoto"==t.page?i("a",{staticClass:"font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.nextPage.apply(null,arguments)}}},[t._v("Next")]):t._e(),t._v(" "),t.pageLoading||3!=t.page?t._e():i("a",{staticClass:"font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.compose()}}},[t._v("Post")]),t._v(" "),t.pageLoading||"addText"!=t.page?t._e():i("a",{staticClass:"font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.composeTextPost()}}},[t._v("Post")]),t._v(" "),t.pageLoading||"video-2"!=t.page?t._e():i("a",{staticClass:"font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.compose()}}},[t._v("Post")])])])]),t._v(" "),i("div",{staticClass:"card-body p-0 border-top"},["licensePicker"==t.page?i("div",{staticClass:"w-100 h-100",staticStyle:{"min-height":"280px"}},[i("div",{staticClass:"list-group list-group-flush"},t._l(t.availableLicenses,(function(e,n){return i("div",{staticClass:"list-group-item cursor-pointer",class:{"text-primary":t.licenseId===e.id,"font-weight-bold":t.licenseId===e.id},on:{click:function(i){return t.toggleLicense(e)}}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(e.name)+"\n\t\t\t\t\t\t\t")])})),0)]):t._e(),t._v(" "),"textOptions"==t.page?i("div",{staticClass:"w-100 h-100",staticStyle:{"min-height":"280px"}}):t._e(),t._v(" "),"addText"==t.page?i("div",{staticClass:"w-100 h-100",staticStyle:{"min-height":"280px"}},[i("div",{staticClass:"mt-2"},[i("div",{staticClass:"media px-3"},[i("div",{staticClass:"media-body"},[i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small d-none"},[t._v("Body")]),t._v(" "),i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.composeText,expression:"composeText"}],staticClass:"form-control border-0 rounded-0 no-focus",staticStyle:{"font-size":"18px",resize:"none"},attrs:{rows:"7",placeholder:"What's happening?"},domProps:{value:t.composeText},on:{keyup:function(e){t.composeTextLength=t.composeText.length},input:function(e){e.target.composing||(t.composeText=e.target.value)}}}),t._v(" "),i("div",{staticClass:"border-bottom"}),t._v(" "),i("p",{staticClass:"help-text small text-right text-muted mb-0 font-weight-bold"},[t._v(t._s(t.composeTextLength)+"/"+t._s(t.config.uploader.max_caption_length))]),t._v(" "),i("p",{staticClass:"mb-0 mt-2"},[i("a",{staticClass:"btn btn-primary rounded-pill mr-2",staticStyle:{height:"37px"},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showTextOptions()}}},[i("i",{staticClass:"fas fa-palette px-3 text-white"})]),t._v(" "),i("a",{staticClass:"btn rounded-pill mx-3 d-inline-flex align-items-center",class:[t.nsfw?"btn-danger":"btn-outline-lighter"],staticStyle:{height:"37px"},attrs:{href:"#",title:"Mark as sensitive/not safe for work"},on:{click:function(e){e.preventDefault(),t.nsfw=!t.nsfw}}},[i("i",{staticClass:"far fa-flag px-3"}),t._v(" "),i("span",{staticClass:"text-muted small font-weight-bold"})]),t._v(" "),i("a",{staticClass:"btn btn-outline-lighter rounded-pill d-inline-flex align-items-center",staticStyle:{height:"37px"},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[i("i",{staticClass:"fas fa-eye mr-2"}),t._v(" "),i("span",{staticClass:"text-muted small font-weight-bold"},[t._v(t._s(t.visibilityTag))])])])])])])])]):t._e(),t._v(" "),1==t.page?i("div",{staticClass:"w-100 h-100 d-flex justify-content-center align-items-center",staticStyle:{"min-height":"400px"}},[i("div",{staticClass:"text-center"},[0==t.media.length?i("div",{staticClass:"card my-md-3 shadow-none border compose-action text-decoration-none text-dark"},[i("div",{staticClass:"card-body py-2",on:{click:function(e){return e.preventDefault(),t.addMedia.apply(null,arguments)}}},[i("div",{staticClass:"media"},[t._m(4),t._v(" "),i("div",{staticClass:"media-body text-left"},[t._m(5),t._v(" "),i("p",{staticClass:"mb-0 text-muted"},[t._v("Share up to "+t._s(t.config.uploader.album_limit)+" photos or videos")]),t._v(" "),i("p",{staticClass:"mb-0 text-muted small"},[i("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.config.uploader.media_types.split(",").map((function(t){return t.split("/")[1]})).join(", ")))]),t._v(" allowed up to "),i("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.filesize(t.config.uploader.max_photo_size)))])])])])])]):t._e(),t._v(" "),t._e(),t._v(" "),1==t.config.features.stories?i("a",{staticClass:"card my-md-3 shadow-none border compose-action text-decoration-none text-dark",attrs:{href:"/i/stories/new"}},[t._m(7)]):t._e(),t._v(" "),t._e(),t._v(" "),t._m(9),t._v(" "),t._m(10)])]):t._e(),t._v(" "),"cropPhoto"==t.page?i("div",{staticClass:"w-100 h-100"},[t.ids.length>0?i("div",[i("vue-cropper",{ref:"cropper",attrs:{relativeZoom:t.cropper.zoom,aspectRatio:t.cropper.aspectRatio,viewMode:t.cropper.viewMode,zoomable:t.cropper.zoomable,rotatable:!0,src:t.media[t.carouselCursor].url}})],1):t._e()]):t._e(),t._v(" "),2==t.page?i("div",{staticClass:"w-100 h-100"},[1==t.media.length?i("div",[i("div",{staticStyle:{display:"flex","min-height":"420px","align-items":"center"},attrs:{slot:"img"},slot:"img"},[i("img",{class:"d-block img-fluid w-100 "+[t.media[t.carouselCursor].filter_class?t.media[t.carouselCursor].filter_class:""],attrs:{src:t.media[t.carouselCursor].url,alt:t.media[t.carouselCursor].description,title:t.media[t.carouselCursor].description}})]),t._v(" "),i("hr"),t._v(" "),t.ids.length>0&&"Image"==t.media[t.carouselCursor].type?i("div",{staticClass:"align-items-center px-2 pt-2"},[i("ul",{staticClass:"nav media-drawer-filters text-center"},[i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{staticClass:"cursor-pointer",attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}})]),t._v(" "),i("a",{class:[null==t.media[t.carouselCursor].filter_class?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}},[t._v("No Filter")])]),t._v(" "),t._l(t.filters,(function(e,n){return i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{class:e[1],attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}})]),t._v(" "),i("a",{class:[t.media[t.carouselCursor].filter_class==e[1]?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}},[t._v(t._s(e[0]))])])}))],2)]):t._e()]):t.media.length>1?i("div",{staticClass:"d-flex-inline px-2 pt-2"},[i("ul",{staticClass:"nav media-drawer-filters text-center"},[i("li",{staticClass:"nav-item mx-md-4"},[t._v(" ")]),t._v(" "),t._l(t.media,(function(e,n){return i("li",{staticClass:"nav-item mx-md-4"},[i("div",{staticClass:"nav-link",staticStyle:{display:"block",width:"300px",height:"300px"},on:{click:function(e){t.carouselCursor=n}}},[i("span",{class:[e.filter_class?e.filter_class:""]},[i("span",{class:"rounded border "+[n==t.carouselCursor?" border-primary shadow":""],style:"display:block;padding:5px;width:100%;height:100%;background-image: url("+e.url+");background-size:cover;border-width:3px !important;"})])]),t._v(" "),n==t.carouselCursor?i("div",{staticClass:"text-center mb-0 small text-lighter font-weight-bold pt-2"},[i("span",{staticClass:"cursor-pointer",on:{click:function(e){return e.preventDefault(),t.showCropPhotoCard.apply(null,arguments)}}},[t._v("Crop")]),t._v(" "),i("span",{staticClass:"cursor-pointer px-3",on:{click:function(e){return e.preventDefault(),t.showEditMediaCard()}}},[t._v("Edit")]),t._v(" "),i("span",{staticClass:"cursor-pointer",on:{click:function(e){return t.deleteMedia()}}},[t._v("Delete")])]):t._e()])})),t._v(" "),i("li",{staticClass:"nav-item mx-md-4"},[t._v(" ")])],2),t._v(" "),i("hr"),t._v(" "),t.ids.length>0&&"Image"==t.media[t.carouselCursor].type?i("div",{staticClass:"align-items-center px-2 pt-2"},[i("ul",{staticClass:"nav media-drawer-filters text-center"},[i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{staticClass:"cursor-pointer",attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}})]),t._v(" "),i("a",{class:[null==t.media[t.carouselCursor].filter_class?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}},[t._v("No Filter")])]),t._v(" "),t._l(t.filters,(function(e,n){return i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{class:e[1],attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}})]),t._v(" "),i("a",{class:[t.media[t.carouselCursor].filter_class==e[1]?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}},[t._v(t._s(e[0]))])])}))],2)]):t._e()]):i("div",[i("p",{staticClass:"mb-0 p-5 text-center font-weight-bold"},[t._v("An error occured, please refresh the page.")])])]):t._e(),t._v(" "),3==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"border-bottom mt-2"},[i("div",{staticClass:"media px-3"},[i("img",{class:[t.media[0].filter_class?"mr-2 "+t.media[0].filter_class:"mr-2"],attrs:{src:t.media[0].url,width:"42px",height:"42px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small d-none"},[t._v("Caption")]),t._v(" "),i("vue-tribute",{attrs:{options:t.tributeSettings}},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.composeText,expression:"composeText"}],staticClass:"form-control border-0 rounded-0 no-focus",attrs:{rows:"3",placeholder:"Write a caption..."},domProps:{value:t.composeText},on:{keyup:function(e){t.composeTextLength=t.composeText.length},input:function(e){e.target.composing||(t.composeText=e.target.value)}}})]),t._v(" "),i("p",{staticClass:"help-text small text-right text-muted mb-0"},[t._v(t._s(t.composeTextLength)+"/"+t._s(t.config.uploader.max_caption_length))])],1)])])]),t._v(" "),i("div",{staticClass:"border-bottom d-flex justify-content-between px-4 mb-0 py-2 "},[t._m(11),t._v(" "),i("div",[i("div",{staticClass:"custom-control custom-switch",staticStyle:{"z-index":"9999"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.nsfw,expression:"nsfw"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"asnsfw"},domProps:{checked:Array.isArray(t.nsfw)?t._i(t.nsfw,null)>-1:t.nsfw},on:{change:function(e){var i=t.nsfw,n=e.target,o=!!n.checked;if(Array.isArray(i)){var a=t._i(i,null);n.checked?a<0&&(t.nsfw=i.concat([null])):a>-1&&(t.nsfw=i.slice(0,a).concat(i.slice(a+1)))}else t.nsfw=o}}}),t._v(" "),i("label",{staticClass:"custom-control-label",attrs:{for:"asnsfw"}})])])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2 cursor-pointer",on:{click:function(e){return t.showTagCard()}}},[t._v("Tag people")])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2 cursor-pointer",on:{click:function(e){return t.showCollectionCard()}}},[t._m(12),t._v(" "),i("span",{staticClass:"float-right"},[t.collectionsSelected.length?i("span",{staticClass:"btn btn-outline-secondary btn-sm small mr-3 mt-n1 disabled",staticStyle:{"font-size":"10px",padding:"3px 5px","text-transform":"uppercase"},attrs:{href:"#",disabled:""}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(t.collectionsSelected.length)+"\n\t\t\t\t\t\t\t\t\t")]):t._e(),t._v(" "),t._m(13)])])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2 cursor-pointer",on:{click:function(e){return t.showLicenseCard()}}},[i("span",[t._v("Add license")]),t._v(" "),i("span",{staticClass:"float-right"},[t.licenseTitle?i("a",{staticClass:"btn btn-outline-secondary btn-sm small mr-3 mt-n1 disabled",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#",disabled:""},on:{click:function(e){return e.preventDefault(),t.showLicenseCard()}}},[t._v(t._s(t.licenseTitle))]):t._e(),t._v(" "),i("a",{staticClass:"text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showLicenseCard()}}},[i("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])])])]),t._v(" "),i("div",{staticClass:"border-bottom"},[t.place?i("p",{staticClass:"px-4 mb-0 py-2"},[i("span",{staticClass:"text-lighter"},[t._v("Location:")]),t._v(" "+t._s(t.place.name)+", "+t._s(t.place.country)+"\n\t\t\t\t\t\t\t\t"),i("span",{staticClass:"float-right"},[i("a",{staticClass:"btn btn-outline-secondary btn-sm small mr-2",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showLocationCard()}}},[t._v("Edit")]),t._v(" "),i("a",{staticClass:"btn btn-outline-secondary btn-sm small",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.place=!1}}},[t._v("Remove")])])]):i("p",{staticClass:"px-4 mb-0 py-2 cursor-pointer",on:{click:function(e){return t.showLocationCard()}}},[t._v("Add location")])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2"},[i("span",[t._v("Audience")]),t._v(" "),i("span",{staticClass:"float-right"},[i("a",{staticClass:"btn btn-outline-secondary btn-sm small mr-3 mt-n1 disabled",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#",disabled:""},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[t._v(t._s(t.visibilityTag))]),t._v(" "),i("a",{staticClass:"text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[i("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])])])]),t._v(" "),i("div",{staticStyle:{"min-height":"200px"}},[i("p",{staticClass:"px-4 mb-0 py-2 small font-weight-bold text-muted cursor-pointer",on:{click:function(e){return t.showAdvancedSettingsCard()}}},[t._v("Advanced settings")])])]):t._e(),t._v(" "),"tagPeople"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("autocomplete",{directives:[{name:"show",rawName:"v-show",value:t.taggedUsernames.length<10,expression:"taggedUsernames.length < 10"}],ref:"autocomplete",attrs:{search:t.tagSearch,placeholder:"@pixelfed","aria-label":"Search usernames","get-result-value":t.getTagResultValue},on:{submit:t.onTagSubmitLocation}}),t._v(" "),i("p",{directives:[{name:"show",rawName:"v-show",value:t.taggedUsernames.length<10,expression:"taggedUsernames.length < 10"}],staticClass:"font-weight-bold text-muted small"},[t._v("You can tag "+t._s(10-t.taggedUsernames.length)+" more "+t._s(9==t.taggedUsernames.length?"person":"people")+"!")]),t._v(" "),i("p",{staticClass:"font-weight-bold text-center mt-3"},[t._v("Tagged People")]),t._v(" "),i("div",{staticClass:"list-group"},[t._l(t.taggedUsernames,(function(e,n){return i("div",{staticClass:"list-group-item d-flex justify-content-between"},[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-2 rounded-circle border",attrs:{src:e.avatar,width:"24px",height:"24px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("span",{staticClass:"font-weight-bold"},[t._v(t._s(e.name))])])]),t._v(" "),i("div",{staticClass:"custom-control custom-switch"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.privacy,expression:"tag.privacy"}],staticClass:"custom-control-input disabled",attrs:{type:"checkbox",id:"cci-tagged-privacy-switch"+n,disabled:""},domProps:{checked:Array.isArray(e.privacy)?t._i(e.privacy,null)>-1:e.privacy},on:{change:function(i){var n=e.privacy,o=i.target,a=!!o.checked;if(Array.isArray(n)){var s=t._i(n,null);o.checked?s<0&&t.$set(e,"privacy",n.concat([null])):s>-1&&t.$set(e,"privacy",n.slice(0,s).concat(n.slice(s+1)))}else t.$set(e,"privacy",a)}}}),t._v(" "),i("label",{staticClass:"custom-control-label font-weight-bold text-lighter",attrs:{for:"cci-tagged-privacy-switch"+n}},[t._v(t._s(e.privacy?"Public":"Private"))]),t._v(" "),i("a",{staticClass:"ml-3",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.untagUsername(n)}}},[i("i",{staticClass:"fas fa-times text-muted"})])])])})),t._v(" "),0==t.taggedUsernames.length?i("div",{staticClass:"list-group-item p-3"},[i("p",{staticClass:"text-center mb-0 font-weight-bold text-lighter"},[t._v("Search usernames to tag.")])]):t._e()],2),t._v(" "),i("p",{staticClass:"font-weight-bold text-center small text-muted pt-3 mb-0"},[t._v("When you tag someone, they are sent a notification."),i("br"),t._v("For more information on tagging, "),i("a",{staticClass:"text-primary",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showTagHelpCard()}}},[t._v("click here")]),t._v(".")])],1):t._e(),t._v(" "),"tagPeopleHelp"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"mb-0 text-center py-3 px-2 lead"},[t._v("Tagging someone is like mentioning them, with the option to make it private between you.")]),t._v(" "),i("p",{staticClass:"mb-3 py-3 px-2 font-weight-lighter"},[t._v("\n\t\t\t\t\t\t\tYou can choose to tag someone in public or private mode. Public mode will allow others to see who you tagged in the post and private mode tagged users will not be shown to others.\n\t\t\t\t\t\t")])]):t._e(),t._v(" "),"addLocation"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"mb-0"},[t._v("Add Location")]),t._v(" "),i("autocomplete",{attrs:{search:t.locationSearch,placeholder:"Search locations ...","aria-label":"Search locations ...","get-result-value":t.getResultValue},on:{submit:t.onSubmitLocation}})],1):t._e(),t._v(" "),"advancedSettings"==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"list-group list-group-flush"},[i("div",{staticClass:"list-group-item d-flex justify-content-between"},[t._m(14),t._v(" "),i("div",[i("div",{staticClass:"custom-control custom-switch",staticStyle:{"z-index":"9999"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.commentsDisabled,expression:"commentsDisabled"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"asdisablecomments"},domProps:{checked:Array.isArray(t.commentsDisabled)?t._i(t.commentsDisabled,null)>-1:t.commentsDisabled},on:{change:function(e){var i=t.commentsDisabled,n=e.target,o=!!n.checked;if(Array.isArray(i)){var a=t._i(i,null);n.checked?a<0&&(t.commentsDisabled=i.concat([null])):a>-1&&(t.commentsDisabled=i.slice(0,a).concat(i.slice(a+1)))}else t.commentsDisabled=o}}}),t._v(" "),i("label",{staticClass:"custom-control-label",attrs:{for:"asdisablecomments"}})])])]),t._v(" "),i("a",{staticClass:"list-group-item",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showMediaDescriptionsCard()}}},[t._m(15)])])]):t._e(),t._v(" "),"visibility"==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"list-group list-group-flush"},[t.profile.locked?t._e():i("div",{staticClass:"list-group-item lead cursor-pointer",class:{"text-primary":"public"==t.visibility},on:{click:function(e){return t.toggleVisibility("public")}}},[t._v("\n\t\t\t\t\t\t\t\tPublic\n\t\t\t\t\t\t\t")]),t._v(" "),t.profile.locked?t._e():i("div",{staticClass:"list-group-item lead cursor-pointer",class:{"text-primary":"unlisted"==t.visibility},on:{click:function(e){return t.toggleVisibility("unlisted")}}},[t._v("\n\t\t\t\t\t\t\t\tUnlisted\n\t\t\t\t\t\t\t")]),t._v(" "),i("div",{staticClass:"list-group-item lead cursor-pointer",class:{"text-primary":"private"==t.visibility},on:{click:function(e){return t.toggleVisibility("private")}}},[t._v("\n\t\t\t\t\t\t\t\tFollowers Only\n\t\t\t\t\t\t\t")])])]):t._e(),t._v(" "),"altText"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[t._l(t.media,(function(e,n){return i("div",[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-3",attrs:{src:e.preview_url,width:"50px",height:"50px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:e.alt,expression:"m.alt"}],staticClass:"form-control",attrs:{placeholder:"Add a media description here...",maxlength:t.maxAltTextLength,rows:"4"},domProps:{value:e.alt},on:{input:function(i){i.target.composing||t.$set(e,"alt",i.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text small text-right text-muted mb-0"},[t._v(t._s(e.alt?e.alt.length:0)+"/"+t._s(t.maxAltTextLength))])])]),t._v(" "),i("hr")])})),t._v(" "),i("p",{staticClass:"d-flex justify-content-between mb-0"},[i("button",{staticClass:"btn btn-link text-muted font-weight-bold text-decoration-none",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Cancel")]),t._v(" "),i("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Save")])])],2):t._e(),t._v(" "),"addToCollection"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[t.collectionsLoaded&&t.collections.length?i("div",{staticClass:"list-group mb-3 collections-list-group"},[t._l(t.collections,(function(e,n){return i("div",{staticClass:"list-group-item cursor-pointer compose-action border",class:{active:t.collectionsSelected.includes(n)},on:{click:function(e){return t.toggleCollectionItem(n)}}},[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-3",attrs:{src:e.thumb,alt:"",width:"50px",height:"50px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("h5",{staticClass:"mt-0"},[t._v(t._s(e.title))]),t._v(" "),i("p",{staticClass:"mb-0 text-muted small"},[t._v(t._s(e.post_count)+" Posts - Created "+t._s(t.timeAgo(e.published_at))+" ago")])])])])})),t._v(" "),t.collectionsCanLoadMore?i("button",{staticClass:"btn btn-light btn-block font-weight-bold mt-3",on:{click:t.loadMoreCollections}},[t._v("\n\t\t\t\t\t\t\t\tLoad more\n\t\t\t\t\t\t\t")]):t._e()],2):t._e(),t._v(" "),i("p",{staticClass:"d-flex justify-content-between mb-0"},[i("button",{staticClass:"btn btn-link text-muted font-weight-bold text-decoration-none",attrs:{type:"button"},on:{click:function(e){return t.clearSelectedCollections()}}},[t._v("Clear")]),t._v(" "),i("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Save")])])]):t._e(),t._v(" "),"schedulePost"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):t._e(),t._v(" "),"mediaMetadata"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):t._e(),t._v(" "),"addToStory"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):t._e(),t._v(" "),"editMedia"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-3",attrs:{src:t.media[t.carouselCursor].preview_url,width:"50px",height:"50px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small"},[t._v("Media Description")]),t._v(" "),i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.media[t.carouselCursor].alt,expression:"media[carouselCursor].alt"}],staticClass:"form-control",attrs:{placeholder:"Add a media description here...",maxlength:"140"},domProps:{value:t.media[t.carouselCursor].alt},on:{input:function(e){e.target.composing||t.$set(t.media[t.carouselCursor],"alt",e.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text small text-muted mb-0 d-flex justify-content-between"},[i("span",[t._v("Describe your photo for people with visual impairments.")]),t._v(" "),i("span",[t._v(t._s(t.media[t.carouselCursor].alt?t.media[t.carouselCursor].alt.length:0)+"/140")])])]),t._v(" "),i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small"},[t._v("License")]),t._v(" "),i("select",{directives:[{name:"model",rawName:"v-model",value:t.licenseId,expression:"licenseId"}],staticClass:"form-control",on:{change:function(e){var i=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.licenseId=e.target.multiple?i:i[0]}}},t._l(t.availableLicenses,(function(e,n){return i("option",{domProps:{value:e.id,selected:e.id==t.licenseId}},[t._v("\n\t\t\t\t\t\t\t\t\t\t\t"+t._s(e.name)+"\n\t\t\t\t\t\t\t\t\t\t")])})),0)])])]),t._v(" "),i("hr"),t._v(" "),i("p",{staticClass:"d-flex justify-content-between mb-0"},[i("button",{staticClass:"btn btn-link text-muted font-weight-bold text-decoration-none",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Cancel")]),t._v(" "),i("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Save")])])]):t._e(),t._v(" "),"video-2"==t.page?i("div",{staticClass:"w-100 h-100"},[t.video.title.length?i("div",{staticClass:"border-bottom"},[i("div",{staticClass:"media p-3"},[i("img",{class:[t.media[0].filter_class?"mr-2 "+t.media[0].filter_class:"mr-2"],attrs:{src:t.media[0].url,width:"100px",height:"70px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("p",{staticClass:"font-weight-bold mb-1"},[t._v(t._s(t.video.title?t.video.title.slice(0,70):"Untitled"))]),t._v(" "),i("p",{staticClass:"mb-0 text-muted small"},[t._v(t._s(t.video.description?t.video.description.slice(0,90):"No description"))])])])]):t._e(),t._v(" "),i("div",{staticClass:"border-bottom d-flex justify-content-between px-4 mb-0 py-2 "},[t._m(16),t._v(" "),i("div",[i("div",{staticClass:"custom-control custom-switch",staticStyle:{"z-index":"9999"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.nsfw,expression:"nsfw"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"asnsfw"},domProps:{checked:Array.isArray(t.nsfw)?t._i(t.nsfw,null)>-1:t.nsfw},on:{change:function(e){var i=t.nsfw,n=e.target,o=!!n.checked;if(Array.isArray(i)){var a=t._i(i,null);n.checked?a<0&&(t.nsfw=i.concat([null])):a>-1&&(t.nsfw=i.slice(0,a).concat(i.slice(a+1)))}else t.nsfw=o}}}),t._v(" "),i("label",{staticClass:"custom-control-label",attrs:{for:"asnsfw"}})])])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2 cursor-pointer",on:{click:function(e){return t.showLicenseCard()}}},[t._v("Add license")])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2"},[i("span",[t._v("Audience")]),t._v(" "),i("span",{staticClass:"float-right"},[i("a",{staticClass:"btn btn-outline-secondary btn-sm small mr-3 mt-n1 disabled",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#",disabled:""},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[t._v(t._s(t.visibilityTag))]),t._v(" "),i("a",{staticClass:"text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[i("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])])])]),t._v(" "),i("div",{staticClass:"p-3"},[i("div",{staticClass:"form-group"},[i("p",{staticClass:"small font-weight-bold text-muted mb-0"},[t._v("Title")]),t._v(" "),i("input",{directives:[{name:"model",rawName:"v-model",value:t.video.title,expression:"video.title"}],staticClass:"form-control",attrs:{placeholder:"Add a good title"},domProps:{value:t.video.title},on:{input:function(e){e.target.composing||t.$set(t.video,"title",e.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text mb-0 small text-muted"},[t._v(t._s(t.video.title.length)+"/70")])]),t._v(" "),i("div",{staticClass:"form-group mb-0"},[i("p",{staticClass:"small font-weight-bold text-muted mb-0"},[t._v("Description")]),t._v(" "),i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.video.description,expression:"video.description"}],staticClass:"form-control",attrs:{placeholder:"Add an optional description",maxlength:"5000",rows:"5"},domProps:{value:t.video.description},on:{input:function(e){e.target.composing||t.$set(t.video,"description",e.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text mb-0 small text-muted"},[t._v(t._s(t.video.description.length)+"/5000")])])])]):t._e()]),t._v(" "),"cropPhoto"==t.page?i("div",{staticClass:"card-footer bg-white d-flex justify-content-between"},[i("div",[i("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button"},on:{click:t.rotate}},[i("i",{staticClass:"fas fa-redo"})])]),t._v(" "),i("div",[i("div",{staticClass:"d-inline-block button-group"},[i("button",{class:"btn font-weight-bold "+[t.cropper.aspectRatio==16/9?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(16/9)}}},[t._v("16:9")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[t.cropper.aspectRatio==4/3?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(4/3)}}},[t._v("4:3")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[1.5==t.cropper.aspectRatio?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(1.5)}}},[t._v("3:2")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[1==t.cropper.aspectRatio?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(1)}}},[t._v("1:1")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[t.cropper.aspectRatio==2/3?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(2/3)}}},[t._v("2:3")])])])]):t._e()])])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-header d-inline-flex align-items-center justify-content-between bg-white"},[e("span",{staticClass:"pr-3"},[e("i",{staticClass:"fas fa-cog fa-lg text-muted"})]),this._v(" "),e("span",{staticClass:"font-weight-bold"},[this._v("\n\t\t\t\t\t\tCamera Roll\n\t\t\t\t\t")]),this._v(" "),e("span",{staticClass:"text-primary font-weight-bold"},[this._v("Upload")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"pr-3"},[e("i",{staticClass:"fas fa-info-circle fa-lg text-primary"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"spinner-border spinner-border-sm",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"spinner-border spinner-border-sm",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%","background-color":"#008DF5"}},[e("i",{staticClass:"fal fa-bolt text-white fa-lg"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Post")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"media"},[e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%",border:"2px solid #008DF5"}},[e("i",{staticClass:"far fa-edit text-primary fa-lg"})]),this._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Text Post")]),this._v(" "),e("sup",{staticClass:"float-right mt-2"},[e("span",{staticClass:"btn btn-outline-lighter p-1 btn-sm font-weight-bold py-0",staticStyle:{"font-size":"10px","line-height":"0.6"}},[this._v("BETA")])])]),this._v(" "),e("p",{staticClass:"mb-0 text-muted"},[this._v("Share a text only post")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-body py-2"},[e("div",{staticClass:"media"},[e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%",border:"1px solid #008DF5"}},[e("i",{staticClass:"fas fa-history text-primary fa-lg"})]),this._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Story")]),this._v(" "),e("sup",{staticClass:"float-right mt-2"},[e("span",{staticClass:"btn btn-outline-lighter p-1 btn-sm font-weight-bold py-0",staticStyle:{"font-size":"10px","line-height":"0.6"}},[this._v("BETA")])])]),this._v(" "),e("p",{staticClass:"mb-0 text-muted"},[this._v("Add to your story")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-body py-2"},[e("div",{staticClass:"media"},[e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%",border:"2px solid #008DF5"}},[e("i",{staticClass:"fas fa-poll-h text-primary fa-lg"})]),this._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Poll")]),this._v(" "),e("sup",{staticClass:"float-right mt-2"},[e("span",{staticClass:"btn btn-outline-lighter p-1 btn-sm font-weight-bold py-0",staticStyle:{"font-size":"10px","line-height":"0.6"}},[this._v("BETA")])])]),this._v(" "),e("p",{staticClass:"mb-0 text-muted"},[this._v("Create a poll")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("a",{staticClass:"card my-md-3 shadow-none border compose-action text-decoration-none text-dark",attrs:{href:"/i/collections/create"}},[e("div",{staticClass:"card-body py-2"},[e("div",{staticClass:"media"},[e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%",border:"1px solid #008DF5"}},[e("i",{staticClass:"fal fa-images text-primary fa-lg"})]),this._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Collection")]),this._v(" "),e("sup",{staticClass:"float-right mt-2"},[e("span",{staticClass:"btn btn-outline-lighter p-1 btn-sm font-weight-bold py-0",staticStyle:{"font-size":"10px","line-height":"0.6"}},[this._v("BETA")])])]),this._v(" "),e("p",{staticClass:"mb-0 text-muted"},[this._v("New collection of posts")])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"py-3"},[e("a",{staticClass:"font-weight-bold",attrs:{href:"/site/help"}},[this._v("Help")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{staticClass:"text-dark "},[this._v("Contains NSFW Media")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",[this._v("Add to Collection "),e("span",{staticClass:"ml-2 badge badge-primary"},[this._v("NEW")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"text-decoration-none"},[e("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{staticClass:"text-dark "},[this._v("Turn off commenting")]),this._v(" "),e("p",{staticClass:"text-muted small mb-0"},[this._v("Disables comments for this post, you can change this later.")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"d-flex justify-content-between align-items-center"},[e("div",[e("div",{staticClass:"text-dark"},[this._v("Media Descriptions")]),this._v(" "),e("p",{staticClass:"text-muted small mb-0"},[this._v("Describe your photos for people with visual impairments.")])]),this._v(" "),e("div",[e("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{staticClass:"text-dark "},[this._v("Contains NSFW Media")])])}],!1,null,null,null);e.default=u.exports}},[[7,0]]]); \ No newline at end of file diff --git a/public/js/spa.js b/public/js/spa.js index 302bba951..4e37d1435 100644 --- a/public/js/spa.js +++ b/public/js/spa.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{"+VHp":function(t,e,n){"use strict";n("V8Te")},"+mfz":function(t,e,n){"use strict";n("LKnw")},"+uhv":function(t,e,n){"use strict";n("M24V")},"/RaH":function(t,e,n){var i=n("iTP3");"string"==typeof i&&(i=[[t.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(i,o);i.locals&&(t.exports=i.locals)},"/jad":function(t,e,n){"use strict";var i=n("1gDp"),o=n("ngXG"),r={props:{status:{type:Object},recommended:{type:Boolean,default:!1},reactionBar:{type:Boolean,default:!0},hasTopBorder:{type:Boolean,default:!1},size:{type:String,validator:function(t){return["regular","small"].includes(t)},default:"regular"}},components:{"context-menu":i.a,"poll-card":o.a},data:function(){return{config:window.App.config,profile:{},loading:!0,replies:[],replyId:null,lightboxMedia:!1,showSuggestions:!0,showReadMore:!0,replyStatus:{},replyText:"",replyNsfw:!1,emoji:window.App.util.emoji,content:void 0}},mounted:function(){var t=this;this.profile=window._sharedData.curUser,this.content=this.status.content,this.status.emojis.forEach((function(e){var n=''.concat(e.shortcode,'');t.content=t.content.replace(":".concat(e.shortcode,":"),n)}))},methods:{formatCount:function(t){return App.util.format.count(t)},statusUrl:function(t){return 1==t.local?t.url:"/i/web/post/_/"+t.account.id+"/"+t.id},profileUrl:function(t){return 1==t.local?t.account.url:"/i/web/profile/_/"+t.account.id},timestampFormat:function(t){var e=new Date(t);return e.toDateString()+" "+e.toLocaleTimeString()},shortTimestamp:function(t){return window.App.util.format.timeAgo(t)},statusCardUsernameFormat:function(t){if(1==t.account.local)return t.account.username;var e=window.App.config.username.remote.format,n=window.App.config.username.remote.custom,i=t.account.username,o=document.createElement("a");switch(o.href=t.account.url,o=o.hostname,e){case"@":return i+'@'+o+"";case"from":return i+' from '+o+"";case"custom":return i+' '+n+" "+o+"";default:return i+'@'+o+""}},lightbox:function(t){window.location.href=t.media_attachments[0].url},labelRedirect:function(t){var e="/i/redirect?url="+encodeURI(this.config.features.label.covid.url);window.location.href=e},likeStatus:function(t,e){if(0!=$("body").hasClass("loggedIn")){var n=t.favourites_count;t.favourited=!t.favourited,axios.post("/i/like",{item:t.id}).then((function(e){t.favourites_count=e.data.count,t.favourited=!!t.favourited})).catch((function(e){t.favourited=!!t.favourited,t.favourites_count=n,swal("Error","Something went wrong, please try again later.","error")})),window.navigator.vibrate(200),t.favourited&&setTimeout((function(){e.target.classList.add("animate__animated","animate__bounce")}),100)}},commentFocus:function(t,e){this.$emit("comment-focus",t)},commentSubmit:function(t,e){var n=this;this.replySending=!0;var i=t.id,o=this.replyText,r=this.config.uploader.max_caption_length;if(o.length>r)return this.replySending=!1,void swal("Comment Too Long","Please make sure your comment is "+r+" characters or less.","error");axios.post("/i/comment",{item:i,comment:o,sensitive:this.replyNsfw}).then((function(t){n.replyText="",n.replies.push(t.data.entity),n.$refs.replyModal.hide()})),this.replySending=!1},owner:function(t){return this.profile.id===t.account.id},admin:function(){return 1==this.profile.is_admin},ownerOrAdmin:function(t){return this.owner(t)||this.admin()},ctxMenu:function(){this.$refs.contextMenu.open()},timeAgo:function(t){return App.util.format.timeAgo(t)},statusDeleted:function(t){this.$emit("status-delete",t)},canFollow:function(t){return!!t.hasOwnProperty("relationship")&&(!(!t.hasOwnProperty("account")||!t.account.hasOwnProperty("id"))&&(t.account.id!=this.profile.id&&!t.relationship.following))},follow:function(t){var e=this;event.currentTarget.blur(),axios.post("/i/follow",{item:t}).then((function(n){e.status.relationship.following=!0,e.$emit("followed",t)})).catch((function(t){t.response.data.message&&swal("Error",t.response.data.message,"error")}))},unfollow:function(t){var e=this;event.currentTarget.blur(),axios.post("/i/follow",{item:t}).then((function(n){e.status.relationship.following=!1,e.$emit("unfollowed",t)})).catch((function(t){t.response.data.message&&swal("Error",t.response.data.message,"error")}))}}},a=(n("RePV"),n("KHd+")),s=Object(a.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"status-card-component",class:{"status-card-sm":"small"===t.size}},["text"===t.status.pf_type?n("div",{staticClass:"card shadow-none border rounded-0",class:{"border-top-0":!t.hasTopBorder}},[n("div",{staticClass:"card-body"},[n("div",{staticClass:"media"},[n("img",{staticClass:"rounded-circle box-shadow mr-2",attrs:{src:t.status.account.avatar,width:"32px",height:"32px",onerror:"this.onerror=null;this.src='/storage/avatars/default.png?v=2'",alt:"avatar"}}),t._v(" "),n("div",{staticClass:"media-body"},[n("div",{staticClass:"pl-2 d-flex align-items-top"},[n("a",{staticClass:"username font-weight-bold text-dark text-decoration-none text-break",attrs:{href:t.profileUrl(t.status)},domProps:{innerHTML:t._s(t.statusCardUsernameFormat(t.status))}},[t._v("\n\t\t\t\t\t\t\tLoading...\n\t\t\t\t\t\t")]),t._v(" "),n("span",{staticClass:"px-1 text-lighter"},[t._v("\n\t\t\t\t\t\t\t·\n\t\t\t\t\t\t")]),t._v(" "),n("a",{staticClass:"font-weight-bold text-lighter",attrs:{href:t.statusUrl(t.status)}},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.shortTimestamp(t.status.created_at))+"\n\t\t\t\t\t\t")]),t._v(" "),n("span",{staticClass:"text-right",staticStyle:{"flex-grow":"1"}},[n("button",{staticClass:"btn btn-link text-dark py-0",attrs:{type:"button"},on:{click:function(e){return t.ctxMenu()}}},[n("span",{staticClass:"fas fa-ellipsis-h text-lighter"}),t._v(" "),n("span",{staticClass:"sr-only"},[t._v("Post Menu")])])])]),t._v(" "),n("div",{staticClass:"pl-2"},[t.status.sensitive?n("details",[n("summary",{staticClass:"mb-2 font-weight-bold text-muted"},[t._v("Content Warning")]),t._v(" "),n("p",{staticClass:"pt-2 text-break status-content",domProps:{innerHTML:t._s(t.status.content)}})]):n("p",{staticClass:"pt-2 text-break status-content",domProps:{innerHTML:t._s(t.status.content)}}),t._v(" "),n("p",{staticClass:"mb-0"},[n("i",{staticClass:"fa-heart fa-lg cursor-pointer mr-3",class:{"far text-muted":!t.status.favourited,"fas text-danger":t.status.favourited},on:{click:function(e){return t.likeStatus(t.status,e)}}}),t._v(" "),n("i",{staticClass:"far fa-comment cursor-pointer text-muted fa-lg mr-3",on:{click:function(e){return t.commentFocus(t.status,e)}}})])])])])])]):"poll"===t.status.pf_type?n("div",[n("poll-card",{attrs:{status:t.status,profile:t.profile},on:{"status-delete":t.statusDeleted}})],1):n("div",{staticClass:"card rounded-0 border-top-0 status-card card-md-rounded-0 shadow-none border"},[t.status?n("div",{staticClass:"card-header d-inline-flex align-items-center bg-white"},[n("div",[n("img",{staticClass:"rounded-circle box-shadow",attrs:{src:t.status.account.avatar,width:"32px",height:"32px",onerror:"this.onerror=null;this.src='/storage/avatars/default.png?v=2'",alt:"avatar"}})]),t._v(" "),n("div",{staticClass:"pl-2"},[n("a",{staticClass:"username font-weight-bold text-dark text-decoration-none text-break",attrs:{href:t.profileUrl(t.status)},domProps:{innerHTML:t._s(t.statusCardUsernameFormat(t.status))}},[t._v("\n\t\t\t\t\tLoading...\n\t\t\t\t")]),t._v(" "),t.status.account.is_admin?n("span",{staticClass:"fa-stack",staticStyle:{height:"1em","line-height":"1em","max-width":"19px"},attrs:{title:"Admin Account","data-toggle":"tooltip"}},[n("i",{staticClass:"fas fa-certificate text-danger fa-stack-1x"}),t._v(" "),n("i",{staticClass:"fas fa-crown text-white fa-sm fa-stack-1x",staticStyle:{"font-size":"7px"}})]):t._e(),t._v(" "),n("div",{staticClass:"d-flex align-items-center"},[t.status.place?n("a",{staticClass:"small text-decoration-none text-muted",attrs:{href:"/discover/places/"+t.status.place.id+"/"+t.status.place.slug,title:"Location","data-toggle":"tooltip"}},[n("i",{staticClass:"fas fa-map-marked-alt"}),t._v(" "+t._s(t.status.place.name)+", "+t._s(t.status.place.country))]):t._e()])]),t._v(" "),t.canFollow(t.status)?n("div",[n("span",{staticClass:"px-2"}),t._v(" "),n("button",{staticClass:"btn btn-primary btn-sm font-weight-bold py-1 px-3 rounded-lg",on:{click:function(e){return t.follow(t.status.account.id)}}},[n("i",{staticClass:"far fa-user-plus mr-1"}),t._v(" Follow")])]):t._e(),t._v(" "),t.status.hasOwnProperty("relationship")&&t.status.relationship.hasOwnProperty("following")&&t.status.relationship.following?n("div",[n("span",{staticClass:"px-2"}),t._v(" "),n("button",{staticClass:"btn btn-outline-primary btn-sm font-weight-bold py-1 px-3 rounded-lg",on:{click:function(e){return t.unfollow(t.status.account.id)}}},[n("i",{staticClass:"far fa-user-check mr-1"}),t._v(" Following")])]):t._e(),t._v(" "),n("div",{staticClass:"text-right",staticStyle:{"flex-grow":"1"}},[n("button",{staticClass:"btn btn-link text-dark py-0",attrs:{type:"button"},on:{click:function(e){return t.ctxMenu()}}},[n("span",{staticClass:"fas fa-ellipsis-h text-lighter"}),t._v(" "),n("span",{staticClass:"sr-only"},[t._v("Post Menu")])])])]):t._e(),t._v(" "),n("div",{staticClass:"postPresenterContainer",staticStyle:{background:"#000"}},["photo"===t.status.pf_type?n("div",{staticClass:"w-100"},[n("photo-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox,togglecw:function(e){t.status.sensitive=!1}}})],1):"video"===t.status.pf_type?n("div",{staticClass:"w-100"},[n("video-presenter",{attrs:{status:t.status},on:{togglecw:function(e){t.status.sensitive=!1}}})],1):"photo:album"===t.status.pf_type?n("div",{staticClass:"w-100"},[n("photo-album-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox,togglecw:function(e){t.status.sensitive=!1}}})],1):"video:album"===t.status.pf_type?n("div",{staticClass:"w-100"},[n("video-album-presenter",{attrs:{status:t.status},on:{togglecw:function(e){t.status.sensitive=!1}}})],1):"photo:video:album"===t.status.pf_type?n("div",{staticClass:"w-100"},[n("mixed-album-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox,togglecw:function(e){t.status.sensitive=!1}}})],1):n("div",{staticClass:"w-100"},[n("p",{staticClass:"text-center p-0 font-weight-bold text-white"},[t._v("Error: Problem rendering preview.")])])]),t._v(" "),t.config.features.label.covid.enabled&&t.status.label&&1==t.status.label.covid?n("div",{staticClass:"card-body border-top border-bottom py-2 cursor-pointer pr-2",on:{click:function(e){return t.labelRedirect()}}},[n("p",{staticClass:"font-weight-bold d-flex justify-content-between align-items-center mb-0"},[n("span",[n("i",{staticClass:"fas fa-info-circle mr-2"}),t._v("\n\t\t\t\t\tFor information about COVID-19, "+t._s(t.config.features.label.covid.org)+"\n\t\t\t\t")]),t._v(" "),t._m(0)])]):t._e(),t._v(" "),n("div",{staticClass:"card-body"},[t.reactionBar?n("div",{staticClass:"reactions my-1 pb-2"},[t.status.favourited?n("h3",{staticClass:"fas fa-heart text-danger pr-3 m-0 cursor-pointer",attrs:{title:"Like"},on:{click:function(e){return t.likeStatus(t.status,e)}}}):n("h3",{staticClass:"fal fa-heart pr-3 m-0 like-btn text-dark cursor-pointer",attrs:{title:"Like"},on:{click:function(e){return t.likeStatus(t.status,e)}}}),t._v(" "),t.status.comments_disabled?t._e():n("h3",{staticClass:"fal fa-comment text-dark pr-3 m-0 cursor-pointer",attrs:{title:"Comment"},on:{click:function(e){return t.commentFocus(t.status,e)}}}),t._v(" "),t.status.taggedPeople.length?n("span",{staticClass:"float-right"},[n("span",{staticClass:"font-weight-light small",staticStyle:{color:"#718096"}},[n("i",{staticClass:"far fa-user",attrs:{"data-toggle":"tooltip",title:"Tagged People"}}),t._v(" "),t._l(t.status.taggedPeople,(function(t,e){return n("span",{staticClass:"mr-n2"},[n("a",{attrs:{href:"/"+t.username}},[n("img",{staticClass:"border rounded-circle",attrs:{src:t.avatar,width:"20px",height:"20px","data-toggle":"tooltip",title:"@"+t.username,alt:"Avatar"}})])])}))],2)]):t._e()]):t._e(),t._v(" "),t.status.liked_by.username&&t.status.liked_by.username!==t.profile.username?n("div",{staticClass:"likes mb-1"},[n("span",{staticClass:"like-count"},[t._v("Liked by\n\t\t\t\t\t"),n("a",{staticClass:"font-weight-bold text-dark",attrs:{href:t.status.liked_by.url}},[t._v(t._s(t.status.liked_by.username))]),t._v(" "),1==t.status.liked_by.others?n("span",[t._v("\n\t\t\t\t\t\tand "),t.status.liked_by.total_count_pretty?n("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.status.liked_by.total_count_pretty))]):t._e(),t._v(" "),n("span",{staticClass:"font-weight-bold"},[t._v("others")])]):t._e()])]):t._e(),t._v(" "),"text"!=t.status.pf_type?n("div",{staticClass:"caption"},[t.status.sensitive?t._e():n("p",{staticClass:"mb-2 read-more",staticStyle:{overflow:"hidden"}},[n("span",{staticClass:"username font-weight-bold"},[n("bdi",[n("a",{staticClass:"text-dark",attrs:{href:t.profileUrl(t.status)}},[t._v(t._s(t.status.account.username))])])]),t._v(" "),n("span",{staticClass:"status-content",domProps:{innerHTML:t._s(t.content)}})])]):t._e(),t._v(" "),n("div",{staticClass:"timestamp mt-2"},[n("p",{staticClass:"small mb-0"},["archived"!=t.status.visibility?n("a",{staticClass:"text-muted text-uppercase",attrs:{href:t.statusUrl(t.status)}},[n("timeago",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.bottom",modifiers:{hover:!0,bottom:!0}}],attrs:{datetime:t.status.created_at,"auto-update":60,"converter-options":{includeSeconds:!0},title:t.timestampFormat(t.status.created_at)}})],1):n("span",{staticClass:"text-muted text-uppercase"},[t._v("\n\t\t\t\t\t\tPosted "),n("timeago",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.bottom",modifiers:{hover:!0,bottom:!0}}],attrs:{datetime:t.status.created_at,"auto-update":60,"converter-options":{includeSeconds:!0},title:t.timestampFormat(t.status.created_at)}})],1),t._v(" "),t.recommended?n("span",[n("span",{staticClass:"px-1"},[t._v("·")]),t._v(" "),n("span",{staticClass:"text-muted"},[t._v("Based on popular and trending content")])]):t._e()])])])]),t._v(" "),n("context-menu",{ref:"contextMenu",attrs:{status:t.status,profile:t.profile},on:{"status-delete":t.statusDeleted}})],1)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("span",[e("i",{staticClass:"fas fa-chevron-right text-lighter"})])}],!1,null,null,null);e.a=s.exports},"0SFe":function(t,e,n){"use strict";n("SZ2H")},"0dhX":function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,".account-bookmarks-component .form-check[data-v-25a4c79a] {\n margin-left: 1rem;\n}\n.account-bookmarks-component .form-check .media-body[data-v-25a4c79a] {\n margin-left: 1rem;\n}\n.account-bookmarks-component .media-image-placeholder[data-v-25a4c79a] {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 50px;\n height: 50px;\n background-color: #f8f9fa !important;\n border-radius: 5px;\n margin-right: 1rem;\n}",""])},"0ox+":function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,'.autocomplete-input{border:1px solid #eee;border-radius:8px;width:100%;padding:12px 12px 12px 48px;box-sizing:border-box;position:relative;font-size:16px;line-height:1.5;flex:1;background-color:#eee;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNjY2IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iOCIvPjxwYXRoIGQ9Ik0yMSAyMWwtNC00Ii8+PC9zdmc+");background-repeat:no-repeat;background-position:12px}.autocomplete-input:focus,.autocomplete-input[aria-expanded=true]{border-color:rgba(0,0,0,.12);background-color:#fff;outline:none;box-shadow:0 2px 2px rgba(0,0,0,.16)}[data-position=below] .autocomplete-input[aria-expanded=true]{border-bottom-color:transparent;border-radius:8px 8px 0 0}[data-position=above] .autocomplete-input[aria-expanded=true]{border-top-color:transparent;border-radius:0 0 8px 8px;z-index:2}.autocomplete[data-loading=true]:after{content:"";border:3px solid rgba(0,0,0,.12);border-right-color:rgba(0,0,0,.48);border-radius:100%;width:20px;height:20px;position:absolute;right:12px;top:50%;transform:translateY(-50%);-webkit-animation:rotate 1s linear infinite;animation:rotate 1s linear infinite}.autocomplete-result-list{margin:0;border:1px solid rgba(0,0,0,.12);padding:0;box-sizing:border-box;max-height:296px;overflow-y:auto;background:#fff;list-style:none;box-shadow:0 2px 2px rgba(0,0,0,.16)}[data-position=below] .autocomplete-result-list{margin-top:-1px;border-top-color:transparent;border-radius:0 0 8px 8px;padding-bottom:8px}[data-position=above] .autocomplete-result-list{margin-bottom:-1px;border-bottom-color:transparent;border-radius:8px 8px 0 0;padding-top:8px}.autocomplete-result{cursor:default;padding:12px 12px 12px 48px;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjY2NjIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iOCIvPjxwYXRoIGQ9Ik0yMSAyMWwtNC00Ii8+PC9zdmc+");background-repeat:no-repeat;background-position:12px}.autocomplete-result:hover,.autocomplete-result[aria-selected=true]{background-color:rgba(0,0,0,.06)}@-webkit-keyframes rotate{0%{transform:translateY(-50%) rotate(0deg)}to{transform:translateY(-50%) rotate(359deg)}}@keyframes rotate{0%{transform:translateY(-50%) rotate(0deg)}to{transform:translateY(-50%) rotate(359deg)}}',""])},"1PLf":function(t,e,n){t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"00ee":function(t,e,n){var i={};i[n("b622")("toStringTag")]="z",t.exports="[object z]"===String(i)},"0366":function(t,e,n){var i=n("1c0b");t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,o){return t.call(e,n,i,o)}}return function(){return t.apply(e,arguments)}}},"0538":function(t,e,n){"use strict";var i=n("1c0b"),o=n("861d"),r=[].slice,a={},s=function(t,e,n){if(!(e in a)){for(var i=[],o=0;o0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n}},"19aa":function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},"1be4":function(t,e,n){var i=n("d066");t.exports=i("document","documentElement")},"1c0b":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},"1c7e":function(t,e,n){var i=n("b622")("iterator"),o=!1;try{var r=0,a={next:function(){return{done:!!r++}},return:function(){o=!0}};a[i]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var r={};r[i]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}},"1cdc":function(t,e,n){var i=n("342f");t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(i)},"1d80":function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},2266:function(t,e,n){var i=n("825a"),o=n("e95a"),r=n("50c4"),a=n("0366"),s=n("35a1"),l=n("9bdd"),c=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,n,u,d){var p,h,f,m,v,g,b,y=a(e,n,u?2:1);if(d)p=t;else{if("function"!=typeof(h=s(t)))throw TypeError("Target is not iterable");if(o(h)){for(f=0,m=r(t.length);m>f;f++)if((v=u?y(i(b=t[f])[0],b[1]):y(t[f]))&&v instanceof c)return v;return new c(!1)}p=h.call(t)}for(g=p.next;!(b=g.call(p)).done;)if("object"==typeof(v=l(p,y,b.value,u))&&v&&v instanceof c)return v;return new c(!1)}).stop=function(t){return new c(!0,t)}},"23cb":function(t,e,n){var i=n("a691"),o=Math.max,r=Math.min;t.exports=function(t,e){var n=i(t);return n<0?o(n+e,0):r(n,e)}},"23e7":function(t,e,n){var i=n("da84"),o=n("06cf").f,r=n("9112"),a=n("6eeb"),s=n("ce4e"),l=n("e893"),c=n("94ca");t.exports=function(t,e){var n,u,d,p,h,f=t.target,m=t.global,v=t.stat;if(n=m?i:v?i[f]||s(f,{}):(i[f]||{}).prototype)for(u in e){if(p=e[u],d=t.noTargetGet?(h=o(n,u))&&h.value:n[u],!c(m?u:f+(v?".":"#")+u,t.forced)&&void 0!==d){if(typeof p==typeof d)continue;l(p,d)}(t.sham||d&&d.sham)&&r(p,"sham",!0),a(n,u,p,t)}}},"241c":function(t,e,n){var i=n("ca84"),o=n("7839").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,o)}},"25f0":function(t,e,n){"use strict";var i=n("6eeb"),o=n("825a"),r=n("d039"),a=n("ad6d"),s=RegExp.prototype,l=s.toString,c=r((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),u="toString"!=l.name;(c||u)&&i(RegExp.prototype,"toString",(function(){var t=o(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in s)?a.call(t):n)}),{unsafe:!0})},2626:function(t,e,n){"use strict";var i=n("d066"),o=n("9bf2"),r=n("b622"),a=n("83ab"),s=r("species");t.exports=function(t){var e=i(t),n=o.f;a&&e&&!e[s]&&n(e,s,{configurable:!0,get:function(){return this}})}},2994:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("49d8"),o=n("3054"),r=n("aacc");e.default=function(t,e,n,a,s){if(a<1||a>9||s<1||s>9)throw new r.ValidationError("BlurHash must have between 1 and 9 components");if(e*n*4!==t.length)throw new r.ValidationError("Width and height must match the pixels array");for(var l=[],c=function(i){for(var r=function(r){var a=0==r&&0==i?1:2,s=function(t,e,n,i){for(var r=0,a=0,s=0,l=4*e,c=0;c0){var g=Math.max.apply(Math,f.map((function(t){return Math.max.apply(Math,t)}))),b=Math.floor(Math.max(0,Math.min(82,Math.floor(166*g-.5))));d=(b+1)/166,m+=i.encode83(b,1)}else d=1,m+=i.encode83(0,1);return m+=i.encode83((p=h,(o.linearTosRGB(p[0])<<16)+(o.linearTosRGB(p[1])<<8)+o.linearTosRGB(p[2])),4),f.forEach((function(t){m+=i.encode83(function(t,e){return 19*Math.floor(Math.max(0,Math.min(18,Math.floor(9*o.signPow(t[0]/e,.5)+9.5))))*19+19*Math.floor(Math.max(0,Math.min(18,Math.floor(9*o.signPow(t[1]/e,.5)+9.5))))+Math.floor(Math.max(0,Math.min(18,Math.floor(9*o.signPow(t[2]/e,.5)+9.5))))}(t,d),2)})),m}},"2cf4":function(t,e,n){var i,o,r,a=n("da84"),s=n("d039"),l=n("c6b6"),c=n("0366"),u=n("1be4"),d=n("cc12"),p=n("1cdc"),h=a.location,f=a.setImmediate,m=a.clearImmediate,v=a.process,g=a.MessageChannel,b=a.Dispatch,y=0,w={},_=function(t){if(w.hasOwnProperty(t)){var e=w[t];delete w[t],e()}},x=function(t){return function(){_(t)}},C=function(t){_(t.data)},k=function(t){a.postMessage(t+"",h.protocol+"//"+h.host)};f&&m||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return w[++y]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},i(y),y},m=function(t){delete w[t]},"process"==l(v)?i=function(t){v.nextTick(x(t))}:b&&b.now?i=function(t){b.now(x(t))}:g&&!p?(r=(o=new g).port2,o.port1.onmessage=C,i=c(r.postMessage,r,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||s(k)||"file:"===h.protocol?i="onreadystatechange"in d("script")?function(t){u.appendChild(d("script")).onreadystatechange=function(){u.removeChild(this),_(t)}}:function(t){setTimeout(x(t),0)}:(i=k,a.addEventListener("message",C,!1))),t.exports={set:f,clear:m}},"2d00":function(t,e,n){var i,o,r=n("da84"),a=n("342f"),s=r.process,l=s&&s.versions,c=l&&l.v8;c?o=(i=c.split("."))[0]+i[1]:a&&(!(i=a.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/))&&(o=i[1]),t.exports=o&&+o},3054:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sRGBToLinear=function(t){var e=t/255;return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},e.linearTosRGB=function(t){var e=Math.max(0,Math.min(1,t));return e<=.0031308?Math.round(12.92*e*255+.5):Math.round(255*(1.055*Math.pow(e,1/2.4)-.055)+.5)},e.sign=function(t){return t<0?-1:1},e.signPow=function(t,n){return e.sign(t)*Math.pow(Math.abs(t),n)}},3410:function(t,e,n){var i=n("23e7"),o=n("d039"),r=n("7b0b"),a=n("e163"),s=n("e177");i({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!s},{getPrototypeOf:function(t){return a(r(t))}})},"342f":function(t,e,n){var i=n("d066");t.exports=i("navigator","userAgent")||""},"35a1":function(t,e,n){var i=n("f5df"),o=n("3f8c"),r=n("b622")("iterator");t.exports=function(t){if(null!=t)return t[r]||t["@@iterator"]||o[i(t)]}},"37e8":function(t,e,n){var i=n("83ab"),o=n("9bf2"),r=n("825a"),a=n("df75");t.exports=i?Object.defineProperties:function(t,e){r(t);for(var n,i=a(e),s=i.length,l=0;s>l;)o.f(t,n=i[l++],e[n]);return t}},"3bbe":function(t,e,n){var i=n("861d");t.exports=function(t){if(!i(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"3ca3":function(t,e,n){"use strict";var i=n("6547").charAt,o=n("69f3"),r=n("7dd0"),a=o.set,s=o.getterFor("String Iterator");r(String,"String",(function(t){a(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=s(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=i(n,o),e.index+=t.length,{value:t,done:!1})}))},"3f8c":function(t,e){t.exports={}},"408a":function(t,e,n){var i=n("c6b6");t.exports=function(t){if("number"!=typeof t&&"Number"!=i(t))throw TypeError("Incorrect invocation");return+t}},"428f":function(t,e,n){var i=n("da84");t.exports=i},"44ad":function(t,e,n){var i=n("d039"),o=n("c6b6"),r="".split;t.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?r.call(t,""):Object(t)}:Object},"44d2":function(t,e,n){var i=n("b622"),o=n("7c73"),r=n("9bf2"),a=i("unscopables"),s=Array.prototype;null==s[a]&&r.f(s,a,{configurable:!0,value:o(null)}),t.exports=function(t){s[a][t]=!0}},"44de":function(t,e,n){var i=n("da84");t.exports=function(t,e){var n=i.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},4840:function(t,e,n){var i=n("825a"),o=n("1c0b"),r=n("b622")("species");t.exports=function(t,e){var n,a=i(t).constructor;return void 0===a||null==(n=i(a)[r])?e:o(n)}},4930:function(t,e,n){var i=n("d039");t.exports=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())}))},"49d8":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"];e.decode83=function(t){for(var e=0,n=0;nu;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},"50c4":function(t,e,n){var i=n("a691"),o=Math.min;t.exports=function(t){return t>0?o(i(t),9007199254740991):0}},5135:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},5692:function(t,e,n){var i=n("c430"),o=n("c6cd");(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:i?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,n){var i=n("d066"),o=n("241c"),r=n("7418"),a=n("825a");t.exports=i("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=r.f;return n?e.concat(n(t)):e}},5899:function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},"58a8":function(t,e,n){var i=n("1d80"),o="["+n("5899")+"]",r=RegExp("^"+o+o+"*"),a=RegExp(o+o+"*$"),s=function(t){return function(e){var n=String(i(e));return 1&t&&(n=n.replace(r,"")),2&t&&(n=n.replace(a,"")),n}};t.exports={start:s(1),end:s(2),trim:s(3)}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"63a9":function(t,e,n){},6547:function(t,e,n){var i=n("a691"),o=n("1d80"),r=function(t){return function(e,n){var r,a,s=String(o(e)),l=i(n),c=s.length;return l<0||l>=c?t?"":void 0:(r=s.charCodeAt(l))<55296||r>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?t?s.charAt(l):r:t?s.slice(l,l+2):a-56320+(r-55296<<10)+65536}};t.exports={codeAt:r(!1),charAt:r(!0)}},"65f0":function(t,e,n){var i=n("861d"),o=n("e8b5"),r=n("b622")("species");t.exports=function(t,e){var n;return o(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[r])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},"69f3":function(t,e,n){var i,o,r,a=n("7f9a"),s=n("da84"),l=n("861d"),c=n("9112"),u=n("5135"),d=n("f772"),p=n("d012"),h=s.WeakMap;if(a){var f=new h,m=f.get,v=f.has,g=f.set;i=function(t,e){return g.call(f,t,e),e},o=function(t){return m.call(f,t)||{}},r=function(t){return v.call(f,t)}}else{var b=d("state");p[b]=!0,i=function(t,e){return c(t,b,e),e},o=function(t){return u(t,b)?t[b]:{}},r=function(t){return u(t,b)}}t.exports={set:i,get:o,has:r,enforce:function(t){return r(t)?o(t):i(t,{})},getterFor:function(t){return function(e){var n;if(!l(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},"6eeb":function(t,e,n){var i=n("da84"),o=n("9112"),r=n("5135"),a=n("ce4e"),s=n("8925"),l=n("69f3"),c=l.get,u=l.enforce,d=String(String).split("String");(t.exports=function(t,e,n,s){var l=!!s&&!!s.unsafe,c=!!s&&!!s.enumerable,p=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof e||r(n,"name")||o(n,"name",e),u(n).source=d.join("string"==typeof e?e:"")),t!==i?(l?!p&&t[e]&&(c=!0):delete t[e],c?t[e]=n:o(t,e,n)):c?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||s(this)}))},7156:function(t,e,n){var i=n("861d"),o=n("d2bb");t.exports=function(t,e,n){var r,a;return o&&"function"==typeof(r=e.constructor)&&r!==n&&i(a=r.prototype)&&a!==n.prototype&&o(t,a),t}},7418:function(t,e){e.f=Object.getOwnPropertySymbols},"746f":function(t,e,n){var i=n("428f"),o=n("5135"),r=n("e538"),a=n("9bf2").f;t.exports=function(t){var e=i.Symbol||(i.Symbol={});o(e,t)||a(e,t,{value:r.f(t)})}},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,n){var i=n("1d80");t.exports=function(t){return Object(i(t))}},"7c73":function(t,e,n){var i,o=n("825a"),r=n("37e8"),a=n("7839"),s=n("d012"),l=n("1be4"),c=n("cc12"),u=n("f772"),d=u("IE_PROTO"),p=function(){},h=function(t){return"