diff --git a/public/js/compose.js b/public/js/compose.js index 3a1341e4e..5a41d47bb 100644 --- a/public/js/compose.js +++ b/public/js/compose.js @@ -1 +1 @@ -(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;-webkit-box-flex:1;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%;-webkit-transform:translateY(-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%{-webkit-transform:translateY(-50%) rotate(0deg);transform:translateY(-50%) rotate(0deg)}to{-webkit-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}@keyframes rotate{0%{-webkit-transform:translateY(-50%) rotate(0deg);transform:translateY(-50%) rotate(0deg)}to{-webkit-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}',""])},"3VoG":function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,"/*!\n * Cropper.js v1.5.6\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2019-10-04T04:33:44.164Z\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",""])},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,a=i+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var n,o=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?t:(n=0===o.indexOf("//")?o:0===o.indexOf("/")?i+o:a+o.replace(/^\.\//,""),"url("+JSON.stringify(n)+")")}))}},FbgH:function(t,e,i){"use strict";var a=i("JOV7");i.n(a).a},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]||"",a=t[3];if(!a)return i;if(e&&"function"==typeof btoa){var n=(s=a,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),o=a.sources.map((function(t){return"/*# sourceURL="+a.sourceRoot+t+" */"}));return[i].concat(o).concat([n]).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 a={},n=0;n=0&&h.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 a=function(){0;return i.nc}();a&&(t.attrs.nonce=a)}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 x(t,e){var i,a,n,o;if(e.transform&&t.css){if(!(o="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=o}if(e.singleton){var s=d++;i=l||(l=v(e)),a=C.bind(null,i,s,!1),n=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),a=k.bind(null,i,e),n=function(){g(i),i.href&&URL.revokeObjectURL(i.href)}):(i=v(e),a=_.bind(null,i),n=function(){g(i)});return a(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;a(t=e)}else n()}}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 u(i,e),function(t){for(var a=[],n=0;n0&&void 0!==arguments[0]?arguments[0]:{},o=n.search,s=n.autoSelect,l=void 0!==s&&s,d=n.setValue,h=void 0===d?function(){}:d,p=n.setAttribute,u=void 0===p?function(){}:p,m=n.onUpdate,f=void 0===m?function(){}:m,g=n.onSubmit,v=void 0===g?function(){}:g,b=n.onShow,x=void 0===b?function(){}:b,w=n.onHide,y=void 0===w?function(){}:w,C=n.onLoading,_=void 0===C?function(){}:C,k=n.onLoaded,D=void 0===k?function(){}:k;i(this,t),a(this,"value",""),a(this,"searchCounter",0),a(this,"results",[]),a(this,"selectedIndex",-1),a(this,"handleInput",(function(t){var i=t.target.value;e.updateResults(i),e.value=i})),a(this,"handleKeyDown",(function(t){var i=t.key;switch(i){case"Up":case"Down":case"ArrowUp":case"ArrowDown":var a="ArrowUp"===i||"Up"===i?e.selectedIndex-1:e.selectedIndex+1;t.preventDefault(),e.handleArrows(a);break;case"Tab":e.selectResult();break;case"Enter":var n=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(n);break;case"Esc":case"Escape":e.hideResults(),e.setValue();break;default:return}})),a(this,"handleFocus",(function(t){var i=t.target.value;e.updateResults(i),e.value=i})),a(this,"handleBlur",(function(){e.hideResults()})),a(this,"handleResultMouseDown",(function(t){t.preventDefault()})),a(this,"handleResultClick",(function(t){var i=t.target,a=r(i,"[data-result-index]");if(a){e.selectedIndex=parseInt(a.dataset.resultIndex,10);var n=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(n)}})),a(this,"handleArrows",(function(t){var i=e.results.length;e.selectedIndex=(t%i+i)%i,e.onUpdate(e.results,e.selectedIndex)})),a(this,"selectResult",(function(){var t=e.results[e.selectedIndex];t&&e.setValue(t),e.hideResults()})),a(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())}))})),a(this,"showResults",(function(){e.setAttribute("aria-expanded",!0),e.onShow()})),a(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()})),a(this,"checkSelectedResultVisible",(function(t){var i=t.querySelector('[data-result-index="'.concat(e.selectedIndex,'"]'));if(i){var a=t.getBoundingClientRect(),n=i.getBoundingClientRect();n.topa.bottom&&(t.scrollTop+=n.bottom-a.bottom)}})),this.search=c(o)?o:function(t){return Promise.resolve(o(t))},this.autoSelect=l,this.setValue=h,this.setAttribute=u,this.onUpdate=f,this.onSubmit=v,this.onShow=x,this.onHide=y,this.onLoading=_,this.onLoaded=D},d=0,h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(t).concat(++d)};const p=function(t,e,i,a,n,o,s,r,c,l){"boolean"!=typeof s&&(c=r,r=s,s=!1);const d="function"==typeof i?i.options:i;let h;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,n&&(d.functional=!0)),a&&(d._scopeId=a),o?(h=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,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},d._ssrRegister=h):e&&(h=s?function(t){e.call(this,l(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,r(t))}),h)if(d.functional){const t=d.render;d.render=function(e,i){return h.call(i),t(e,i)}}else{const t=d.beforeCreate;d.beforeCreate=t?[].concat(t,h):[h]}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,a){return[t._t("result",[i("li",t._b({key:t.resultProps[a].id},"li",t.resultProps[a],!1),[t._v("\n "+t._s(t.getResultValue(e))+"\n ")])],{result:e,props:t.resultProps[a]})]}))],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,a,n=new l({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&&(n.handleInput=(t=n.handleInput,e=this.debounceTime,function(){var n=this,o=arguments,s=function(){a=null,i||t.apply(n,o)},r=i&&!a;clearTimeout(a),a=setTimeout(s,e),r&&t.apply(n,o)})),{core:n,value:this.defaultValue,resultListId:h("".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 o({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:a({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 o({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,a;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(),a=e.getBoundingClientRect(),i.bottom+a.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 u(t){u.installed||(u.installed=!0,t.component("Autocomplete",p))}var m,f={install:u};"undefined"!=typeof window?m=window.Vue:void 0!==t&&(m=t.Vue),m&&m.use(f),p.install=u,e.a=p}).call(this,i("yLpj"))},lcPr:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a,n=i("urRO"),o=(a=n)&&a.__esModule?a:{default:a};var s="undefined"==typeof window?[String,Array]:[String,Array,Element,NodeList];e.default={render:function(t){return t("div",{style:this.containerStyle},[t("img",{ref:"img",attrs:{src:this.src,alt:this.alt||"image",style:"max-width: 100%"},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},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 a in t)e.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(t,a)&&(i[a]=t[a]);return i}(t,["containerStyle","src","alt","imgStyle"])),i={};for(var a in e)void 0!==this[a]&&(i[a]=this[a]);this.cropper=new o.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)}}}},urRO:function(t,e,i){t.exports=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var i=0;i0&&t<1/0};function O(t){return void 0===t}function E(e){return"object"===t(e)&&null!==e}var I=Object.prototype.hasOwnProperty;function N(t){if(!E(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&I.call(i,"isPrototypeOf")}catch(t){return!1}}function z(t){return"function"==typeof t}var j=Array.prototype.slice;function H(t){return Array.from?Array.from(t):j.call(t)}function U(t,e){return t&&z(e)&&(Array.isArray(t)||R(t.length)?H(t).forEach((function(i,a){e.call(t,i,a,t)})):E(t)&&Object.keys(t).forEach((function(i){e.call(t,t[i],i,t)}))),t}var W=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),a=1;a0&&i.forEach((function(e){E(e)&&Object.keys(e).forEach((function(i){t[i]=e[i]}))})),t},Y=/\.\d*(?:0|9){12}\d*$/;function $(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return Y.test(t)?Math.round(t*e)/e:t}var F=/^width|height|left|top|marginLeft|marginTop$/;function X(t,e){var i=t.style;U(e,(function(t,e){F.test(e)&&R(t)&&(t="".concat(t,"px")),i[e]=t}))}function V(t,e){if(e)if(R(t.length))U(t,(function(t){V(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&&(R(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 q(t,e,i){e&&(R(t.length)?U(t,(function(t){q(t,e,i)})):i?V(t,e):Z(t,e))}var G=/([a-z\d])([A-Z])/g;function J(t){return t.replace(G,"$1-$2").toLowerCase()}function Q(t,e){return E(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(J(e)))}function K(t,e,i){E(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(J(e)),i)}var tt=/\s\s*/,et=function(){var t=!1;if(r){var e=!1,i=function(){},a=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});c.addEventListener("test",i,a),c.removeEventListener("test",i,a)}return t}();function it(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(tt).forEach((function(e){if(!et){var o=t.listeners;o&&o[e]&&o[e][i]&&(n=o[e][i],delete o[e][i],0===Object.keys(o[e]).length&&delete o[e],0===Object.keys(o).length&&delete t.listeners)}t.removeEventListener(e,n,a)}))}function at(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(tt).forEach((function(e){if(a.once&&!et){var o=t.listeners,s=void 0===o?{}:o;n=function(){delete s[e][i],t.removeEventListener(e,n,a);for(var o=arguments.length,r=new Array(o),c=0;c1&&void 0!==arguments[1]?arguments[1]:"contain",o=L(a),s=L(i);if(o&&s){var r=i*e;"contain"===n&&r>a||"cover"===n&&r=8&&(o=c+d)}}}if(o){var h,p,u=i.getUint16(o,a);for(p=0;pt.width?3===i?r=t.height*s:c=t.width/s:3===i?c=t.width/s:r=t.height*s;var l={aspectRatio:s,naturalWidth:n,naturalHeight:o,width:r,height:c};l.left=(t.width-r)/2,l.top=(t.height-c)/2,l.oldLeft=l.left,l.oldTop=l.top,this.canvasData=l,this.limited=1===i||2===i,this.limitCanvas(!0,!0),this.initialImageData=W({},e),this.initialCanvasData=W({},l)},limitCanvas:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,s=i.viewMode,r=n.aspectRatio,c=this.cropped&&o;if(t){var l=Number(i.minCanvasWidth)||0,d=Number(i.minCanvasHeight)||0;s>1?(l=Math.max(l,a.width),d=Math.max(d,a.height),3===s&&(d*r>l?l=d*r:d=l/r)):s>0&&(l?l=Math.max(l,c?o.width:0):d?d=Math.max(d,c?o.height:0):c&&(l=o.width,(d=o.height)*r>l?l=d*r:d=l/r));var h=pt({aspectRatio:r,width:l,height:d});l=h.width,d=h.height,n.minWidth=l,n.minHeight=d,n.maxWidth=1/0,n.maxHeight=1/0}if(e)if(s>(c?0:1)){var p=a.width-n.width,u=a.height-n.height;n.minLeft=Math.min(0,p),n.minTop=Math.min(0,u),n.maxLeft=Math.max(0,p),n.maxTop=Math.max(0,u),c&&this.limited&&(n.minLeft=Math.min(o.left,o.left+(o.width-n.width)),n.minTop=Math.min(o.top,o.top+(o.height-n.height)),n.maxLeft=o.left,n.maxTop=o.top,2===s&&(n.width>=a.width&&(n.minLeft=Math.min(0,p),n.maxLeft=Math.max(0,p)),n.height>=a.height&&(n.minTop=Math.min(0,u),n.maxTop=Math.max(0,u))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=a.width,n.maxTop=a.height},renderCanvas:function(t,e){var i=this.canvasData,a=this.imageData;if(e){var n=function(t){var e=t.width,i=t.height,a=t.degree;if(90==(a=Math.abs(a)%180))return{width:i,height:e};var n=a%90*Math.PI/180,o=Math.sin(n),s=Math.cos(n),r=e*s+i*o,c=e*o+i*s;return a>90?{width:c,height:r}:{width:r,height:c}}({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),o=n.width,s=n.height,r=i.width*(o/i.naturalWidth),c=i.height*(s/i.naturalHeight);i.left-=(r-i.width)/2,i.top-=(c-i.height)/2,i.width=r,i.height=c,i.aspectRatio=o/s,i.naturalWidth=o,i.naturalHeight=s,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.widthi.maxHeight||i.heighte.width?n.height=n.width/i:n.width=n.height*i),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*a),n.height=Math.max(n.minHeight,n.height*a),n.left=e.left+(e.width-n.width)/2,n.top=e.top+(e.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=W({},n)},limitCropBox:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,s=this.limited,r=i.aspectRatio;if(t){var c=Number(i.minCropBoxWidth)||0,l=Number(i.minCropBoxHeight)||0,d=s?Math.min(a.width,n.width,n.width+n.left,a.width-n.left):a.width,h=s?Math.min(a.height,n.height,n.height+n.top,a.height-n.top):a.height;c=Math.min(c,a.width),l=Math.min(l,a.height),r&&(c&&l?l*r>c?l=c/r:c=l*r:c?l=c/r:l&&(c=l*r),h*r>d?h=d/r:d=h*r),o.minWidth=Math.min(c,d),o.minHeight=Math.min(l,h),o.maxWidth=d,o.maxHeight=h}e&&(s?(o.minLeft=Math.max(0,n.left),o.minTop=Math.max(0,n.top),o.maxLeft=Math.min(a.width,n.left+n.width)-o.width,o.maxTop=Math.min(a.height,n.top+n.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=a.width-o.width,o.maxTop=a.height-o.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,W({width:i.width,height:i.height},dt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),nt(this.element,"crop",this.getData())}},bt={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,a=e?this.crossOriginUrl:this.url,n=t.alt||"The image to preview",o=document.createElement("img");if(e&&(o.crossOrigin=e),o.src=a,o.alt=n,this.viewBox.appendChild(o),this.viewBoxImage=o,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");K(t,x,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=a,i.alt=n,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=Q(t,x);X(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(E(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(J(e)))}(t,x)}))},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,a=i.width,n=i.height,o=t.width,s=t.height,r=i.left-e.left-t.left,c=i.top-e.top-t.top;this.cropped&&!this.disabled&&(X(this.viewBoxImage,W({width:o,height:s},dt(W({translateX:-r,translateY:-c},t)))),U(this.previews,(function(e){var i=Q(e,x),l=i.width,d=i.height,h=l,p=d,u=1;a&&(p=n*(u=l/a)),n&&p>d&&(h=a*(u=d/n),p=d),X(e,{width:h,height:p}),X(e.getElementsByTagName("img")[0],W({width:o*u,height:s*u},dt(W({translateX:-r*u,translateY:-c*u},t))))})))}},xt={bind:function(){var t=this.element,e=this.options,i=this.cropper;z(e.cropstart)&&at(t,"cropstart",e.cropstart),z(e.cropmove)&&at(t,"cropmove",e.cropmove),z(e.cropend)&&at(t,"cropend",e.cropend),z(e.crop)&&at(t,"crop",e.crop),z(e.zoom)&&at(t,"zoom",e.zoom),at(i,_,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&at(i,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&at(i,"dblclick",this.onDblclick=this.dblclick.bind(this)),at(t.ownerDocument,k,this.onCropMove=this.cropMove.bind(this)),at(t.ownerDocument,D,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&at(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;z(e.cropstart)&&it(t,"cropstart",e.cropstart),z(e.cropmove)&&it(t,"cropmove",e.cropmove),z(e.cropend)&&it(t,"cropend",e.cropend),z(e.crop)&&it(t,"crop",e.crop),z(e.zoom)&&it(t,"zoom",e.zoom),it(i,_,this.onCropStart),e.zoomable&&e.zoomOnWheel&&it(i,"wheel",this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&it(i,"dblclick",this.onDblclick),it(t.ownerDocument,k,this.onCropMove),it(t.ownerDocument,D,this.onCropEnd),e.responsive&&it(window,"resize",this.onResize)}},wt={resize:function(){var t=this.options,e=this.container,i=this.containerData,a=Number(t.minContainerWidth)||200,n=Number(t.minContainerHeight)||100;if(!(this.disabled||i.width<=a||i.height<=n)){var o,s,r=e.offsetWidth/i.width;1===r&&e.offsetHeight===i.height||(t.restore&&(o=this.getCanvasData(),s=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(U(o,(function(t,e){o[e]=t*r}))),this.setCropBoxData(U(s,(function(t,e){s[e]=t*r})))))}},dblclick:function(){var t,e;this.disabled||"none"===this.options.dragMode||this.setDragMode((t=this.dragBox,e=h,(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,a=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(R(e)&&1!==e||R(i)&&0!==i||t.ctrlKey))){var a,n=this.options,o=this.pointers;t.changedTouches?U(t.changedTouches,(function(t){o[t.identifier]=ht(t)})):o[t.pointerId||0]=ht(t),a=Object.keys(o).length>1&&n.zoomable&&n.zoomOnTouch?"zoom":Q(t.target,b),M.test(a)&&!1!==nt(this.element,"cropstart",{originalEvent:t,action:a})&&(t.preventDefault(),this.action=a,this.cropping=!1,"crop"===a&&(this.cropping=!0,V(this.dragBox,g)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==nt(this.element,"cropmove",{originalEvent:t,action:e})&&(t.changedTouches?U(t.changedTouches,(function(t){W(i[t.identifier]||{},ht(t,!0))})):W(i[t.pointerId||0]||{},ht(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,q(this.dragBox,g,this.cropped&&this.options.modal)),nt(this.element,"cropend",{originalEvent:t,action:e}))}}},yt={change:function(t){var e,i=this.options,a=this.canvasData,n=this.containerData,s=this.cropBoxData,r=this.pointers,c=this.action,l=i.aspectRatio,d=s.left,h=s.top,p=s.width,m=s.height,f=d+p,g=h+m,v=0,b=0,x=n.width,w=n.height,y=!0;!l&&t.shiftKey&&(l=p&&m?p/m:1),this.limited&&(v=s.minLeft,b=s.minTop,x=v+Math.min(n.width,a.width,a.left+a.width),w=b+Math.min(n.height,a.height,a.top+a.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>x&&(_.x=x-f);break;case"w":d+_.xw&&(_.y=w-g)}};switch(c){case"all":d+=_.x,h+=_.y;break;case"e":if(_.x>=0&&(f>=x||l&&(h<=b||g>=w))){y=!1;break}k("e"),(p+=_.x)<0&&(c="w",d-=p=-p),l&&(m=p/l,h+=(s.height-m)/2);break;case"n":if(_.y<=0&&(h<=b||l&&(d<=v||f>=x))){y=!1;break}k("n"),m-=_.y,h+=_.y,m<0&&(c="s",h-=m=-m),l&&(p=m*l,d+=(s.width-p)/2);break;case"w":if(_.x<=0&&(d<=v||l&&(h<=b||g>=w))){y=!1;break}k("w"),p-=_.x,d+=_.x,p<0&&(c="e",d-=p=-p),l&&(m=p/l,h+=(s.height-m)/2);break;case"s":if(_.y>=0&&(g>=w||l&&(d<=v||f>=x))){y=!1;break}k("s"),(m+=_.y)<0&&(c="n",h-=m=-m),l&&(p=m*l,d+=(s.width-p)/2);break;case"ne":if(l){if(_.y<=0&&(h<=b||f>=x)){y=!1;break}k("n"),m-=_.y,h+=_.y,p=m*l}else k("n"),k("e"),_.x>=0?fb&&(m-=_.y,h+=_.y):(m-=_.y,h+=_.y);p<0&&m<0?(c="sw",h-=m=-m,d-=p=-p):p<0?(c="nw",d-=p=-p):m<0&&(c="se",h-=m=-m);break;case"nw":if(l){if(_.y<=0&&(h<=b||d<=v)){y=!1;break}k("n"),m-=_.y,h+=_.y,p=m*l,d+=s.width-p}else k("n"),k("w"),_.x<=0?d>v?(p-=_.x,d+=_.x):_.y<=0&&h<=b&&(y=!1):(p-=_.x,d+=_.x),_.y<=0?h>b&&(m-=_.y,h+=_.y):(m-=_.y,h+=_.y);p<0&&m<0?(c="se",h-=m=-m,d-=p=-p):p<0?(c="ne",d-=p=-p):m<0&&(c="sw",h-=m=-m);break;case"sw":if(l){if(_.x<=0&&(d<=v||g>=w)){y=!1;break}k("w"),p-=_.x,d+=_.x,m=p/l}else k("s"),k("w"),_.x<=0?d>v?(p-=_.x,d+=_.x):_.y>=0&&g>=w&&(y=!1):(p-=_.x,d+=_.x),_.y>=0?g=0&&(f>=x||g>=w)){y=!1;break}k("e"),m=(p+=_.x)/l}else k("s"),k("e"),_.x>=0?f=0&&g>=w&&(y=!1):p+=_.x,_.y>=0?g0?c=_.y>0?"se":"ne":_.x<0&&(d-=p,c=_.y>0?"sw":"nw"),_.y<0&&(h-=m),this.cropped||(Z(this.cropBox,u),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}y&&(s.width=p,s.height=m,s.left=d,s.top=h,this.action=c,this.renderCropBox()),U(r,(function(t){t.startX=t.endX,t.startY=t.endY}))}},Ct={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&V(this.dragBox,g),Z(this.cropBox,u),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=W({},this.initialImageData),this.canvasData=W({},this.initialCanvasData),this.cropBoxData=W({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(W(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Z(this.dragBox,g),V(this.cropBox,u)),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,p)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,V(this.cropper,p)),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,a=i.left,n=i.top;return this.moveTo(O(t)?t:a+Number(t),O(e)?e:n+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(R(t)&&(i.left=t,a=!0),R(e)&&(i.top=e,a=!0),a&&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 a=this.options,n=this.canvasData,o=n.width,s=n.height,r=n.naturalWidth,c=n.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&a.zoomable){var l=r*t,d=c*t;if(!1===nt(this.element,"zoom",{ratio:t,oldRatio:o/r,originalEvent:i}))return this;if(i){var h=this.pointers,p=ot(this.cropper),u=h&&Object.keys(h).length?function(t){var e=0,i=0,a=0;return U(t,(function(t){var n=t.startX,o=t.startY;e+=n,i+=o,a+=1})),{pageX:e/=a,pageY:i/=a}}(h):{pageX:i.pageX,pageY:i.pageY};n.left-=(l-o)*((u.pageX-p.left-n.left)/o),n.top-=(d-s)*((u.pageY-p.top-n.top)/s)}else N(e)&&R(e.x)&&R(e.y)?(n.left-=(l-o)*((e.x-n.left)/o),n.top-=(d-s)*((e.y-n.top)/s)):(n.left-=(l-o)/2,n.top-=(d-s)/2);n.width=l,n.height=d,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return R(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,R(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(R(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(R(t)&&(i.scaleX=t,a=!0),R(e)&&(i.scaleY=e,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,a=this.imageData,n=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){t={x:o.left-n.left,y:o.top-n.top,width:o.width,height:o.height};var s=a.width/a.naturalWidth;if(U(t,(function(e,i){t[i]=e/s})),e){var r=Math.round(t.y+t.height),c=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=c-t.x,t.height=r-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=a.rotate||0),i.scalable&&(t.scaleX=a.scaleX||1,t.scaleY=a.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,a=this.canvasData,n={};if(this.ready&&!this.disabled&&N(t)){var o=!1;e.rotatable&&R(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),e.scalable&&(R(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),R(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var s=i.width/i.naturalWidth;R(t.x)&&(n.left=t.x*s+a.left),R(t.y)&&(n.top=t.y*s+a.top),R(t.width)&&(n.width=t.width*s),R(t.height)&&(n.height=t.height*s),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?W({},this.containerData):{}},getImageData:function(){return this.sized?W({},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&&N(t)&&(R(t.left)&&(e.left=t.left),R(t.top)&&(e.top=t.top),R(t.width)?(e.width=t.width,e.height=t.width/i):R(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,a=this.cropBoxData,n=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&N(t)&&(R(t.left)&&(a.left=t.left),R(t.top)&&(a.top=t.top),R(t.width)&&t.width!==a.width&&(e=!0,a.width=t.width),R(t.height)&&t.height!==a.height&&(i=!0,a.height=t.height),n&&(e?a.height=a.width/n:i&&(a.width=a.height*n)),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=ut(this.image,this.imageData,e,t);if(!this.cropped)return i;var a=this.getData(),n=a.x,o=a.y,r=a.width,c=a.height,l=i.width/Math.floor(e.naturalWidth);1!==l&&(n*=l,o*=l,r*=l,c*=l);var d=r/c,h=pt({aspectRatio:d,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=pt({aspectRatio:d,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=pt({aspectRatio:d,width:t.width||(1!==l?i.width:r),height:t.height||(1!==l?i.height:c)}),m=u.width,f=u.height;m=Math.min(h.width,Math.max(p.width,m)),f=Math.min(h.height,Math.max(p.height,f));var g=document.createElement("canvas"),v=g.getContext("2d");g.width=$(m),g.height=$(f),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,m,f);var b=t.imageSmoothingEnabled,x=void 0===b||b,w=t.imageSmoothingQuality;v.imageSmoothingEnabled=x,w&&(v.imageSmoothingQuality=w);var y,C,_,k,D,M,T=i.width,S=i.height,A=n,B=o;A<=-r||A>T?(A=0,y=0,_=0,D=0):A<=0?(_=-A,A=0,D=y=Math.min(T,r+A)):A<=T&&(_=0,D=y=Math.min(r,T-A)),y<=0||B<=-c||B>S?(B=0,C=0,k=0,M=0):B<=0?(k=-B,B=0,M=C=Math.min(S,c+B)):B<=S&&(k=0,M=C=Math.min(c,S-B));var P=[A,B,y,C];if(D>0&&M>0){var R=m/r;P.push(_*R,k*R,D*R,M*R)}return v.drawImage.apply(v,[i].concat(s(P.map((function(t){return Math.floor($(t))}))))),g},setAspectRatio:function(t){var e=this.options;return this.disabled||O(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,a=this.face;if(this.ready&&!this.disabled){var n="crop"===t,o=e.movable&&"move"===t;t=n||o?t:"none",e.dragMode=t,K(i,b,t),q(i,h,n),q(i,v,o),e.cropBoxMovable||(K(a,b,t),q(a,h,n),q(a,v,o))}return this}},_t=c.Cropper,kt=function(){function t(i){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e(this,t),!i||!A.test(i.tagName))throw new Error("The first argument is required and must be an or element.");this.element=i,this.options=W({},B,N(a)&&a),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 a,n,o;return a=t,o=[{key:"noConflict",value:function(){return window.Cropper=_t,t}},{key:"setDefaults",value:function(t){W(B,N(t)&&t)}}],(n=[{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,a=this.options;if(a.rotatable||a.scalable||(a.checkOrientation=!1),a.checkOrientation&&window.ArrayBuffer)if(T.test(t))S.test(t)?this.read((n=t.replace(ft,""),o=atob(n),s=new ArrayBuffer(o.length),U(r=new Uint8Array(s),(function(t,e){r[e]=o.charCodeAt(e)})),s)):this.clone();else{var n,o,s,r,c=new XMLHttpRequest,l=this.clone.bind(this);this.reloading=!0,this.xhr=c,c.onabort=l,c.onerror=l,c.ontimeout=l,c.onprogress=function(){"image/jpeg"!==c.getResponseHeader("content-type")&&c.abort()},c.onload=function(){e.read(c.response)},c.onloadend=function(){e.reloading=!1,e.xhr=null},a.checkCrossOrigin&&ct(t)&&i.crossOrigin&&(t=lt(t)),c.open("GET",t),c.responseType="arraybuffer",c.withCredentials="use-credentials"===i.crossOrigin,c.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,a=gt(t),n=0,o=1,s=1;if(a>1){this.url=function(t,e){for(var i=[],a=new Uint8Array(t);a.length>0;)i.push(mt.apply(null,H(a.subarray(0,8192)))),a=a.subarray(8192);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}(t,"image/jpeg");var r=function(t){var e=0,i=1,a=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:a=-1;break;case 5:e=90,a=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:a}}(a);n=r.rotate,o=r.scaleX,s=r.scaleY}e.rotatable&&(i.rotate=n),e.scalable&&(i.scaleX=o,i.scaleY=s),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,a=e;this.options.checkCrossOrigin&&ct(e)&&(i||(i="anonymous"),a=lt(e)),this.crossOrigin=i,this.crossOriginUrl=a;var n=document.createElement("img");i&&(n.crossOrigin=i),n.src=a||e,n.alt=t.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),V(n,m),t.parentNode.insertBefore(n,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),a=function(e,i){W(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var n=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){a(n.width,n.height),i||o.removeChild(n)},n.src=e.src,i||(n.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;",o.appendChild(n))}else a(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,a=t.parentNode,n=document.createElement("div");n.innerHTML='
';var o=n.querySelector(".".concat("cropper","-container")),s=o.querySelector(".".concat("cropper","-canvas")),r=o.querySelector(".".concat("cropper","-drag-box")),c=o.querySelector(".".concat("cropper","-crop-box")),l=c.querySelector(".".concat("cropper","-face"));this.container=a,this.cropper=o,this.canvas=s,this.dragBox=r,this.cropBox=c,this.viewBox=o.querySelector(".".concat("cropper","-view-box")),this.face=l,s.appendChild(i),V(t,u),a.insertBefore(o,t.nextSibling),this.isImg||Z(i,m),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,V(c,u),e.guides||V(c.getElementsByClassName("".concat("cropper","-dashed")),u),e.center||V(c.getElementsByClassName("".concat("cropper","-center")),u),e.background&&V(o,"".concat("cropper","-bg")),e.highlight||V(l,f),e.cropBoxMovable&&(V(l,v),K(l,b,"all")),e.cropBoxResizable||(V(c.getElementsByClassName("".concat("cropper","-line")),u),V(c.getElementsByClassName("".concat("cropper","-point")),u)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),z(e.ready)&&at(t,"ready",e.ready,{once:!0}),nt(t,"ready")}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),Z(this.element,u))}},{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()}}])&&i(a.prototype,n),o&&i(a,o),t}();return W(kt.prototype,vt,bt,xt,wt,yt,Ct),kt}()},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 a=i("lcPr"),n=i.n(a),o=(i("YQfW"),i("lb/t"));i("i3gq");function s(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var r={components:{VueCropper:n.a,Autocomplete:o.a},data:function(){var t;return s(t={config:window.App.config,pageLoading:!1,profile:{},composeText:"",composeTextLength:0,nsfw:!1,filters:[],currentFilter:!1,ids:[],media:[],carouselCursor:0,uploading:!1,uploadProgress:100,composeType:!1,page:1,composeState:"publish",visibility:"public",visibilityTag:"Public"},"nsfw",!1),s(t,"place",!1),s(t,"commentsDisabled",!1),s(t,"optimizeMedia",!0),s(t,"mediaCropped",!1),s(t,"pageTitle",""),s(t,"cropper",{aspectRatio:1,viewMode:1,zoomable:!0,zoom:0}),s(t,"namedPages",["cropPhoto","tagPeople","addLocation","advancedSettings","visibility","altText","addToCollection","schedulePost","mediaMetadata","addToStory","editMedia","cameraRoll","tagPeopleHelp","textOptions"]),s(t,"cameraRollMedia",[]),s(t,"taggedUsernames",[]),s(t,"taggedPeopleSearch",null),s(t,"textMode",!1),t},beforeMount:function(){this.fetchProfile(),0==this.config.uploader.media_types.includes("video/mp4")&&(this.composeType="post"),this.filters=window.App.util.filters},mounted:function(){this.mediaWatcher()},methods:{fetchProfile:function(){var t=this;window._sharedData.curUser?(t.profile=window._sharedData.curUser,1==t.profile.locked&&(t.visibility="private",t.visibilityTag="Followers Only")):axios.get("/api/pixelfed/v1/accounts/verify_credentials").then((function(e){t.profile=e.data,window.pixelfed.currentUser=e.data,1==e.data.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},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 a=e.type,n=t.config.uploader.media_types.split(",");if(-1==$.inArray(a,n))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 o=new FormData;o.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",o,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=2}),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;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.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(t){case"publish":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 e={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};return void axios.post("/api/compose/v0/publish",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")}},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(){this.composeType="",$("#composeModal").modal("hide")},goBack:function(){switch(this.pageTitle="",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;default:-1!=this.namedPages.indexOf(this.page)?this.page=this.textMode?"addText":3:this.textMode||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){this.place=t,this.pageTitle=this.textMode?"New Text Post":"",this.page=this.textMode?"addText":3},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){this.visibility=t,this.visibilityTag={public:"Public",private:"Followers Only",unlisted:"Unlisted"}[t],this.pageTitle="",this.page=this.textMode?"addText":3},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,a=document.getElementById("pr_canvas"),n=a.getContext("2d"),o=document.getElementById("pr_img"),s=null,r=e.length-1;r>=0;r--)(i=e[r]).filter_class&&(o.src=i.url,o.addEventListener("load",(function(t){a.width=o.width,a.height=o.height,n.filter=App.util.filterCss[i.filter_class],n.drawImage(o,0,0,o.width,o.height),n.save(),a.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),n.clearRect(0,0,o.width,o.height))},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){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"}}},c=(i("FbgH"),i("KHd+")),l=Object(c.a)(r,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("input",{staticClass:"w-100 h-100 d-none file-input",attrs:{type:"file",id:"pf-dz",name:"media",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")])])])])])]):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(e)}}},[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(e)}}},[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(1)]):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(e)}}},[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(" "),i("div",{staticClass:"card-body p-0 border-top"},["textOptions"==t.page?i("div",{staticClass:"w-100 h-100",staticStyle:{"min-height":"280px"}},[t._v("\n\t\t\t\t\t\ttest\n\t\t\t\t\t")]):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 mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark"},[i("div",{staticClass:"card-body",on:{click:function(e){return e.preventDefault(),t.addMedia(e)}}},[i("div",{staticClass:"media"},[t._m(2),t._v(" "),i("div",{staticClass:"media-body text-left"},[t._m(3),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._e(),t._v(" "),1==t.config.ab.top&&0==t.media.length?i("div",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark"},[i("div",{staticClass:"card-body",on:{click:function(e){return e.preventDefault(),t.addText(e)}}},[t._m(4)])]):t._e(),t._v(" "),1==t.config.features.stories?i("a",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark",attrs:{href:"/i/stories/new"}},[t._m(5)]):t._e(),t._v(" "),t._m(6),t._v(" "),t._m(7)])]):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,a){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,a){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=a}}},[i("span",{class:[e.filter_class?e.filter_class:""]},[i("span",{class:"rounded border "+[a==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(" "),a==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(e)}}},[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,a){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("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))])])])])]),t._v(" "),i("div",{staticClass:"border-bottom d-flex justify-content-between px-4 mb-0 py-2 "},[t._m(8),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,a=e.target,n=!!a.checked;if(Array.isArray(i)){var o=t._i(i,null);a.checked?o<0&&(t.nsfw=i.concat([null])):o>-1&&(t.nsfw=i.slice(0,o).concat(i.slice(o+1)))}else t.nsfw=n}}}),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 "),i("span",{staticClass:"ml-2 badge badge-primary"},[t._v("NEW")])])]),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,a){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"+a,disabled:""},domProps:{checked:Array.isArray(e.privacy)?t._i(e.privacy,null)>-1:e.privacy},on:{change:function(i){var a=e.privacy,n=i.target,o=!!n.checked;if(Array.isArray(a)){var s=t._i(a,null);n.checked?s<0&&t.$set(e,"privacy",a.concat([null])):s>-1&&t.$set(e,"privacy",a.slice(0,s).concat(a.slice(s+1)))}else t.$set(e,"privacy",o)}}}),t._v(" "),i("label",{staticClass:"custom-control-label font-weight-bold text-lighter",attrs:{for:"cci-tagged-privacy-switch"+a}},[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(a)}}},[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(9),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,a=e.target,n=!!a.checked;if(Array.isArray(i)){var o=t._i(i,null);a.checked?o<0&&(t.commentsDisabled=i.concat([null])):o>-1&&(t.commentsDisabled=i.slice(0,o).concat(i.slice(o+1)))}else t.commentsDisabled=n}}}),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(10)])])]):t._e(),t._v(" "),"visibility"==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"list-group list-group-flush"},[i("div",{class:"list-group-item lead cursor-pointer "+["public"==t.visibility?"text-primary":""],on:{click:function(e){return t.toggleVisibility("public")}}},[t._v("Public")]),t._v(" "),i("div",{class:"list-group-item lead cursor-pointer "+["unlisted"==t.visibility?"text-primary":""],on:{click:function(e){return t.toggleVisibility("unlisted")}}},[t._v("Unlisted")]),t._v(" "),i("div",{class:"list-group-item lead cursor-pointer "+["private"==t.visibility?"text-primary":""],on:{click:function(e){return t.toggleVisibility("private")}}},[t._v("Followers Only")])])]):t._e(),t._v(" "),"altText"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[t._l(t.media,(function(e,a){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:"140"},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)+"/140")])])]),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"},[i("div",{staticClass:"list-group mb-3"},[i("div",{staticClass:"list-group-item cursor-pointer compose-action border",on:{click:function(e){return t.goBack()}}},[t._m(11)])]),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(" "),"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("input",{directives:[{name:"model",rawName:"v-model",value:t.media[t.carouselCursor].license,expression:"media[carouselCursor].license"}],staticClass:"form-control",attrs:{type:"text",placeholder:"All Rights Reserved (Default license)"},domProps:{value:t.media[t.carouselCursor].license},on:{input:function(e){e.target.composing||t.$set(t.media[t.carouselCursor],"license",e.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text small text-muted mb-0 d-flex justify-content-between"},[i("span"),t._v(" "),i("span",[t._v(t._s(t.media[t.carouselCursor].license?t.media[t.carouselCursor].license.length:0)+"/140")])])])])]),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(" "),"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("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:"fas 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"},[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-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 Photo to Story")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("a",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark",attrs:{href:"/i/collections/create"}},[e("div",{staticClass:"card-body"},[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-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("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",{staticClass:"media"},[e("img",{staticClass:"mr-3",attrs:{src:"",alt:"",width:"50px",height:"50px"}}),this._v(" "),e("div",{staticClass:"media-body"},[e("h5",{staticClass:"mt-0"},[this._v("collection title")]),this._v(" "),e("p",{staticClass:"mb-0 text-muted small"},[this._v("3 Photos - Created 2h ago")])])])}],!1,null,"fb4c8a12",null);e.default=l.exports}},[[7,0]]]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{"+urK":function(t,e,i){"use strict";var a=i("2jBr");i.n(a).a},"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;-webkit-box-flex:1;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%;-webkit-transform:translateY(-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%{-webkit-transform:translateY(-50%) rotate(0deg);transform:translateY(-50%) rotate(0deg)}to{-webkit-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}@keyframes rotate{0%{-webkit-transform:translateY(-50%) rotate(0deg);transform:translateY(-50%) rotate(0deg)}to{-webkit-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}',""])},"2jBr":function(t,e,i){var a=i("zAc1");"string"==typeof a&&(a=[[t.i,a,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};i("aET+")(a,n);a.locals&&(t.exports=a.locals)},"3VoG":function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,"/*!\n * Cropper.js v1.5.6\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2019-10-04T04:33:44.164Z\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",""])},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,a=i+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var n,o=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?t:(n=0===o.indexOf("//")?o:0===o.indexOf("/")?i+o:a+o.replace(/^\.\//,""),"url("+JSON.stringify(n)+")")}))}},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]||"",a=t[3];if(!a)return i;if(e&&"function"==typeof btoa){var n=(s=a,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),o=a.sources.map((function(t){return"/*# sourceURL="+a.sourceRoot+t+" */"}));return[i].concat(o).concat([n]).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 a={},n=0;n=0&&h.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 a=function(){0;return i.nc}();a&&(t.attrs.nonce=a)}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 x(t,e){var i,a,n,o;if(e.transform&&t.css){if(!(o="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=o}if(e.singleton){var s=d++;i=l||(l=v(e)),a=C.bind(null,i,s,!1),n=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),a=k.bind(null,i,e),n=function(){g(i),i.href&&URL.revokeObjectURL(i.href)}):(i=v(e),a=_.bind(null,i),n=function(){g(i)});return a(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;a(t=e)}else n()}}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 u(i,e),function(t){for(var a=[],n=0;n0&&void 0!==arguments[0]?arguments[0]:{},o=n.search,s=n.autoSelect,l=void 0!==s&&s,d=n.setValue,h=void 0===d?function(){}:d,p=n.setAttribute,u=void 0===p?function(){}:p,m=n.onUpdate,f=void 0===m?function(){}:m,g=n.onSubmit,v=void 0===g?function(){}:g,b=n.onShow,x=void 0===b?function(){}:b,w=n.onHide,y=void 0===w?function(){}:w,C=n.onLoading,_=void 0===C?function(){}:C,k=n.onLoaded,D=void 0===k?function(){}:k;i(this,t),a(this,"value",""),a(this,"searchCounter",0),a(this,"results",[]),a(this,"selectedIndex",-1),a(this,"handleInput",(function(t){var i=t.target.value;e.updateResults(i),e.value=i})),a(this,"handleKeyDown",(function(t){var i=t.key;switch(i){case"Up":case"Down":case"ArrowUp":case"ArrowDown":var a="ArrowUp"===i||"Up"===i?e.selectedIndex-1:e.selectedIndex+1;t.preventDefault(),e.handleArrows(a);break;case"Tab":e.selectResult();break;case"Enter":var n=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(n);break;case"Esc":case"Escape":e.hideResults(),e.setValue();break;default:return}})),a(this,"handleFocus",(function(t){var i=t.target.value;e.updateResults(i),e.value=i})),a(this,"handleBlur",(function(){e.hideResults()})),a(this,"handleResultMouseDown",(function(t){t.preventDefault()})),a(this,"handleResultClick",(function(t){var i=t.target,a=r(i,"[data-result-index]");if(a){e.selectedIndex=parseInt(a.dataset.resultIndex,10);var n=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(n)}})),a(this,"handleArrows",(function(t){var i=e.results.length;e.selectedIndex=(t%i+i)%i,e.onUpdate(e.results,e.selectedIndex)})),a(this,"selectResult",(function(){var t=e.results[e.selectedIndex];t&&e.setValue(t),e.hideResults()})),a(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())}))})),a(this,"showResults",(function(){e.setAttribute("aria-expanded",!0),e.onShow()})),a(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()})),a(this,"checkSelectedResultVisible",(function(t){var i=t.querySelector('[data-result-index="'.concat(e.selectedIndex,'"]'));if(i){var a=t.getBoundingClientRect(),n=i.getBoundingClientRect();n.topa.bottom&&(t.scrollTop+=n.bottom-a.bottom)}})),this.search=c(o)?o:function(t){return Promise.resolve(o(t))},this.autoSelect=l,this.setValue=h,this.setAttribute=u,this.onUpdate=f,this.onSubmit=v,this.onShow=x,this.onHide=y,this.onLoading=_,this.onLoaded=D},d=0,h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(t).concat(++d)};const p=function(t,e,i,a,n,o,s,r,c,l){"boolean"!=typeof s&&(c=r,r=s,s=!1);const d="function"==typeof i?i.options:i;let h;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,n&&(d.functional=!0)),a&&(d._scopeId=a),o?(h=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,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},d._ssrRegister=h):e&&(h=s?function(t){e.call(this,l(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,r(t))}),h)if(d.functional){const t=d.render;d.render=function(e,i){return h.call(i),t(e,i)}}else{const t=d.beforeCreate;d.beforeCreate=t?[].concat(t,h):[h]}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,a){return[t._t("result",[i("li",t._b({key:t.resultProps[a].id},"li",t.resultProps[a],!1),[t._v("\n "+t._s(t.getResultValue(e))+"\n ")])],{result:e,props:t.resultProps[a]})]}))],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,a,n=new l({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&&(n.handleInput=(t=n.handleInput,e=this.debounceTime,function(){var n=this,o=arguments,s=function(){a=null,i||t.apply(n,o)},r=i&&!a;clearTimeout(a),a=setTimeout(s,e),r&&t.apply(n,o)})),{core:n,value:this.defaultValue,resultListId:h("".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 o({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:a({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 o({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,a;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(),a=e.getBoundingClientRect(),i.bottom+a.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 u(t){u.installed||(u.installed=!0,t.component("Autocomplete",p))}var m,f={install:u};"undefined"!=typeof window?m=window.Vue:void 0!==t&&(m=t.Vue),m&&m.use(f),p.install=u,e.a=p}).call(this,i("yLpj"))},lcPr:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a,n=i("urRO"),o=(a=n)&&a.__esModule?a:{default:a};var s="undefined"==typeof window?[String,Array]:[String,Array,Element,NodeList];e.default={render:function(t){return t("div",{style:this.containerStyle},[t("img",{ref:"img",attrs:{src:this.src,alt:this.alt||"image",style:"max-width: 100%"},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},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 a in t)e.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(t,a)&&(i[a]=t[a]);return i}(t,["containerStyle","src","alt","imgStyle"])),i={};for(var a in e)void 0!==this[a]&&(i[a]=this[a]);this.cropper=new o.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)}}}},urRO:function(t,e,i){t.exports=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var i=0;i0&&t<1/0};function O(t){return void 0===t}function E(e){return"object"===t(e)&&null!==e}var I=Object.prototype.hasOwnProperty;function N(t){if(!E(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&I.call(i,"isPrototypeOf")}catch(t){return!1}}function z(t){return"function"==typeof t}var j=Array.prototype.slice;function H(t){return Array.from?Array.from(t):j.call(t)}function U(t,e){return t&&z(e)&&(Array.isArray(t)||R(t.length)?H(t).forEach((function(i,a){e.call(t,i,a,t)})):E(t)&&Object.keys(t).forEach((function(i){e.call(t,t[i],i,t)}))),t}var W=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),a=1;a0&&i.forEach((function(e){E(e)&&Object.keys(e).forEach((function(i){t[i]=e[i]}))})),t},Y=/\.\d*(?:0|9){12}\d*$/;function $(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return Y.test(t)?Math.round(t*e)/e:t}var F=/^width|height|left|top|marginLeft|marginTop$/;function X(t,e){var i=t.style;U(e,(function(t,e){F.test(e)&&R(t)&&(t="".concat(t,"px")),i[e]=t}))}function V(t,e){if(e)if(R(t.length))U(t,(function(t){V(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&&(R(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 q(t,e,i){e&&(R(t.length)?U(t,(function(t){q(t,e,i)})):i?V(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 E(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(Q(e)))}function K(t,e,i){E(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(Q(e)),i)}var tt=/\s\s*/,et=function(){var t=!1;if(r){var e=!1,i=function(){},a=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});c.addEventListener("test",i,a),c.removeEventListener("test",i,a)}return t}();function it(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(tt).forEach((function(e){if(!et){var o=t.listeners;o&&o[e]&&o[e][i]&&(n=o[e][i],delete o[e][i],0===Object.keys(o[e]).length&&delete o[e],0===Object.keys(o).length&&delete t.listeners)}t.removeEventListener(e,n,a)}))}function at(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(tt).forEach((function(e){if(a.once&&!et){var o=t.listeners,s=void 0===o?{}:o;n=function(){delete s[e][i],t.removeEventListener(e,n,a);for(var o=arguments.length,r=new Array(o),c=0;c1&&void 0!==arguments[1]?arguments[1]:"contain",o=L(a),s=L(i);if(o&&s){var r=i*e;"contain"===n&&r>a||"cover"===n&&r=8&&(o=c+d)}}}if(o){var h,p,u=i.getUint16(o,a);for(p=0;pt.width?3===i?r=t.height*s:c=t.width/s:3===i?c=t.width/s:r=t.height*s;var l={aspectRatio:s,naturalWidth:n,naturalHeight:o,width:r,height:c};l.left=(t.width-r)/2,l.top=(t.height-c)/2,l.oldLeft=l.left,l.oldTop=l.top,this.canvasData=l,this.limited=1===i||2===i,this.limitCanvas(!0,!0),this.initialImageData=W({},e),this.initialCanvasData=W({},l)},limitCanvas:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,s=i.viewMode,r=n.aspectRatio,c=this.cropped&&o;if(t){var l=Number(i.minCanvasWidth)||0,d=Number(i.minCanvasHeight)||0;s>1?(l=Math.max(l,a.width),d=Math.max(d,a.height),3===s&&(d*r>l?l=d*r:d=l/r)):s>0&&(l?l=Math.max(l,c?o.width:0):d?d=Math.max(d,c?o.height:0):c&&(l=o.width,(d=o.height)*r>l?l=d*r:d=l/r));var h=pt({aspectRatio:r,width:l,height:d});l=h.width,d=h.height,n.minWidth=l,n.minHeight=d,n.maxWidth=1/0,n.maxHeight=1/0}if(e)if(s>(c?0:1)){var p=a.width-n.width,u=a.height-n.height;n.minLeft=Math.min(0,p),n.minTop=Math.min(0,u),n.maxLeft=Math.max(0,p),n.maxTop=Math.max(0,u),c&&this.limited&&(n.minLeft=Math.min(o.left,o.left+(o.width-n.width)),n.minTop=Math.min(o.top,o.top+(o.height-n.height)),n.maxLeft=o.left,n.maxTop=o.top,2===s&&(n.width>=a.width&&(n.minLeft=Math.min(0,p),n.maxLeft=Math.max(0,p)),n.height>=a.height&&(n.minTop=Math.min(0,u),n.maxTop=Math.max(0,u))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=a.width,n.maxTop=a.height},renderCanvas:function(t,e){var i=this.canvasData,a=this.imageData;if(e){var n=function(t){var e=t.width,i=t.height,a=t.degree;if(90==(a=Math.abs(a)%180))return{width:i,height:e};var n=a%90*Math.PI/180,o=Math.sin(n),s=Math.cos(n),r=e*s+i*o,c=e*o+i*s;return a>90?{width:c,height:r}:{width:r,height:c}}({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),o=n.width,s=n.height,r=i.width*(o/i.naturalWidth),c=i.height*(s/i.naturalHeight);i.left-=(r-i.width)/2,i.top-=(c-i.height)/2,i.width=r,i.height=c,i.aspectRatio=o/s,i.naturalWidth=o,i.naturalHeight=s,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.widthi.maxHeight||i.heighte.width?n.height=n.width/i:n.width=n.height*i),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*a),n.height=Math.max(n.minHeight,n.height*a),n.left=e.left+(e.width-n.width)/2,n.top=e.top+(e.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=W({},n)},limitCropBox:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,s=this.limited,r=i.aspectRatio;if(t){var c=Number(i.minCropBoxWidth)||0,l=Number(i.minCropBoxHeight)||0,d=s?Math.min(a.width,n.width,n.width+n.left,a.width-n.left):a.width,h=s?Math.min(a.height,n.height,n.height+n.top,a.height-n.top):a.height;c=Math.min(c,a.width),l=Math.min(l,a.height),r&&(c&&l?l*r>c?l=c/r:c=l*r:c?l=c/r:l&&(c=l*r),h*r>d?h=d/r:d=h*r),o.minWidth=Math.min(c,d),o.minHeight=Math.min(l,h),o.maxWidth=d,o.maxHeight=h}e&&(s?(o.minLeft=Math.max(0,n.left),o.minTop=Math.max(0,n.top),o.maxLeft=Math.min(a.width,n.left+n.width)-o.width,o.maxTop=Math.min(a.height,n.top+n.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=a.width-o.width,o.maxTop=a.height-o.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,W({width:i.width,height:i.height},dt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),nt(this.element,"crop",this.getData())}},bt={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,a=e?this.crossOriginUrl:this.url,n=t.alt||"The image to preview",o=document.createElement("img");if(e&&(o.crossOrigin=e),o.src=a,o.alt=n,this.viewBox.appendChild(o),this.viewBoxImage=o,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");K(t,x,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=a,i.alt=n,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,x);X(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(E(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,x)}))},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,a=i.width,n=i.height,o=t.width,s=t.height,r=i.left-e.left-t.left,c=i.top-e.top-t.top;this.cropped&&!this.disabled&&(X(this.viewBoxImage,W({width:o,height:s},dt(W({translateX:-r,translateY:-c},t)))),U(this.previews,(function(e){var i=J(e,x),l=i.width,d=i.height,h=l,p=d,u=1;a&&(p=n*(u=l/a)),n&&p>d&&(h=a*(u=d/n),p=d),X(e,{width:h,height:p}),X(e.getElementsByTagName("img")[0],W({width:o*u,height:s*u},dt(W({translateX:-r*u,translateY:-c*u},t))))})))}},xt={bind:function(){var t=this.element,e=this.options,i=this.cropper;z(e.cropstart)&&at(t,"cropstart",e.cropstart),z(e.cropmove)&&at(t,"cropmove",e.cropmove),z(e.cropend)&&at(t,"cropend",e.cropend),z(e.crop)&&at(t,"crop",e.crop),z(e.zoom)&&at(t,"zoom",e.zoom),at(i,_,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&at(i,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&at(i,"dblclick",this.onDblclick=this.dblclick.bind(this)),at(t.ownerDocument,k,this.onCropMove=this.cropMove.bind(this)),at(t.ownerDocument,D,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&at(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;z(e.cropstart)&&it(t,"cropstart",e.cropstart),z(e.cropmove)&&it(t,"cropmove",e.cropmove),z(e.cropend)&&it(t,"cropend",e.cropend),z(e.crop)&&it(t,"crop",e.crop),z(e.zoom)&&it(t,"zoom",e.zoom),it(i,_,this.onCropStart),e.zoomable&&e.zoomOnWheel&&it(i,"wheel",this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&it(i,"dblclick",this.onDblclick),it(t.ownerDocument,k,this.onCropMove),it(t.ownerDocument,D,this.onCropEnd),e.responsive&&it(window,"resize",this.onResize)}},wt={resize:function(){var t=this.options,e=this.container,i=this.containerData,a=Number(t.minContainerWidth)||200,n=Number(t.minContainerHeight)||100;if(!(this.disabled||i.width<=a||i.height<=n)){var o,s,r=e.offsetWidth/i.width;1===r&&e.offsetHeight===i.height||(t.restore&&(o=this.getCanvasData(),s=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(U(o,(function(t,e){o[e]=t*r}))),this.setCropBoxData(U(s,(function(t,e){s[e]=t*r})))))}},dblclick:function(){var t,e;this.disabled||"none"===this.options.dragMode||this.setDragMode((t=this.dragBox,e=h,(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,a=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(R(e)&&1!==e||R(i)&&0!==i||t.ctrlKey))){var a,n=this.options,o=this.pointers;t.changedTouches?U(t.changedTouches,(function(t){o[t.identifier]=ht(t)})):o[t.pointerId||0]=ht(t),a=Object.keys(o).length>1&&n.zoomable&&n.zoomOnTouch?"zoom":J(t.target,b),M.test(a)&&!1!==nt(this.element,"cropstart",{originalEvent:t,action:a})&&(t.preventDefault(),this.action=a,this.cropping=!1,"crop"===a&&(this.cropping=!0,V(this.dragBox,g)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==nt(this.element,"cropmove",{originalEvent:t,action:e})&&(t.changedTouches?U(t.changedTouches,(function(t){W(i[t.identifier]||{},ht(t,!0))})):W(i[t.pointerId||0]||{},ht(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,q(this.dragBox,g,this.cropped&&this.options.modal)),nt(this.element,"cropend",{originalEvent:t,action:e}))}}},yt={change:function(t){var e,i=this.options,a=this.canvasData,n=this.containerData,s=this.cropBoxData,r=this.pointers,c=this.action,l=i.aspectRatio,d=s.left,h=s.top,p=s.width,m=s.height,f=d+p,g=h+m,v=0,b=0,x=n.width,w=n.height,y=!0;!l&&t.shiftKey&&(l=p&&m?p/m:1),this.limited&&(v=s.minLeft,b=s.minTop,x=v+Math.min(n.width,a.width,a.left+a.width),w=b+Math.min(n.height,a.height,a.top+a.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>x&&(_.x=x-f);break;case"w":d+_.xw&&(_.y=w-g)}};switch(c){case"all":d+=_.x,h+=_.y;break;case"e":if(_.x>=0&&(f>=x||l&&(h<=b||g>=w))){y=!1;break}k("e"),(p+=_.x)<0&&(c="w",d-=p=-p),l&&(m=p/l,h+=(s.height-m)/2);break;case"n":if(_.y<=0&&(h<=b||l&&(d<=v||f>=x))){y=!1;break}k("n"),m-=_.y,h+=_.y,m<0&&(c="s",h-=m=-m),l&&(p=m*l,d+=(s.width-p)/2);break;case"w":if(_.x<=0&&(d<=v||l&&(h<=b||g>=w))){y=!1;break}k("w"),p-=_.x,d+=_.x,p<0&&(c="e",d-=p=-p),l&&(m=p/l,h+=(s.height-m)/2);break;case"s":if(_.y>=0&&(g>=w||l&&(d<=v||f>=x))){y=!1;break}k("s"),(m+=_.y)<0&&(c="n",h-=m=-m),l&&(p=m*l,d+=(s.width-p)/2);break;case"ne":if(l){if(_.y<=0&&(h<=b||f>=x)){y=!1;break}k("n"),m-=_.y,h+=_.y,p=m*l}else k("n"),k("e"),_.x>=0?fb&&(m-=_.y,h+=_.y):(m-=_.y,h+=_.y);p<0&&m<0?(c="sw",h-=m=-m,d-=p=-p):p<0?(c="nw",d-=p=-p):m<0&&(c="se",h-=m=-m);break;case"nw":if(l){if(_.y<=0&&(h<=b||d<=v)){y=!1;break}k("n"),m-=_.y,h+=_.y,p=m*l,d+=s.width-p}else k("n"),k("w"),_.x<=0?d>v?(p-=_.x,d+=_.x):_.y<=0&&h<=b&&(y=!1):(p-=_.x,d+=_.x),_.y<=0?h>b&&(m-=_.y,h+=_.y):(m-=_.y,h+=_.y);p<0&&m<0?(c="se",h-=m=-m,d-=p=-p):p<0?(c="ne",d-=p=-p):m<0&&(c="sw",h-=m=-m);break;case"sw":if(l){if(_.x<=0&&(d<=v||g>=w)){y=!1;break}k("w"),p-=_.x,d+=_.x,m=p/l}else k("s"),k("w"),_.x<=0?d>v?(p-=_.x,d+=_.x):_.y>=0&&g>=w&&(y=!1):(p-=_.x,d+=_.x),_.y>=0?g=0&&(f>=x||g>=w)){y=!1;break}k("e"),m=(p+=_.x)/l}else k("s"),k("e"),_.x>=0?f=0&&g>=w&&(y=!1):p+=_.x,_.y>=0?g0?c=_.y>0?"se":"ne":_.x<0&&(d-=p,c=_.y>0?"sw":"nw"),_.y<0&&(h-=m),this.cropped||(Z(this.cropBox,u),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}y&&(s.width=p,s.height=m,s.left=d,s.top=h,this.action=c,this.renderCropBox()),U(r,(function(t){t.startX=t.endX,t.startY=t.endY}))}},Ct={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&V(this.dragBox,g),Z(this.cropBox,u),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=W({},this.initialImageData),this.canvasData=W({},this.initialCanvasData),this.cropBoxData=W({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(W(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Z(this.dragBox,g),V(this.cropBox,u)),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,p)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,V(this.cropper,p)),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,a=i.left,n=i.top;return this.moveTo(O(t)?t:a+Number(t),O(e)?e:n+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(R(t)&&(i.left=t,a=!0),R(e)&&(i.top=e,a=!0),a&&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 a=this.options,n=this.canvasData,o=n.width,s=n.height,r=n.naturalWidth,c=n.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&a.zoomable){var l=r*t,d=c*t;if(!1===nt(this.element,"zoom",{ratio:t,oldRatio:o/r,originalEvent:i}))return this;if(i){var h=this.pointers,p=ot(this.cropper),u=h&&Object.keys(h).length?function(t){var e=0,i=0,a=0;return U(t,(function(t){var n=t.startX,o=t.startY;e+=n,i+=o,a+=1})),{pageX:e/=a,pageY:i/=a}}(h):{pageX:i.pageX,pageY:i.pageY};n.left-=(l-o)*((u.pageX-p.left-n.left)/o),n.top-=(d-s)*((u.pageY-p.top-n.top)/s)}else N(e)&&R(e.x)&&R(e.y)?(n.left-=(l-o)*((e.x-n.left)/o),n.top-=(d-s)*((e.y-n.top)/s)):(n.left-=(l-o)/2,n.top-=(d-s)/2);n.width=l,n.height=d,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return R(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,R(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(R(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(R(t)&&(i.scaleX=t,a=!0),R(e)&&(i.scaleY=e,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,a=this.imageData,n=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){t={x:o.left-n.left,y:o.top-n.top,width:o.width,height:o.height};var s=a.width/a.naturalWidth;if(U(t,(function(e,i){t[i]=e/s})),e){var r=Math.round(t.y+t.height),c=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=c-t.x,t.height=r-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=a.rotate||0),i.scalable&&(t.scaleX=a.scaleX||1,t.scaleY=a.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,a=this.canvasData,n={};if(this.ready&&!this.disabled&&N(t)){var o=!1;e.rotatable&&R(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),e.scalable&&(R(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),R(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var s=i.width/i.naturalWidth;R(t.x)&&(n.left=t.x*s+a.left),R(t.y)&&(n.top=t.y*s+a.top),R(t.width)&&(n.width=t.width*s),R(t.height)&&(n.height=t.height*s),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?W({},this.containerData):{}},getImageData:function(){return this.sized?W({},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&&N(t)&&(R(t.left)&&(e.left=t.left),R(t.top)&&(e.top=t.top),R(t.width)?(e.width=t.width,e.height=t.width/i):R(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,a=this.cropBoxData,n=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&N(t)&&(R(t.left)&&(a.left=t.left),R(t.top)&&(a.top=t.top),R(t.width)&&t.width!==a.width&&(e=!0,a.width=t.width),R(t.height)&&t.height!==a.height&&(i=!0,a.height=t.height),n&&(e?a.height=a.width/n:i&&(a.width=a.height*n)),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=ut(this.image,this.imageData,e,t);if(!this.cropped)return i;var a=this.getData(),n=a.x,o=a.y,r=a.width,c=a.height,l=i.width/Math.floor(e.naturalWidth);1!==l&&(n*=l,o*=l,r*=l,c*=l);var d=r/c,h=pt({aspectRatio:d,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=pt({aspectRatio:d,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=pt({aspectRatio:d,width:t.width||(1!==l?i.width:r),height:t.height||(1!==l?i.height:c)}),m=u.width,f=u.height;m=Math.min(h.width,Math.max(p.width,m)),f=Math.min(h.height,Math.max(p.height,f));var g=document.createElement("canvas"),v=g.getContext("2d");g.width=$(m),g.height=$(f),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,m,f);var b=t.imageSmoothingEnabled,x=void 0===b||b,w=t.imageSmoothingQuality;v.imageSmoothingEnabled=x,w&&(v.imageSmoothingQuality=w);var y,C,_,k,D,M,T=i.width,S=i.height,A=n,B=o;A<=-r||A>T?(A=0,y=0,_=0,D=0):A<=0?(_=-A,A=0,D=y=Math.min(T,r+A)):A<=T&&(_=0,D=y=Math.min(r,T-A)),y<=0||B<=-c||B>S?(B=0,C=0,k=0,M=0):B<=0?(k=-B,B=0,M=C=Math.min(S,c+B)):B<=S&&(k=0,M=C=Math.min(c,S-B));var P=[A,B,y,C];if(D>0&&M>0){var R=m/r;P.push(_*R,k*R,D*R,M*R)}return v.drawImage.apply(v,[i].concat(s(P.map((function(t){return Math.floor($(t))}))))),g},setAspectRatio:function(t){var e=this.options;return this.disabled||O(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,a=this.face;if(this.ready&&!this.disabled){var n="crop"===t,o=e.movable&&"move"===t;t=n||o?t:"none",e.dragMode=t,K(i,b,t),q(i,h,n),q(i,v,o),e.cropBoxMovable||(K(a,b,t),q(a,h,n),q(a,v,o))}return this}},_t=c.Cropper,kt=function(){function t(i){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e(this,t),!i||!A.test(i.tagName))throw new Error("The first argument is required and must be an or element.");this.element=i,this.options=W({},B,N(a)&&a),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 a,n,o;return a=t,o=[{key:"noConflict",value:function(){return window.Cropper=_t,t}},{key:"setDefaults",value:function(t){W(B,N(t)&&t)}}],(n=[{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,a=this.options;if(a.rotatable||a.scalable||(a.checkOrientation=!1),a.checkOrientation&&window.ArrayBuffer)if(T.test(t))S.test(t)?this.read((n=t.replace(ft,""),o=atob(n),s=new ArrayBuffer(o.length),U(r=new Uint8Array(s),(function(t,e){r[e]=o.charCodeAt(e)})),s)):this.clone();else{var n,o,s,r,c=new XMLHttpRequest,l=this.clone.bind(this);this.reloading=!0,this.xhr=c,c.onabort=l,c.onerror=l,c.ontimeout=l,c.onprogress=function(){"image/jpeg"!==c.getResponseHeader("content-type")&&c.abort()},c.onload=function(){e.read(c.response)},c.onloadend=function(){e.reloading=!1,e.xhr=null},a.checkCrossOrigin&&ct(t)&&i.crossOrigin&&(t=lt(t)),c.open("GET",t),c.responseType="arraybuffer",c.withCredentials="use-credentials"===i.crossOrigin,c.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,a=gt(t),n=0,o=1,s=1;if(a>1){this.url=function(t,e){for(var i=[],a=new Uint8Array(t);a.length>0;)i.push(mt.apply(null,H(a.subarray(0,8192)))),a=a.subarray(8192);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}(t,"image/jpeg");var r=function(t){var e=0,i=1,a=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:a=-1;break;case 5:e=90,a=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:a}}(a);n=r.rotate,o=r.scaleX,s=r.scaleY}e.rotatable&&(i.rotate=n),e.scalable&&(i.scaleX=o,i.scaleY=s),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,a=e;this.options.checkCrossOrigin&&ct(e)&&(i||(i="anonymous"),a=lt(e)),this.crossOrigin=i,this.crossOriginUrl=a;var n=document.createElement("img");i&&(n.crossOrigin=i),n.src=a||e,n.alt=t.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),V(n,m),t.parentNode.insertBefore(n,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),a=function(e,i){W(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var n=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){a(n.width,n.height),i||o.removeChild(n)},n.src=e.src,i||(n.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;",o.appendChild(n))}else a(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,a=t.parentNode,n=document.createElement("div");n.innerHTML='
';var o=n.querySelector(".".concat("cropper","-container")),s=o.querySelector(".".concat("cropper","-canvas")),r=o.querySelector(".".concat("cropper","-drag-box")),c=o.querySelector(".".concat("cropper","-crop-box")),l=c.querySelector(".".concat("cropper","-face"));this.container=a,this.cropper=o,this.canvas=s,this.dragBox=r,this.cropBox=c,this.viewBox=o.querySelector(".".concat("cropper","-view-box")),this.face=l,s.appendChild(i),V(t,u),a.insertBefore(o,t.nextSibling),this.isImg||Z(i,m),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,V(c,u),e.guides||V(c.getElementsByClassName("".concat("cropper","-dashed")),u),e.center||V(c.getElementsByClassName("".concat("cropper","-center")),u),e.background&&V(o,"".concat("cropper","-bg")),e.highlight||V(l,f),e.cropBoxMovable&&(V(l,v),K(l,b,"all")),e.cropBoxResizable||(V(c.getElementsByClassName("".concat("cropper","-line")),u),V(c.getElementsByClassName("".concat("cropper","-point")),u)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),z(e.ready)&&at(t,"ready",e.ready,{once:!0}),nt(t,"ready")}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),Z(this.element,u))}},{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()}}])&&i(a.prototype,n),o&&i(a,o),t}();return W(kt.prototype,vt,bt,xt,wt,yt,Ct),kt}()},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},zAc1:function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,"\n.media-drawer-filters[data-v-e110b9d2] {\n\t\toverflow-x: scroll;\n\t\tflex-wrap:unset;\n}\n.media-drawer-filters[data-v-e110b9d2]::-webkit-scrollbar {\n\t\twidth: 0px;\n\t\tbackground: transparent;\n}\n.media-drawer-filters .nav-link[data-v-e110b9d2] {\n\t\tmin-width:100px;\n\t\tpadding-top: 1rem;\n\t\tpadding-bottom: 1rem;\n}\n.media-drawer-filters .active[data-v-e110b9d2] {\n\t\tcolor: #fff;\n\t\tfont-weight: bold;\n}\n@media (hover: none) and (pointer: coarse) {\n.media-drawer-filters[data-v-e110b9d2]::-webkit-scrollbar {\n\t display: none;\n}\n}\n.no-focus[data-v-e110b9d2] {\n\t\tborder-color: none;\n\t\toutline: 0;\n\t\tbox-shadow: none;\n}\na.list-group-item[data-v-e110b9d2] {\n\t\ttext-decoration: none;\n}\na.list-group-item[data-v-e110b9d2]:hover {\n\t\ttext-decoration: none;\n\t\tbackground-color: #f8f9fa !important;\n}\n.compose-action[data-v-e110b9d2]:hover {\n\t\tcursor: pointer;\n\t\tbackground-color: #f8f9fa !important;\n}\n",""])},zlB4:function(t,e,i){"use strict";i.r(e);var a=i("lcPr"),n=i.n(a),o=(i("YQfW"),i("lb/t"));i("i3gq");function s(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var r={components:{VueCropper:n.a,Autocomplete:o.a},data:function(){var t;return s(t={config:window.App.config,pageLoading:!1,profile:{},composeText:"",composeTextLength:0,nsfw:!1,filters:[],currentFilter:!1,ids:[],media:[],carouselCursor:0,uploading:!1,uploadProgress:100,composeType:!1,page:1,composeState:"publish",visibility:"public",visibilityTag:"Public"},"nsfw",!1),s(t,"place",!1),s(t,"commentsDisabled",!1),s(t,"optimizeMedia",!0),s(t,"mediaCropped",!1),s(t,"pageTitle",""),s(t,"cropper",{aspectRatio:1,viewMode:1,zoomable:!0,zoom:0}),s(t,"namedPages",["cropPhoto","tagPeople","addLocation","advancedSettings","visibility","altText","addToCollection","schedulePost","mediaMetadata","addToStory","editMedia","cameraRoll","tagPeopleHelp","textOptions"]),s(t,"cameraRollMedia",[]),s(t,"taggedUsernames",[]),s(t,"taggedPeopleSearch",null),s(t,"textMode",!1),t},beforeMount:function(){this.fetchProfile(),0==this.config.uploader.media_types.includes("video/mp4")&&(this.composeType="post"),this.filters=window.App.util.filters},mounted:function(){this.mediaWatcher()},methods:{fetchProfile:function(){var t=this;window._sharedData.curUser?(t.profile=window._sharedData.curUser,1==t.profile.locked&&(t.visibility="private",t.visibilityTag="Followers Only")):axios.get("/api/pixelfed/v1/accounts/verify_credentials").then((function(e){t.profile=e.data,window.pixelfed.currentUser=e.data,1==e.data.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},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 a=e.type,n=t.config.uploader.media_types.split(",");if(-1==$.inArray(a,n))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 o=new FormData;o.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",o,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=2}),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;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.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(t){case"publish":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 e={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};return void axios.post("/api/compose/v0/publish",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")}},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(){this.composeType="",$("#composeModal").modal("hide")},goBack:function(){switch(this.pageTitle="",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;default:-1!=this.namedPages.indexOf(this.page)?this.page=this.textMode?"addText":3:this.textMode||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){this.place=t,this.pageTitle=this.textMode?"New Text Post":"",this.page=this.textMode?"addText":3},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){this.visibility=t,this.visibilityTag={public:"Public",private:"Followers Only",unlisted:"Unlisted"}[t],this.pageTitle="",this.page=this.textMode?"addText":3},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,a=document.getElementById("pr_canvas"),n=a.getContext("2d"),o=document.getElementById("pr_img"),s=null,r=e.length-1;r>=0;r--)(i=e[r]).filter_class&&(o.src=i.url,o.addEventListener("load",(function(t){a.width=o.width,a.height=o.height,n.filter=App.util.filterCss[i.filter_class],n.drawImage(o,0,0,o.width,o.height),n.save(),a.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),n.clearRect(0,0,o.width,o.height))},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"}}},c=(i("+urK"),i("KHd+")),l=Object(c.a)(r,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("input",{staticClass:"w-100 h-100 d-none file-input",attrs:{type:"file",id:"pf-dz",name:"media",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")])])])])])]):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(e)}}},[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(e)}}},[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(1)]):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(e)}}},[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(" "),i("div",{staticClass:"card-body p-0 border-top"},["textOptions"==t.page?i("div",{staticClass:"w-100 h-100",staticStyle:{"min-height":"280px"}},[t._v("\n\t\t\t\t\t\ttest\n\t\t\t\t\t")]):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 mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark"},[i("div",{staticClass:"card-body",on:{click:function(e){return e.preventDefault(),t.addMedia(e)}}},[i("div",{staticClass:"media"},[t._m(2),t._v(" "),i("div",{staticClass:"media-body text-left"},[t._m(3),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._e(),t._v(" "),1==t.config.ab.top&&0==t.media.length?i("div",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark"},[i("div",{staticClass:"card-body",on:{click:function(e){return e.preventDefault(),t.addText(e)}}},[t._m(4)])]):t._e(),t._v(" "),1==t.config.features.stories?i("a",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark",attrs:{href:"/i/stories/new"}},[t._m(5)]):t._e(),t._v(" "),t._m(6),t._v(" "),t._m(7)])]):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,a){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,a){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=a}}},[i("span",{class:[e.filter_class?e.filter_class:""]},[i("span",{class:"rounded border "+[a==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(" "),a==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(e)}}},[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,a){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("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))])])])])]),t._v(" "),i("div",{staticClass:"border-bottom d-flex justify-content-between px-4 mb-0 py-2 "},[t._m(8),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,a=e.target,n=!!a.checked;if(Array.isArray(i)){var o=t._i(i,null);a.checked?o<0&&(t.nsfw=i.concat([null])):o>-1&&(t.nsfw=i.slice(0,o).concat(i.slice(o+1)))}else t.nsfw=n}}}),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 "),i("span",{staticClass:"ml-2 badge badge-primary"},[t._v("NEW")])])]),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,a){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"+a,disabled:""},domProps:{checked:Array.isArray(e.privacy)?t._i(e.privacy,null)>-1:e.privacy},on:{change:function(i){var a=e.privacy,n=i.target,o=!!n.checked;if(Array.isArray(a)){var s=t._i(a,null);n.checked?s<0&&t.$set(e,"privacy",a.concat([null])):s>-1&&t.$set(e,"privacy",a.slice(0,s).concat(a.slice(s+1)))}else t.$set(e,"privacy",o)}}}),t._v(" "),i("label",{staticClass:"custom-control-label font-weight-bold text-lighter",attrs:{for:"cci-tagged-privacy-switch"+a}},[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(a)}}},[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(9),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,a=e.target,n=!!a.checked;if(Array.isArray(i)){var o=t._i(i,null);a.checked?o<0&&(t.commentsDisabled=i.concat([null])):o>-1&&(t.commentsDisabled=i.slice(0,o).concat(i.slice(o+1)))}else t.commentsDisabled=n}}}),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(10)])])]):t._e(),t._v(" "),"visibility"==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"list-group list-group-flush"},[i("div",{class:"list-group-item lead cursor-pointer "+["public"==t.visibility?"text-primary":""],on:{click:function(e){return t.toggleVisibility("public")}}},[t._v("Public")]),t._v(" "),i("div",{class:"list-group-item lead cursor-pointer "+["unlisted"==t.visibility?"text-primary":""],on:{click:function(e){return t.toggleVisibility("unlisted")}}},[t._v("Unlisted")]),t._v(" "),i("div",{class:"list-group-item lead cursor-pointer "+["private"==t.visibility?"text-primary":""],on:{click:function(e){return t.toggleVisibility("private")}}},[t._v("Followers Only")])])]):t._e(),t._v(" "),"altText"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[t._l(t.media,(function(e,a){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:"140"},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)+"/140")])])]),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"},[i("div",{staticClass:"list-group mb-3"},[i("div",{staticClass:"list-group-item cursor-pointer compose-action border",on:{click:function(e){return t.goBack()}}},[t._m(11)])]),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(" "),"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("input",{directives:[{name:"model",rawName:"v-model",value:t.media[t.carouselCursor].license,expression:"media[carouselCursor].license"}],staticClass:"form-control",attrs:{type:"text",placeholder:"All Rights Reserved (Default license)"},domProps:{value:t.media[t.carouselCursor].license},on:{input:function(e){e.target.composing||t.$set(t.media[t.carouselCursor],"license",e.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text small text-muted mb-0 d-flex justify-content-between"},[i("span"),t._v(" "),i("span",[t._v(t._s(t.media[t.carouselCursor].license?t.media[t.carouselCursor].license.length:0)+"/140")])])])])]),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(" "),"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("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:"fas 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"},[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-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 Photo to Story")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("a",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark",attrs:{href:"/i/collections/create"}},[e("div",{staticClass:"card-body"},[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-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("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",{staticClass:"media"},[e("img",{staticClass:"mr-3",attrs:{src:"",alt:"",width:"50px",height:"50px"}}),this._v(" "),e("div",{staticClass:"media-body"},[e("h5",{staticClass:"mt-0"},[this._v("collection title")]),this._v(" "),e("p",{staticClass:"mb-0 text-muted small"},[this._v("3 Photos - Created 2h ago")])])])}],!1,null,"e110b9d2",null);e.default=l.exports}},[[7,0]]]); \ No newline at end of file diff --git a/public/mix-manifest.json b/public/mix-manifest.json index c2e370196..481945713 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -11,7 +11,7 @@ "/js/collectioncompose.js": "/js/collectioncompose.js?id=c6a07cb79dd7d6c7b8a0", "/js/collections.js": "/js/collections.js?id=6f64a9032085ebac28b3", "/js/components.js": "/js/components.js?id=6a067b7270581d1039cb", - "/js/compose.js": "/js/compose.js?id=6329ab4d5b66c0c25f0d", + "/js/compose.js": "/js/compose.js?id=b896ae7df355994d1f40", "/js/compose-classic.js": "/js/compose-classic.js?id=283f19c895f4118a2a8b", "/js/developers.js": "/js/developers.js?id=f75deca5ccf47d43eb07", "/js/direct.js": "/js/direct.js?id=e1e4a830bfedc1870db1",