pixelfed/public/js/portfolio.js
2024-07-10 00:11:42 -06:00

49 lines
No EOL
58 KiB
JavaScript
Vendored
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([["/js/portfolio"],{"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/PortfolioPost.vue?vue&type=script&lang=js":
/*!**************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/PortfolioPost.vue?vue&type=script&lang=js ***!
\**************************************************************************************************************************************************************************************************************/(t,e,o)=>{function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function r(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */r=function(){return e};var t,e={},o=Object.prototype,n=o.hasOwnProperty,i=Object.defineProperty||function(t,e,o){t[e]=o.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function d(t,e,o){return Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,o){return t[e]=o}}function f(t,e,o,s){var r=e&&e.prototype instanceof y?e:y,n=Object.create(r.prototype),a=new T(s||[]);return i(n,"_invoke",{value:L(t,o,a)}),n}function p(t,e,o){try{return{type:"normal",arg:t.call(e,o)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",v="suspendedYield",m="executing",g="completed",b={};function y(){}function _(){}function w(){}var x={};d(x,l,(function(){return this}));var C=Object.getPrototypeOf,P=C&&C(C(I([])));P&&P!==o&&n.call(P,l)&&(x=P);var j=w.prototype=y.prototype=Object.create(x);function S(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function o(r,i,a,l){var c=p(t[r],t,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==s(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,l)}),(function(t){o("throw",t,a,l)})):e.resolve(d).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,l)}))}l(c.arg)}var r;i(this,"_invoke",{value:function(t,s){function n(){return new e((function(e,r){o(t,s,e,r)}))}return r=r?r.then(n,n):n()}})}function L(e,o,s){var r=h;return function(n,i){if(r===m)throw Error("Generator is already running");if(r===g){if("throw"===n)throw i;return{value:t,done:!0}}for(s.method=n,s.arg=i;;){var a=s.delegate;if(a){var l=O(a,s);if(l){if(l===b)continue;return l}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(r===h)throw r=g,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);r=m;var c=p(e,o,s);if("normal"===c.type){if(r=s.done?g:v,c.arg===b)continue;return{value:c.arg,done:s.done}}"throw"===c.type&&(r=g,s.method="throw",s.arg=c.arg)}}}function O(e,o){var s=o.method,r=e.iterator[s];if(r===t)return o.delegate=null,"throw"===s&&e.iterator.return&&(o.method="return",o.arg=t,O(e,o),"throw"===o.method)||"return"!==s&&(o.method="throw",o.arg=new TypeError("The iterator does not provide a '"+s+"' method")),b;var n=p(r,e.iterator,o.arg);if("throw"===n.type)return o.method="throw",o.arg=n.arg,o.delegate=null,b;var i=n.arg;return i?i.done?(o[e.resultName]=i.value,o.next=e.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,b):i:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,b)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function I(e){if(e||""===e){var o=e[l];if(o)return o.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function o(){for(;++r<e.length;)if(n.call(e,r))return o.value=e[r],o.done=!1,o;return o.value=t,o.done=!0,o};return i.next=i}}throw new TypeError(s(e)+" is not iterable")}return _.prototype=w,i(j,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:_,configurable:!0}),_.displayName=d(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,d(t,u,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(k.prototype),d(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,o,s,r,n){void 0===n&&(n=Promise);var i=new k(f(t,o,s,r),n);return e.isGeneratorFunction(o)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(j),d(j,u,"Generator"),d(j,l,(function(){return this})),d(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),o=[];for(var s in e)o.push(s);return o.reverse(),function t(){for(;o.length;){var s=o.pop();if(s in e)return t.value=s,t.done=!1,t}return t.done=!0,t}},e.values=I,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(R),!e)for(var o in this)"t"===o.charAt(0)&&n.call(this,o)&&!isNaN(+o.slice(1))&&(this[o]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var o=this;function s(s,r){return a.type="throw",a.arg=e,o.next=s,r&&(o.method="next",o.arg=t),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return s("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return s(i.catchLoc,!0);if(this.prev<i.finallyLoc)return s(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return s(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return s(i.finallyLoc)}}}},abrupt:function(t,e){for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o];if(s.tryLoc<=this.prev&&n.call(s,"finallyLoc")&&this.prev<s.finallyLoc){var r=s;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var i=r?r.completion:{};return i.type=t,i.arg=e,r?(this.method="next",this.next=r.finallyLoc,b):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),b},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),R(o),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc===t){var s=o.completion;if("throw"===s.type){var r=s.arg;R(o)}return r}}throw Error("illegal catch attempt")},delegateYield:function(e,o,s){return this.delegate={iterator:I(e),resultName:o,nextLoc:s},"next"===this.method&&(this.arg=t),b}},e}function n(t,e,o,s,r,n,i){try{var a=t[n](i),l=a.value}catch(t){return void o(t)}a.done?e(l):Promise.resolve(l).then(s,r)}o.r(e),o.d(e,{default:()=>i});const i={props:["initialData"],data:function(){return{loading:!0,isAuthed:void 0,user:void 0,settings:void 0,post:void 0,profile:void 0,settingsUrl:window._portfolio.path+"/settings"}},mounted:function(){var t=JSON.parse(this.initialData);this.post=t.post,this.profile=t.profile,this.isAuthed=t.authed,this.fetchUser()},methods:{fetchUser:function(){var t,e=this;return(t=r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isAuthed){t.next=3;break}return t.next=3,axios.get("/api/v1/accounts/verify_credentials").then((function(t){e.user=t.data})).catch((function(t){}));case 3:return t.next=5,axios.get("/api/portfolio/account/settings.json",{params:{id:e.profile.id}}).then((function(t){e.settings=t.data,t.data.hasOwnProperty("background_color")&&e.updateCssVariable("--body-bg",t.data.background_color),t.data.hasOwnProperty("text_color")&&(e.updateCssVariable("--text-color",t.data.text_color),e.updateCssVariable("--link-color",t.data.text_color))})).then((function(){setTimeout((function(){e.loading=!1}),500)}));case 5:case"end":return t.stop()}}),t)})),function(){var e=this,o=arguments;return new Promise((function(s,r){var i=t.apply(e,o);function a(t){n(i,s,r,a,l,"next",t)}function l(t){n(i,s,r,a,l,"throw",t)}a(void 0)}))})()},profileUrl:function(){return"https://".concat(window._portfolio.domain).concat(window._portfolio.path,"/").concat(this.profile.username)},postUrl:function(t){return"/".concat(this.profile.username,"/").concat(t.id)},formatDate:function(t){return new Date(t).toLocaleDateString(void 0,{weekday:"short",year:"numeric",month:"long",day:"numeric"})},updateCssVariable:function(t,e){document.querySelector(":root").style.setProperty(t,e)}}}},"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/PortfolioProfile.vue?vue&type=script&lang=js":
/*!*****************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/PortfolioProfile.vue?vue&type=script&lang=js ***!
\*****************************************************************************************************************************************************************************************************************/(t,e,o)=>{o.r(e),o.d(e,{default:()=>l});o(/*! @fancyapps/fancybox/dist/jquery.fancybox.js */"./node_modules/@fancyapps/fancybox/dist/jquery.fancybox.js"),o(/*! @fancyapps/fancybox/dist/jquery.fancybox.css */"./node_modules/@fancyapps/fancybox/dist/jquery.fancybox.css");var s=o(/*! jquery */"./node_modules/jquery/dist/jquery.js");function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */n=function(){return e};var t,e={},o=Object.prototype,s=o.hasOwnProperty,i=Object.defineProperty||function(t,e,o){t[e]=o.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function d(t,e,o){return Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,o){return t[e]=o}}function f(t,e,o,s){var r=e&&e.prototype instanceof y?e:y,n=Object.create(r.prototype),a=new T(s||[]);return i(n,"_invoke",{value:L(t,o,a)}),n}function p(t,e,o){try{return{type:"normal",arg:t.call(e,o)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",v="suspendedYield",m="executing",g="completed",b={};function y(){}function _(){}function w(){}var x={};d(x,l,(function(){return this}));var C=Object.getPrototypeOf,P=C&&C(C(I([])));P&&P!==o&&s.call(P,l)&&(x=P);var j=w.prototype=y.prototype=Object.create(x);function S(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function o(n,i,a,l){var c=p(t[n],t,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==r(d)&&s.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,l)}),(function(t){o("throw",t,a,l)})):e.resolve(d).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,l)}))}l(c.arg)}var n;i(this,"_invoke",{value:function(t,s){function r(){return new e((function(e,r){o(t,s,e,r)}))}return n=n?n.then(r,r):r()}})}function L(e,o,s){var r=h;return function(n,i){if(r===m)throw Error("Generator is already running");if(r===g){if("throw"===n)throw i;return{value:t,done:!0}}for(s.method=n,s.arg=i;;){var a=s.delegate;if(a){var l=O(a,s);if(l){if(l===b)continue;return l}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(r===h)throw r=g,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);r=m;var c=p(e,o,s);if("normal"===c.type){if(r=s.done?g:v,c.arg===b)continue;return{value:c.arg,done:s.done}}"throw"===c.type&&(r=g,s.method="throw",s.arg=c.arg)}}}function O(e,o){var s=o.method,r=e.iterator[s];if(r===t)return o.delegate=null,"throw"===s&&e.iterator.return&&(o.method="return",o.arg=t,O(e,o),"throw"===o.method)||"return"!==s&&(o.method="throw",o.arg=new TypeError("The iterator does not provide a '"+s+"' method")),b;var n=p(r,e.iterator,o.arg);if("throw"===n.type)return o.method="throw",o.arg=n.arg,o.delegate=null,b;var i=n.arg;return i?i.done?(o[e.resultName]=i.value,o.next=e.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,b):i:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,b)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function I(e){if(e||""===e){var o=e[l];if(o)return o.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function o(){for(;++n<e.length;)if(s.call(e,n))return o.value=e[n],o.done=!1,o;return o.value=t,o.done=!0,o};return i.next=i}}throw new TypeError(r(e)+" is not iterable")}return _.prototype=w,i(j,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:_,configurable:!0}),_.displayName=d(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,d(t,u,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(k.prototype),d(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,o,s,r,n){void 0===n&&(n=Promise);var i=new k(f(t,o,s,r),n);return e.isGeneratorFunction(o)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(j),d(j,u,"Generator"),d(j,l,(function(){return this})),d(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),o=[];for(var s in e)o.push(s);return o.reverse(),function t(){for(;o.length;){var s=o.pop();if(s in e)return t.value=s,t.done=!1,t}return t.done=!0,t}},e.values=I,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(R),!e)for(var o in this)"t"===o.charAt(0)&&s.call(this,o)&&!isNaN(+o.slice(1))&&(this[o]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var o=this;function r(s,r){return a.type="throw",a.arg=e,o.next=s,r&&(o.method="next",o.arg=t),!!r}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=s.call(i,"catchLoc"),c=s.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var o=this.tryEntries.length-1;o>=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&s.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var n=r;break}}n&&("break"===t||"continue"===t)&&n.tryLoc<=e&&e<=n.finallyLoc&&(n=null);var i=n?n.completion:{};return i.type=t,i.arg=e,n?(this.method="next",this.next=n.finallyLoc,b):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),b},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),R(o),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc===t){var s=o.completion;if("throw"===s.type){var r=s.arg;R(o)}return r}}throw Error("illegal catch attempt")},delegateYield:function(e,o,s){return this.delegate={iterator:I(e),resultName:o,nextLoc:s},"next"===this.method&&(this.arg=t),b}},e}function i(t,e,o,s,r,n,i){try{var a=t[n](i),l=a.value}catch(t){return void o(t)}a.done?e(l):Promise.resolve(l).then(s,r)}function a(t){return function(){var e=this,o=arguments;return new Promise((function(s,r){var n=t.apply(e,o);function a(t){i(n,s,r,a,l,"next",t)}function l(t){i(n,s,r,a,l,"throw",t)}a(void 0)}))}}const l={props:["initialData"],data:function(){return{loading:!0,user:void 0,profile:void 0,settings:void 0,feed:[],albumIndex:0,settingsUrl:window._portfolio.path+"/settings"}},mounted:function(){var t=JSON.parse(this.initialData);this.profile=t.profile,this.fetchUser()},methods:{fetchUser:function(){var t=this;return a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return axios.get("/api/v1/accounts/verify_credentials").then((function(e){t.user=e.data})).catch((function(t){})),e.next=3,axios.get("/api/portfolio/account/settings.json",{params:{id:t.profile.id}}).then((function(e){t.settings=e.data,e.data.hasOwnProperty("background_color")&&t.updateCssVariable("--body-bg",e.data.background_color),e.data.hasOwnProperty("text_color")&&(t.updateCssVariable("--text-color",e.data.text_color),t.updateCssVariable("--link-color",e.data.text_color))})).then((function(){t.fetchFeed()}));case 3:case"end":return e.stop()}}),e)})))()},fetchFeed:function(){var t=this;return a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:axios.get("/api/portfolio/"+t.profile.id+"/feed").then((function(e){t.feed=e.data.filter((function(t){return["photo","photo:album"].includes(t.pf_type)}))})).then((function(){t.setAlbumSlide()})).then((function(){setTimeout((function(){t.loading=!1}),500)})).then((function(){"masonry"===t.settings.profile_layout&&setTimeout((function(){t.initMasonry()}),500)})).then((function(){setTimeout((function(){t.bootIntersectors()}),500)})).catch((function(e){t.loading=!1}));case 1:case"end":return e.stop()}}),e)})))()},postUrl:function(t){return"".concat(window._portfolio.path,"/").concat(this.profile.username,"/").concat(t.id)},albumPrev:function(){if(0!==this.albumIndex){if(1===this.albumIndex){this.albumIndex--;var t=new URL(window.location);return t.searchParams.delete("slide"),void window.history.pushState({},"",t)}this.albumIndex--;var e=new URL(window.location);e.searchParams.set("slide",this.albumIndex+1),window.history.pushState({},"",e)}},albumNext:function(){if(this.albumIndex!==this.feed.length-1){this.albumIndex++;var t=new URL(window.location);t.searchParams.set("slide",this.albumIndex+1),window.history.pushState({},"",t)}},setAlbumSlide:function(){var t=new URL(window.location);if(t.searchParams.has("slide")){var e=Number.parseInt(t.searchParams.get("slide"));if(Number.isNaN(e))return;if(e<=0)return;if(e>this.feed.length)return;this.albumIndex=t.searchParams.get("slide")-1}},initMasonry:function(){s('[data-fancybox="recent"]').fancybox({gutter:20,modal:!1})},updateCssVariable:function(t,e){document.querySelector(":root").style.setProperty(t,e)},bootIntersectors:function(){var t=[].slice.call(document.querySelectorAll("img.img-placeholder"));if("IntersectionObserver"in window){var e=new IntersectionObserver((function(t,o){t.forEach((function(t){if(t.isIntersecting){var o=t.target;o.src=o.dataset.src,o.style.zIndex=2,o.classList.remove("img-placeholder"),e.unobserve(o)}}))}));t.forEach((function(t){e.observe(t)}))}else t.forEach((function(t){t.src=t.dataset.src,t.style.zIndex=2}))}}}},"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/PortfolioSettings.vue?vue&type=script&lang=js":
/*!******************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/PortfolioSettings.vue?vue&type=script&lang=js ***!
\******************************************************************************************************************************************************************************************************************/(t,e,o)=>{o.r(e),o.d(e,{default:()=>s});const s={data:function(){return{loading:!0,tabIndex:"Configure",tabs:["Configure","Customize","View Portfolio"],user:void 0,settings:void 0,recentPostsLoaded:!1,rpStart:0,recentPosts:[],recentPostsPage:void 0,selectedRecentPosts:[],isSavingCurated:!1,canSaveCurated:!1,customizeSettings:[],skipWatch:!1,profileSourceOptions:[{value:null,text:"Please select an option",disabled:!0},{value:"recent",text:"Most recent posts"}],profileLayoutOptions:[{value:null,text:"Please select an option",disabled:!0},{value:"grid",text:"Grid"},{value:"masonry",text:"Masonry"},{value:"album",text:"Album"}],profileLayoutColorSchemeOptions:[{value:null,text:"Please select an option",disabled:!0},{value:"light",text:"Light mode"},{value:"dark",text:"Dark mode"},{value:"custom",text:"Custom color scheme",disabled:!0}],profileLayoutFeedOrder:[{value:"oldest",text:"Oldest first"},{value:"recent",text:"Recent first"}]}},computed:{prevClass:function(){return 0===this.rpStart?"fa fa-arrow-circle-left fa-3x text-dark":"fa fa-arrow-circle-left fa-3x text-muted cursor-pointer"},nextClass:function(){return this.rpStart>this.recentPosts.length-9?"fa fa-arrow-circle-right fa-3x text-dark":"fa fa-arrow-circle-right fa-3x text-muted cursor-pointer"}},watch:{settings:{deep:!0,immediate:!0,handler:function(t,e){this.loading||this.skipWatch||(e.show_timestamp||(this.settings.show_link=!1),this.updateSettings())}}},mounted:function(){this.fetchUser()},methods:{fetchUser:function(){var t=this;axios.get("/api/v1/accounts/verify_credentials").then((function(e){t.user=e.data,e.data.statuses_count>0?t.profileSourceOptions=[{value:null,text:"Please select an option",disabled:!0},{value:"recent",text:"Most recent posts"},{value:"custom",text:"Curated posts"}]:setTimeout((function(){t.settings.active=!1,t.settings.profile_source="recent",t.tabIndex="Configure"}),1e3)})),axios.post(this.apiPath("/api/portfolio/self/settings.json")).then((function(e){t.settings=e.data,t.updateTabs(),e.data.metadata&&e.data.metadata.posts&&(t.selectedRecentPosts=e.data.metadata.posts),"dark"!=e.data.color_scheme&&("light"===e.data.color_scheme?t.updateBackgroundColor("#ffffff"):(e.data.hasOwnProperty("background_color")&&t.updateBackgroundColor(e.data.background_color),e.data.hasOwnProperty("text_color")&&t.updateTextColor(e.data.text_color)))})).then((function(){t.initCustomizeSettings()})).then((function(){var e=new URL(window.location);if(e.searchParams.has("tab")){var o=e.searchParams.get("tab");-1!==("custom"===t.settings.profile_source?["curate","customize","share"]:["customize","share"]).indexOf(o)&&t.toggleTab(o.slice(0,1).toUpperCase()+o.slice(1))}})).then((function(){setTimeout((function(){t.loading=!1}),500)}))},apiPath:function(t){return t},toggleTab:function(t){if("Curate"!==t||this.recentPostsLoaded||this.loadRecentPosts(),this.tabIndex=t,this.rpStart=0,"Configure"==t){var e=new URL(window.location);e.searchParams.delete("tab"),window.history.pushState({},"",e)}else{if("View Portfolio"==t)return this.tabIndex="Configure",void(window.location.href="https://".concat(window._portfolio.domain).concat(window._portfolio.path,"/").concat(this.user.username));var o=new URL(window.location);o.searchParams.set("tab",t.toLowerCase()),window.history.pushState({},"",o)}},updateTabs:function(){"custom"===this.settings.profile_source?this.tabs=["Configure","Curate","Customize","View Portfolio"]:this.tabs=["Configure","Customize","View Portfolio"]},updateSettings:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.skipWatch||axios.post(this.apiPath("/api/portfolio/self/update-settings.json"),this.settings).then((function(o){t.updateTabs(),e||t.$bvToast.toast("Your settings have been successfully updated!",{variant:"dark",title:"Settings Updated",autoHideDelay:2e3,appendToast:!1})}))},loadRecentPosts:function(){var t=this;axios.get("/api/v1/accounts/"+this.user.id+"/statuses?only_media=1&media_types=photo&limit=100&_pe=1").then((function(e){e.data.length&&(t.recentPosts=e.data.filter((function(t){return["photo","photo:album"].includes(t.pf_type)&&"public"===t.visibility})))})).then((function(){setTimeout((function(){t.recentPostsLoaded=!0}),500)}))},toggleRecentPost:function(t){if(-1==this.selectedRecentPosts.indexOf(t)){if(100===this.selectedRecentPosts.length)return;this.selectedRecentPosts.push(t)}else this.selectedRecentPosts=this.selectedRecentPosts.filter((function(e){return e!==t}));this.canSaveCurated=!0},recentPostsPrev:function(){0!==this.rpStart&&(this.rpStart=this.rpStart-9)},recentPostsNext:function(){this.rpStart>this.recentPosts.length-9||(this.rpStart=this.rpStart+9)},clearSelected:function(){this.selectedRecentPosts=[]},saveCurated:function(){var t,e=this;this.isSavingCurated=!0,null===(t=event.currentTarget)||void 0===t||t.blur(),axios.post("/api/portfolio/self/curated.json",{ids:this.selectedRecentPosts}).then((function(t){e.isSavingCurated=!1,e.$bvToast.toast("Your curated posts have been updated!",{variant:"dark",title:"Portfolio Updated",autoHideDelay:2e3,appendToast:!1})})).catch((function(t){e.isSavingCurated=!1,e.$bvToast.toast("An error occured while attempting to update your portfolio, please try again later and contact an admin if this problem persists.",{variant:"dark",title:"Error",autoHideDelay:2e3,appendToast:!1})}))},initCustomizeSettings:function(){this.customizeSettings=[{title:"Post Settings",items:[{label:"Show Captions",model:"show_captions"},{label:"Show License",model:"show_license"},{label:"Show Location",model:"show_location"},{label:"Show Timestamp",model:"show_timestamp"},{label:"Link to Post",description:"Add link to timestamp to view the original post url, requires show timestamp to be enabled",model:"show_link",requiredWithTrue:"show_timestamp"}]},{title:"Profile Settings",items:[{label:"Show Avatar",model:"show_avatar"},{label:"Show Bio",model:"show_bio"},{label:"Show View Profile Button",model:"show_profile_button"},{label:"Enable RSS Feed",description:"Enable your RSS feed with the 10 most recent portfolio items",model:"rss_enabled"},{label:"Show RSS Feed Button",model:"show_rss_button",requiredWithTrue:"rss_enabled"}]}]},updateBackgroundColor:function(t){var e=this;this.skipWatch=!0,document.querySelector(":root").style.setProperty("--body-bg",t),"#000000"!==t&&"#ffffff"!==t&&(this.settings.color_scheme="custom"),this.$nextTick((function(){e.skipWatch=!1}))},updateTextColor:function(t){var e=this;this.skipWatch=!0,document.querySelector(":root").style.setProperty("--text-color",t),"#d4d4d8"!==t&&(this.settings.color_scheme="custom"),this.$nextTick((function(){e.skipWatch=!1}))},resetBackgroundColor:function(){var t=this;this.skipWatch=!0,this.$nextTick((function(){t.updateBackgroundColor("#000000"),t.settings.color_scheme="dark",t.settings.background_color="#000000",t.updateSettings(!0),setTimeout((function(){t.skipWatch=!1}),1e3)}))},resetTextColor:function(){var t=this;this.skipWatch=!0,this.$nextTick((function(){t.updateTextColor("#d4d4d8"),t.settings.color_scheme="dark",t.settings.text_color="#d4d4d8",t.updateSettings(!0),setTimeout((function(){t.skipWatch=!1}),1e3)}))},updateColorScheme:function(t){"light"===t&&this.updateBackgroundColor("#ffffff"),"dark"===t&&this.updateBackgroundColor("#000000")},getPreviewUrl:function(t){var e=t.media_attachments[0];return e?e.preview_url&&!e.preview_url.endsWith("/no-preview.png")?e.preview_url:e.url:"/storage/no-preview.png"}}}},"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/PortfolioPost.vue?vue&type=template&id=0a982161":
/*!*************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/PortfolioPost.vue?vue&type=template&id=0a982161 ***!
\*************************************************************************************************************************************************************************************************************************************************************************************************/(t,e,o)=>{o.r(e),o.d(e,{render:()=>s,staticRenderFns:()=>r});var s=function(){var t=this,e=t._self._c;return e("div",[t.loading?e("div",{staticClass:"container"},[e("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{height:"100vh"}},[e("b-spinner")],1)]):e("div",[e("div",{staticClass:"container mb-5"},[e("div",{staticClass:"row mt-3"},[e("div",{staticClass:"col-12 mb-4"},[e("div",{staticClass:"d-flex justify-content-center"},[e("img",{staticClass:"img-fluid mb-4",staticStyle:{"max-height":"80vh","object-fit":"contain"},attrs:{src:t.post.media_attachments[0].url}})])]),t._v(" "),e("div",{staticClass:"col-12 mb-4"},[t.settings.show_captions&&t.post.content_text?e("p",[t._v(t._s(t.post.content_text))]):t._e(),t._v(" "),e("div",{staticClass:"d-md-flex justify-content-between align-items-center"},[e("p",{staticClass:"small"},[t._v("by "),e("a",{staticClass:"font-weight-bold link-color",attrs:{href:t.profileUrl()}},[t._v("@"+t._s(t.profile.username))])]),t._v(" "),t.settings.show_license&&t.post.media_attachments[0].license?e("p",{staticClass:"small"},[t._v("Licensed under "+t._s(t.post.media_attachments[0].license.title))]):t._e(),t._v(" "),t.settings.show_location&&t.post.place?e("p",{staticClass:"small text-muted"},[t._v(t._s(t.post.place.name)+", "+t._s(t.post.place.country))]):t._e(),t._v(" "),t.settings.show_timestamp?e("p",{staticClass:"small"},[t.settings.show_link?e("a",{staticClass:"font-weight-bold link-color",staticStyle:{"z-index":"2"},attrs:{href:t.post.url}},[t._v("\n "+t._s(t.formatDate(t.post.created_at))+"\n ")]):e("span",{staticClass:"user-select-none"},[t._v("\n "+t._s(t.formatDate(t.post.created_at))+"\n ")])]):t._e()])])])]),t._v(" "),e("div",{staticClass:"container"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-12"},[e("div",{staticClass:"d-flex fixed-bottom p-3 justify-content-between align-items-center"},[t.user?e("a",{staticClass:"logo-mark logo-mark-sm mb-0 p-1",attrs:{href:"/"}},[e("span",{staticClass:"text-gradient-primary"},[t._v("portfolio")])]):e("span",{staticClass:"logo-mark logo-mark-sm mb-0 p-1"},[e("span",{staticClass:"text-gradient-primary"},[t._v("portfolio")])]),t._v(" "),t.user&&t.user.id===t.profile.id?e("p",{staticClass:"text-center mb-0"},[e("a",{staticClass:"text-muted",attrs:{href:t.settingsUrl}},[e("i",{staticClass:"far fa-cog fa-lg"})])]):t._e()])])])])])])},r=[];s._withStripped=!0},"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/PortfolioProfile.vue?vue&type=template&id=4bd60610":
/*!****************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/PortfolioProfile.vue?vue&type=template&id=4bd60610 ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************/(t,e,o)=>{o.r(e),o.d(e,{render:()=>s,staticRenderFns:()=>r});var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"w-100 h-100"},[t.loading?e("div",{staticClass:"container"},[e("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{height:"100vh"}},[e("b-spinner")],1)]):e("div",{staticClass:"container"},[e("div",{staticClass:"row py-5"},[e("div",{staticClass:"col-12"},[e("div",{staticClass:"d-flex align-items-center flex-column"},[t.settings.show_avatar?e("img",{staticClass:"rounded-circle shadow",attrs:{src:t.profile.avatar,width:"60",height:"60",onerror:"this.src='/storage/avatars/default.png?v=0';this.onerror=null;"}}):t._e(),t._v(" "),e("div",{staticClass:"py-3 text-center",staticStyle:{"max-width":"60%"}},[e("h1",{staticClass:"font-weight-bold"},[t._v(t._s(t.profile.username))]),t._v(" "),t.settings.show_bio?e("p",{staticClass:"font-weight-light mb-0 text-break"},[t._v(t._s(t.profile.note_text))]):t._e()]),t._v(" "),t.settings.show_profile_button||t.settings.rss_enabled&&t.settings.show_rss_button?e("div",{staticClass:"pb-3 text-center d-flex flex-column flex-sm-row",staticStyle:{"max-width":"60%",gap:"1rem"}},[t.settings.show_profile_button?e("a",{staticClass:"btn btn-outline-primary btn-custom-color",attrs:{href:t.profile.url,target:"_blank"}},[t._v("\n \t\tView Profile\n \t")]):t._e(),t._v(" "),t.settings.rss_enabled&&t.settings.show_rss_button?e("a",{staticClass:"btn btn-outline-primary btn-custom-color",attrs:{href:t.settings.rss_feed_url,target:"_blank"}},[e("i",{staticClass:"far fa-rss"}),t._v("   RSS\n \t")]):t._e()]):t._e()])])]),t._v(" "),e("div",{staticClass:"container mb-5 pb-5"},[e("div",{class:["masonry"===t.settings.profile_layout?"card-columns":"row"],attrs:{id:"portContainer"}},["grid"===t.settings.profile_layout?t._l(t.feed,(function(o,s){return e("div",{staticClass:"col-12 col-md-4 mb-1 p-1"},[e("div",{staticClass:"square"},[e("a",{attrs:{href:t.postUrl(o)}},[e("div",{staticClass:"lazy-img"},[e("blur-hash-canvas",{staticClass:"square-content pr-1",attrs:{width:"32",height:"32",hash:o.media_attachments[0].blurhash}}),t._v(" "),e("img",{staticClass:"square-content pr-1 img-placeholder",staticStyle:{overflow:"hidden","object-fit":"cover","z-index":"-1"},attrs:{src:"","data-src":o.media_attachments[0].url,width:"100%",height:"300",loading:"lazy"}})],1)])])])})):"album"===t.settings.profile_layout?e("div",{staticClass:"col-12 mb-1 p-1"},[e("div",{staticClass:"d-flex justify-content-center"},[e("p",{staticClass:"text-color font-weight-bold"},[t._v(t._s(t.albumIndex+1)+" "),e("span",{staticClass:"font-weight-light"},[t._v("/")]),t._v(" "+t._s(t.feed.length))])]),t._v(" "),e("div",{staticClass:"d-flex justify-content-between align-items-center"},[0===t.albumIndex?e("span",[e("i",{staticClass:"fa fa-arrow-circle-left fa-3x text-color-lighter"})]):e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.albumPrev()}}},[e("i",{staticClass:"fa fa-arrow-circle-left fa-3x text-color"})]),t._v(" "),e("transition",{attrs:{name:"slide-fade"}},[e("a",{key:t.albumIndex,staticClass:"mx-4",attrs:{href:t.postUrl(t.feed[t.albumIndex])}},[e("img",{staticClass:"user-select-none",staticStyle:{height:"60vh",overflow:"hidden","object-fit":"contain"},attrs:{src:t.feed[t.albumIndex].media_attachments[0].url,width:"100%",draggable:!1}})])]),t._v(" "),t.albumIndex===t.feed.length-1?e("span",[e("i",{staticClass:"fa fa-arrow-circle-right fa-3x text-color-lighter"})]):e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.albumNext()}}},[e("i",{staticClass:"fa fa-arrow-circle-right fa-3x text-color"})])],1)]):"masonry"===t.settings.profile_layout?e("div",{staticClass:"col-12 p-0 m-0"},t._l(t.feed,(function(o,s){return e("div",{staticClass:"p-1"},[e("a",{attrs:{href:t.postUrl(o),"data-fancybox":"recent","data-src":o.media_attachments[0].url,"data-width":o.media_attachments[0].width,"data-height":o.media_attachments[0].height}},[e("img",{staticClass:"user-select-none",staticStyle:{overflow:"hidden","object-fit":"contain"},attrs:{src:o.media_attachments[0].url,width:"100%",draggable:!1}})])])})),0):t._e()],2)]),t._v(" "),e("div",{staticClass:"d-flex fixed-bottom p-3 justify-content-between align-items-center"},[t.user?e("a",{staticClass:"logo-mark logo-mark-sm mb-0 p-1",attrs:{href:"/"}},[e("span",{staticClass:"text-gradient-primary"},[t._v("portfolio")])]):e("span",{staticClass:"logo-mark logo-mark-sm mb-0 p-1"},[e("span",{staticClass:"text-gradient-primary"},[t._v("portfolio")])]),t._v(" "),t.user&&t.user.id==t.profile.id?e("p",{staticClass:"text-center mb-0"},[e("a",{staticClass:"link-color",attrs:{href:t.settingsUrl}},[e("i",{staticClass:"far fa-cog fa-lg"})])]):t._e()])])])},r=[];s._withStripped=!0},"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/PortfolioSettings.vue?vue&type=template&id=42118ee4":
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/PortfolioSettings.vue?vue&type=template&id=42118ee4 ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************/(t,e,o)=>{o.r(e),o.d(e,{render:()=>s,staticRenderFns:()=>r});var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"portfolio-settings px-3"},[t.loading?e("div",{staticClass:"d-flex justify-content-center align-items-center py-5"},[e("b-spinner",{attrs:{variant:"primary"}})],1):e("div",{staticClass:"row justify-content-center mb-5 pb-5"},[e("div",{staticClass:"col-12 col-md-8 bg-dark py-2 rounded"},[e("ul",{staticClass:"nav nav-pills nav-fill"},t._l(t.tabs,(function(o,s){return e("li",{staticClass:"nav-item",class:{disabled:0!==s&&!t.settings.active}},[0===s||t.settings.active?e("a",{staticClass:"nav-link",class:{active:o===t.tabIndex},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.toggleTab(o)}}},[t._v(t._s(o))]):e("span",{staticClass:"nav-link"},[t._v(t._s(o))])])})),0)]),t._v(" "),e("transition",{attrs:{name:"slide-fade"}},["Configure"===t.tabIndex?e("div",{key:"0",staticClass:"col-12 col-md-8 bg-dark mt-3 py-2 rounded"},[t.user.statuses_count?t._e():e("div",{staticClass:"alert alert-danger"},[e("p",{staticClass:"mb-0 small font-weight-bold"},[t._v("You don't have any public posts, once you share public posts you can enable your portfolio.")])]),t._v(" "),e("div",{staticClass:"d-flex justify-content-between align-items-center py-2"},[e("div",{staticClass:"setting-label"},[e("p",{staticClass:"lead mb-0"},[t._v("Portfolio Enabled")]),t._v(" "),e("p",{staticClass:"small mb-0 text-muted"},[t._v("You must enable your portfolio before you or anyone can view it.")])]),t._v(" "),e("div",{staticClass:"setting-switch mt-n1"},[e("b-form-checkbox",{attrs:{name:"check-button",size:"lg",switch:"",disabled:!t.user.statuses_count},model:{value:t.settings.active,callback:function(e){t.$set(t.settings,"active",e)},expression:"settings.active"}})],1)]),t._v(" "),e("hr"),t._v(" "),e("div",{staticClass:"d-flex justify-content-between align-items-center py-2"},[e("div",{staticClass:"setting-label",staticStyle:{"max-width":"50%"}},[e("p",{staticClass:"mb-0"},[t._v("Portfolio Source")]),t._v(" "),e("p",{staticClass:"small mb-0 text-muted"},[t._v("Choose how you want to populate your portfolio, select Most Recent posts to automatically update your portfolio with recent posts or Curated Posts to select specific posts for your portfolio.")])]),t._v(" "),e("div",{staticClass:"ml-3"},[e("b-form-select",{attrs:{options:t.profileSourceOptions,disabled:!t.user.statuses_count},model:{value:t.settings.profile_source,callback:function(e){t.$set(t.settings,"profile_source",e)},expression:"settings.profile_source"}})],1)])]):"Curate"===t.tabIndex?e("div",{key:"1",staticClass:"col-12 col-md-8 mt-3 py-2 px-0"},[t.recentPostsLoaded?[e("div",{staticClass:"mt-n2 mb-4"},[e("p",{staticClass:"text-muted small"},[t._v("Select up to 100 photos from your 100 most recent posts. You can only select public photo posts, videos are not supported at this time.")]),t._v(" "),e("div",{staticClass:"d-flex align-items-center justify-content-between"},[e("p",{staticClass:"font-weight-bold mb-0"},[t._v("Selected "+t._s(t.selectedRecentPosts.length)+"/100")]),t._v(" "),e("div",[e("button",{staticClass:"btn btn-link font-weight-bold mr-3 text-decoration-none",attrs:{disabled:!t.selectedRecentPosts.length},on:{click:t.clearSelected}},[t._v("\n Clear selected\n ")]),t._v(" "),e("button",{staticClass:"btn btn-primary py-0 font-weight-bold",staticStyle:{width:"150px"},attrs:{disabled:!t.canSaveCurated},on:{click:function(e){return t.saveCurated()}}},[t.isSavingCurated?e("b-spinner",{attrs:{small:""}}):[t._v("Save")]],2)])])]),t._v(" "),e("div",{staticClass:"d-flex justify-content-between align-items-center"},[e("span",{on:{click:t.recentPostsPrev}},[e("i",{class:t.prevClass})]),t._v(" "),e("div",{staticClass:"row flex-grow-1 mx-2"},t._l(t.recentPosts.slice(t.rpStart,t.rpStart+9),(function(o,s){return e("div",{staticClass:"col-12 col-md-4 mb-1 p-1"},[e("div",{staticClass:"square user-select-none",on:{click:function(e){return e.preventDefault(),t.toggleRecentPost(o.id)}}},[e("transition",{attrs:{name:"fade"}},[e("img",{key:o.id,staticClass:"square-content pr-1",staticStyle:{overflow:"hidden","object-fit":"cover"},attrs:{src:t.getPreviewUrl(o),width:"100%",height:"300",draggable:!1,loading:"lazy",onerror:"this.src='/storage/no-preview.png';this.onerror=null;"}})]),t._v(" "),-1!==t.selectedRecentPosts.indexOf(o.id)?e("div",{staticStyle:{position:"absolute",right:"-5px",bottom:"-5px"}},[e("div",{staticClass:"selected-badge"},[t._v(t._s(t.selectedRecentPosts.indexOf(o.id)+1))])]):t._e()],1)])})),0),t._v(" "),e("span",{on:{click:function(e){return t.recentPostsNext()}}},[e("i",{class:t.nextClass})])])]:e("div",{staticClass:"d-flex align-items-center justify-content-center py-5 my-5"},[e("div",{staticClass:"text-center"},[e("div",{staticClass:"spinner-border",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[t._v("Loading...")])]),t._v(" "),e("p",{staticClass:"text-muted"},[t._v("Loading recent posts...")])])])],2):"Customize"===t.tabIndex?e("div",{key:"2",staticClass:"col-12 mt-3 py-2"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},t._l(t.customizeSettings,(function(o){return e("div",{staticClass:"card bg-dark mb-5"},[e("div",{staticClass:"card-header"},[t._v(t._s(o.title))]),t._v(" "),e("div",{staticClass:"list-group bg-dark"},t._l(o.items,(function(o){return e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"d-flex justify-content-between align-items-center py-2"},[e("div",{staticClass:"setting-label"},[e("p",{staticClass:"mb-0"},[t._v(t._s(o.label))]),t._v(" "),o.description?e("p",{staticClass:"small text-muted mb-0"},[t._v(t._s(o.description))]):t._e()]),t._v(" "),e("div",{staticClass:"setting-switch mt-n1"},[e("b-form-checkbox",{attrs:{name:"check-button",size:"lg",switch:"",disabled:o.requiredWithTrue&&!t.settings[o.requiredWithTrue]},model:{value:t.settings[o.model],callback:function(e){t.$set(t.settings,o.model,e)},expression:"settings[item.model]"}})],1)])])})),0)])})),0),t._v(" "),e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card bg-dark mb-5"},[e("div",{staticClass:"card-header"},[t._v("Portfolio")]),t._v(" "),e("div",{staticClass:"list-group bg-dark"},[e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"d-flex justify-content-between align-items-center py-2"},[e("div",{staticClass:"setting-label"},[e("p",{staticClass:"mb-0"},[t._v("Layout")])]),t._v(" "),e("div",[e("b-form-select",{attrs:{options:t.profileLayoutOptions},model:{value:t.settings.profile_layout,callback:function(e){t.$set(t.settings,"profile_layout",e)},expression:"settings.profile_layout"}})],1)])]),t._v(" "),"custom"===t.settings.profile_source?e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"d-flex justify-content-between align-items-center py-2"},[e("div",{staticClass:"setting-label"},[e("p",{staticClass:"mb-0"},[t._v("Order")])]),t._v(" "),e("div",[e("b-form-select",{attrs:{options:t.profileLayoutFeedOrder},model:{value:t.settings.feed_order,callback:function(e){t.$set(t.settings,"feed_order",e)},expression:"settings.feed_order"}})],1)])]):t._e(),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"d-flex justify-content-between align-items-center py-2"},[e("div",{staticClass:"setting-label"},[e("p",{staticClass:"mb-0"},[t._v("Color Scheme")])]),t._v(" "),e("div",[e("b-form-select",{attrs:{options:t.profileLayoutColorSchemeOptions,disabled:"custom"===t.settings.color_scheme},on:{change:t.updateColorScheme},model:{value:t.settings.color_scheme,callback:function(e){t.$set(t.settings,"color_scheme",e)},expression:"settings.color_scheme"}})],1)])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"d-flex justify-content-between align-items-center py-2"},[e("div",{staticClass:"setting-label"},[e("p",{staticClass:"mb-0"},[t._v("Background Color")])]),t._v(" "),e("b-col",{attrs:{sm:"2"}},[e("b-form-input",{attrs:{debounce:"1000",type:"color"},on:{change:t.updateBackgroundColor},model:{value:t.settings.background_color,callback:function(e){t.$set(t.settings,"background_color",e)},expression:"settings.background_color"}}),t._v(" "),["#000000",null].includes(t.settings.background_color)?t._e():e("b-button",{attrs:{variant:"link"},on:{click:t.resetBackgroundColor}},[t._v("\n\t\t \t\t\tReset\n\t\t \t\t")])],1)],1)]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"d-flex justify-content-between align-items-center py-2"},[e("div",{staticClass:"setting-label"},[e("p",{staticClass:"mb-0"},[t._v("Text Color")])]),t._v(" "),e("b-col",{attrs:{sm:"2"}},[e("b-form-input",{attrs:{debounce:"1000",type:"color"},on:{change:t.updateTextColor},model:{value:t.settings.text_color,callback:function(e){t.$set(t.settings,"text_color",e)},expression:"settings.text_color"}}),t._v(" "),["#d4d4d8",null].includes(t.settings.text_color)?t._e():e("b-button",{attrs:{variant:"link"},on:{click:t.resetTextColor}},[t._v("\n\t\t \t\t\tReset\n\t\t \t\t")])],1)],1)])])])])])]):"Share"===t.tabIndex?e("div",{key:"3",staticClass:"col-12 col-md-8 bg-dark mt-3 py-2 rounded"},[e("div",{staticClass:"py-2"},[e("p",{staticClass:"text-muted"},[t._v("Portfolio URL")]),t._v(" "),e("p",{staticClass:"lead mb-0"},[e("a",{attrs:{href:t.settings.url}},[t._v(t._s(t.settings.url))])])])]):t._e()])],1)])},r=[];s._withStripped=!0},"./resources/assets/js/portfolio.js":
/*!******************************************!*\
!*** ./resources/assets/js/portfolio.js ***!
\******************************************/(t,e,o)=>{o.r(e);var s=o(/*! vue */"./node_modules/vue/dist/vue.esm.js"),r=o(/*! bootstrap-vue */"./node_modules/bootstrap-vue/esm/index.js"),n=o(/*! vue-blurhash */"./node_modules/vue-blurhash/dist/vue-blurhash.common.js"),i=o.n(n);o(/*! vue-blurhash/dist/vue-blurhash.css */"./node_modules/vue-blurhash/dist/vue-blurhash.css");window.Vue=s.default,s.default.use(r.default),s.default.use(i()),s.default.component("portfolio-post",o(/*! ./components/PortfolioPost.vue */"./resources/assets/js/components/PortfolioPost.vue").default),s.default.component("portfolio-profile",o(/*! ./components/PortfolioProfile.vue */"./resources/assets/js/components/PortfolioProfile.vue").default),s.default.component("portfolio-settings",o(/*! ./components/PortfolioSettings.vue */"./resources/assets/js/components/PortfolioSettings.vue").default)},"./resources/assets/js/components/PortfolioPost.vue":
/*!**********************************************************!*\
!*** ./resources/assets/js/components/PortfolioPost.vue ***!
\**********************************************************/(t,e,o)=>{o.r(e),o.d(e,{default:()=>a});var s=o(/*! ./PortfolioPost.vue?vue&type=template&id=0a982161 */"./resources/assets/js/components/PortfolioPost.vue?vue&type=template&id=0a982161"),r=o(/*! ./PortfolioPost.vue?vue&type=script&lang=js */"./resources/assets/js/components/PortfolioPost.vue?vue&type=script&lang=js"),n={};for(const t in r)"default"!==t&&(n[t]=()=>r[t]);o.d(e,n);var i=(0,o(/*! !../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */"./node_modules/vue-loader/lib/runtime/componentNormalizer.js").default)(r.default,s.render,s.staticRenderFns,!1,null,null,null);i.options.__file="resources/assets/js/components/PortfolioPost.vue";const a=i.exports},"./resources/assets/js/components/PortfolioProfile.vue":
/*!*************************************************************!*\
!*** ./resources/assets/js/components/PortfolioProfile.vue ***!
\*************************************************************/(t,e,o)=>{o.r(e),o.d(e,{default:()=>a});var s=o(/*! ./PortfolioProfile.vue?vue&type=template&id=4bd60610 */"./resources/assets/js/components/PortfolioProfile.vue?vue&type=template&id=4bd60610"),r=o(/*! ./PortfolioProfile.vue?vue&type=script&lang=js */"./resources/assets/js/components/PortfolioProfile.vue?vue&type=script&lang=js"),n={};for(const t in r)"default"!==t&&(n[t]=()=>r[t]);o.d(e,n);var i=(0,o(/*! !../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */"./node_modules/vue-loader/lib/runtime/componentNormalizer.js").default)(r.default,s.render,s.staticRenderFns,!1,null,null,null);i.options.__file="resources/assets/js/components/PortfolioProfile.vue";const a=i.exports},"./resources/assets/js/components/PortfolioSettings.vue":
/*!**************************************************************!*\
!*** ./resources/assets/js/components/PortfolioSettings.vue ***!
\**************************************************************/(t,e,o)=>{o.r(e),o.d(e,{default:()=>a});var s=o(/*! ./PortfolioSettings.vue?vue&type=template&id=42118ee4 */"./resources/assets/js/components/PortfolioSettings.vue?vue&type=template&id=42118ee4"),r=o(/*! ./PortfolioSettings.vue?vue&type=script&lang=js */"./resources/assets/js/components/PortfolioSettings.vue?vue&type=script&lang=js"),n={};for(const t in r)"default"!==t&&(n[t]=()=>r[t]);o.d(e,n);var i=(0,o(/*! !../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */"./node_modules/vue-loader/lib/runtime/componentNormalizer.js").default)(r.default,s.render,s.staticRenderFns,!1,null,null,null);i.options.__file="resources/assets/js/components/PortfolioSettings.vue";const a=i.exports},"./resources/assets/js/components/PortfolioPost.vue?vue&type=script&lang=js":
/*!**********************************************************************************!*\
!*** ./resources/assets/js/components/PortfolioPost.vue?vue&type=script&lang=js ***!
\**********************************************************************************/(t,e,o)=>{o.r(e),o.d(e,{default:()=>n});var s=o(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PortfolioPost.vue?vue&type=script&lang=js */"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/PortfolioPost.vue?vue&type=script&lang=js"),r={};for(const t in s)"default"!==t&&(r[t]=()=>s[t]);o.d(e,r);const n=s.default},"./resources/assets/js/components/PortfolioProfile.vue?vue&type=script&lang=js":
/*!*************************************************************************************!*\
!*** ./resources/assets/js/components/PortfolioProfile.vue?vue&type=script&lang=js ***!
\*************************************************************************************/(t,e,o)=>{o.r(e),o.d(e,{default:()=>n});var s=o(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PortfolioProfile.vue?vue&type=script&lang=js */"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/PortfolioProfile.vue?vue&type=script&lang=js"),r={};for(const t in s)"default"!==t&&(r[t]=()=>s[t]);o.d(e,r);const n=s.default},"./resources/assets/js/components/PortfolioSettings.vue?vue&type=script&lang=js":
/*!**************************************************************************************!*\
!*** ./resources/assets/js/components/PortfolioSettings.vue?vue&type=script&lang=js ***!
\**************************************************************************************/(t,e,o)=>{o.r(e),o.d(e,{default:()=>n});var s=o(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PortfolioSettings.vue?vue&type=script&lang=js */"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/PortfolioSettings.vue?vue&type=script&lang=js"),r={};for(const t in s)"default"!==t&&(r[t]=()=>s[t]);o.d(e,r);const n=s.default},"./resources/assets/js/components/PortfolioPost.vue?vue&type=template&id=0a982161":
/*!****************************************************************************************!*\
!*** ./resources/assets/js/components/PortfolioPost.vue?vue&type=template&id=0a982161 ***!
\****************************************************************************************/(t,e,o)=>{o.r(e);var s=o(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PortfolioPost.vue?vue&type=template&id=0a982161 */"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/PortfolioPost.vue?vue&type=template&id=0a982161"),r={};for(const t in s)"default"!==t&&(r[t]=()=>s[t]);o.d(e,r)},"./resources/assets/js/components/PortfolioProfile.vue?vue&type=template&id=4bd60610":
/*!*******************************************************************************************!*\
!*** ./resources/assets/js/components/PortfolioProfile.vue?vue&type=template&id=4bd60610 ***!
\*******************************************************************************************/(t,e,o)=>{o.r(e);var s=o(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PortfolioProfile.vue?vue&type=template&id=4bd60610 */"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/PortfolioProfile.vue?vue&type=template&id=4bd60610"),r={};for(const t in s)"default"!==t&&(r[t]=()=>s[t]);o.d(e,r)},"./resources/assets/js/components/PortfolioSettings.vue?vue&type=template&id=42118ee4":
/*!********************************************************************************************!*\
!*** ./resources/assets/js/components/PortfolioSettings.vue?vue&type=template&id=42118ee4 ***!
\********************************************************************************************/(t,e,o)=>{o.r(e);var s=o(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PortfolioSettings.vue?vue&type=template&id=42118ee4 */"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/PortfolioSettings.vue?vue&type=template&id=42118ee4"),r={};for(const t in s)"default"!==t&&(r[t]=()=>s[t]);o.d(e,r)}},t=>{t.O(0,["/js/vendor"],(()=>{return e="./resources/assets/js/portfolio.js",t(t.s=e);var e}));t.O()}]);