You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pixelfed/public/js/account-import.js

2 lines
23 KiB
JavaScript

/*! For license information please see account-import.js.LICENSE.txt */
(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[9139],{4134:(t,e,i)=>{"use strict";i.r(e);var n=i(63959),s={};for(const t in n)"default"!==t&&(s[t]=()=>n[t]);i.d(e,s)},5316:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>a});var n=i(11887),s={};for(const t in n)"default"!==t&&(s[t]=()=>n[t]);i.d(e,s);const a=n.default},11887:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>d});var n=i(58285);function s(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function o(){var t,e,i="function"==typeof Symbol?Symbol:{},n=i.iterator||"@@iterator",s=i.toStringTag||"@@toStringTag";function a(i,n,s,a){var o=n&&n.prototype instanceof c?n:c,d=Object.create(o.prototype);return r(d,"_invoke",function(i,n,s){var a,o,r,c=0,d=s||[],u=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,i){return a=e,o=0,r=t,f.n=i,l}};function p(i,n){for(o=i,r=n,e=0;!u&&c&&!s&&e<d.length;e++){var s,a=d[e],p=f.p,m=a[2];i>3?(s=m===n)&&(r=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=t):a[0]<=p&&((s=i<2&&p<a[1])?(o=0,f.v=n,f.n=a[1]):p<m&&(s=i<3||a[0]>n||n>m)&&(a[4]=i,a[5]=n,f.n=m,o=0))}if(s||i>1)return l;throw u=!0,n}return function(s,d,m){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&p(d,m),o=d,r=m;(e=o<2?t:r)||!u;){a||(o?o<3?(o>1&&(f.n=-1),p(o,r)):f.n=r:f.v=r);try{if(c=2,a){if(o||(s="next"),e=a[s]){if(!(e=e.call(a,r)))throw TypeError("iterator result is not an object");if(!e.done)return e;r=e.value,o<2&&(o=0)}else 1===o&&(e=a.return)&&e.call(a),o<2&&(r=TypeError("The iterator does not provide a '"+s+"' method"),o=1);a=t}else if((e=(u=f.n<0)?r:i.call(n,f))!==l)break}catch(e){a=t,o=1,r=e}finally{c=1}}return{value:e,done:u}}}(i,s,a),!0),d}var l={};function c(){}function d(){}function u(){}e=Object.getPrototypeOf;var f=[][n]?e(e([][n]())):(r(e={},n,function(){return this}),e),p=u.prototype=c.prototype=Object.create(f);function m(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,r(t,s,"GeneratorFunction")),t.prototype=Object.create(p),t}return d.prototype=u,r(p,"constructor",u),r(u,"constructor",d),d.displayName="GeneratorFunction",r(u,s,"GeneratorFunction"),r(p),r(p,s,"Generator"),r(p,n,function(){return this}),r(p,"toString",function(){return"[object Generator]"}),(o=function(){return{w:a,m}})()}function r(t,e,i,n){var s=Object.defineProperty;try{s({},"",{})}catch(t){s=0}r=function(t,e,i,n){function a(e,i){r(t,e,function(t){return this._invoke(e,i,t)})}e?s?s(t,e,{value:i,enumerable:!n,configurable:!n,writable:!n}):t[e]=i:(a("next",0),a("throw",1),a("return",2))},r(t,e,i,n)}function l(t,e,i,n,s,a,o){try{var r=t[a](o),l=r.value}catch(t){return void i(t)}r.done?e(l):Promise.resolve(l).then(n,s)}function c(t){return function(){var e=this,i=arguments;return new Promise(function(n,s){var a=t.apply(e,i);function o(t){l(a,n,s,o,r,"next",t)}function r(t){l(a,n,s,o,r,"throw",t)}o(void 0)})}}const d={data:function(){return{page:1,step:1,toggleLimit:300,config:{},showDisabledWarning:!1,showNotAllowedWarning:!1,invalidArchive:!1,loaded:!1,existing:[],zipName:void 0,zipFiles:[],postMeta:[],imageCache:[],includeArchives:!1,selectedMedia:[],selectedPostsCounter:0,detailsModalShow:!1,modalData:{},importedPosts:[],finishedCount:void 0,processingCount:void 0,showUploadLoader:!1,importButtonLoading:!1}},mounted:function(){this.fetchConfig()},methods:{fetchConfig:function(){var t=this;axios.get("/api/local/import/ig/config").then(function(e){t.config=e.data,0==e.data.enabled?(t.showDisabledWarning=!0,t.loaded=!0):0==e.data.allowed?(t.showNotAllowedWarning=!0,t.loaded=!0):t.fetchExisting()})},fetchExisting:function(){var t=this;axios.post("/api/local/import/ig/existing").then(function(e){t.existing=e.data}).finally(function(){t.fetchProcessing()})},fetchProcessing:function(){var t=this;axios.post("/api/local/import/ig/processing").then(function(e){t.processingCount=e.data.processing_count,t.finishedCount=e.data.finished_count}).finally(function(){t.loaded=!0})},selectArchive:function(){var t=this;event.currentTarget.blur(),swal({title:"Upload Archive",icon:"success",text:"The .zip archive is probably named something like username_20230606.zip, and was downloaded from the Instagram.com website.",buttons:{cancel:"Cancel",danger:{text:"Upload zip archive",value:"upload"}}}).then(function(e){t.$refs.zipInput.click()})},zipInputChanged:function(t){var e=this;this.step=2,this.zipName=t.target.files[0].name,this.showUploadLoader=!0,setTimeout(function(){e.reviewImports()},1e3),setTimeout(function(){e.showUploadLoader=!1},3e3)},reviewImports:function(){this.invalidArchive=!1,this.checkZip()},model:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new n.ZipReader(new n.BlobReader(t)).getEntries(e)},formatDate:function(t){return(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?new Date(1e3*t):new Date(t)).toLocaleDateString()},getFileNameUrl:function(t){return this.imageCache.filter(function(e){return e.filename===t}).map(function(t){return t.blob})},showDetailsModal:function(t){this.modalData=t,this.detailsModalShow=!0,setTimeout(function(){pixelfed.readmore()},500)},fixFacebookEncoding:function(t){return c(o().m(function e(){var i,n;return o().w(function(e){for(;;)if(0===e.n)return i=t.replace(/\\u00([a-f0-9]{2})/g,function(t){return String.fromCharCode(parseInt(t.slice(2),16))}),n=Array.from(i,function(t){return t.charCodeAt(0)}),e.a(2,(new TextDecoder).decode(new Uint8Array(n)))},e)}))()},filterPostMeta:function(t){var e=this;return c(o().m(function i(){var n,s,a;return o().w(function(i){for(;;)switch(i.n){case 0:return i.n=1,e.fixFacebookEncoding(t);case 1:return n=i.v,s=JSON.parse(n),Array.isArray(s)||(s=new Array(s)),a=s.filter(function(t){return t.media.map(function(t){return t.uri}).filter(function(t){var i=[".png",".jpg"];return e.config.allow_video_posts&&i.push(".mp4"),e.config.allow_image_webp&&i.push(".webp"),i.some(function(e){return t.endsWith(e)})}).length}).filter(function(t){var i=t.media.map(function(t){return t.uri});return!e.existing.includes(i[0])}),e.postMeta=a,i.a(2,a)}},i)}))()},checkZip:function(){var t=this;return c(o().m(function e(){var i,n,s;return o().w(function(e){for(;;)switch(e.n){case 0:return i=t.$refs.zipInput.files[0],e.n=1,t.model(i);case 1:if(!(n=e.v)||!n.length){e.n=4;break}return e.n=2,n.filter(function(t){return"content/posts_1.json"===t.filename||"your_instagram_activity/content/posts_1.json"===t.filename||"your_instagram_activity/media/posts_1.json"===t.filename});case 2:if((s=e.v)&&s.length){e.n=3;break}return t.contactModal("Invalid import archive","The .zip archive you uploaded is corrupted, or is invalid. We cannot process your import at this time.\n\nIf this issue persists, please contact an administrator.","error"),t.invalidArchive=!0,e.a(2);case 3:t.readZip();case 4:return e.a(2)}},e)}))()},readZip:function(){var t=this;return c(o().m(function e(){var i,s,a,r;return o().w(function(e){for(;;)switch(e.n){case 0:return i=t.$refs.zipInput.files[0],e.n=1,t.model(i);case 1:if(!(s=e.v)||!s.length){e.n=4;break}return t.zipFiles=s,e.n=2,s.filter(function(t){return"content/posts_1.json"===t.filename||"your_instagram_activity/content/posts_1.json"===t.filename||"your_instagram_activity/media/posts_1.json"===t.filename})[0].getData(new n.TextWriter);case 2:return a=e.v,t.filterPostMeta(a),e.n=3,Promise.all(s.filter(function(e){var i=[".png",".jpg",".jpeg",".mp4"];return t.config.allow_image_webp&&i.push(".webp"),(e.filename.startsWith("media/posts/")||e.filename.startsWith("media/other/"))&&i.some(function(t){return e.filename.endsWith(t)})}).map(function(){var e=c(o().m(function e(i){var s,a,r,l;return o().w(function(e){for(;;)switch(e.n){case 0:if(s=[".png",".jpg",".jpeg",".mp4"],t.config.allow_image_webp&&s.push(".webp"),!i.filename.startsWith("media/posts/")&&!i.filename.startsWith("media/other/")||!s.some(function(t){return i.filename.endsWith(t)})){e.n=2;break}return a={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",mp4:"video/mp4",webp:"image/webp"}[i.filename.split("/").pop().split(".").pop()],e.n=1,i.getData(new n.BlobWriter(a));case 1:return r=e.v,l=URL.createObjectURL(r),e.a(2,{filename:i.filename,blob:l,file:r});case 2:case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()));case 3:r=e.v,t.imageCache=r.flat(2);case 4:setTimeout(function(){t.page=2},500);case 5:return e.a(2)}},e)}))()},toggleLimitReached:function(){this.contactModal("Limit reached","You can only import "+this.toggleLimit+" posts at a time.\nYou can import more posts after you finish importing these posts.","error")},toggleSelectedPost:function(t){var e,i=this;if(1===t.media.length)if(e=t.media[0].uri,-1==this.selectedMedia.indexOf(e)){if(this.selectedPostsCounter>=this.toggleLimit)return void this.toggleLimitReached();this.selectedMedia.push(e),this.selectedPostsCounter++}else{var n=this.selectedMedia.indexOf(e);this.selectedMedia.splice(n,1),this.selectedPostsCounter--}else{if(e=t.media[0].uri,-1==this.selectedMedia.indexOf(e)){if(this.selectedPostsCounter>=this.toggleLimit)return void this.toggleLimitReached();this.selectedPostsCounter++}else this.selectedPostsCounter--;t.media.forEach(function(t){if(e=t.uri,-1==i.selectedMedia.indexOf(e))i.selectedMedia.push(e);else{var n=i.selectedMedia.indexOf(e);i.selectedMedia.splice(n,1)}})}},sliceIntoChunks:function(t,e){for(var i=[],n=0;n<t.length;n+=e){var s=t.slice(n,n+e);i.push(s)}return i},getFilename:function(t){var e=t.split("/").pop(),i=e.split(".").pop();return e.substring(0,e.lastIndexOf(".")).replace(/[^a-zA-Z0-9_.-]/g,"_")+"."+i},handleImport:function(){var t=this;swal("Importing...","Please wait while we upload your imported posts.\n Keep this page open and do not navigate away.","success"),this.importButtonLoading=!0;var e=this.imageCache.filter(function(e){return-1!=t.selectedMedia.indexOf(e.filename)});this.sliceIntoChunks(e,10).forEach(function(e){var i=new FormData;e.map(function(e,n){var s=t.getFilename(e.filename),a=new File([e.file],s);i.append("file["+n+"]",a,s)}),axios.post("/api/local/import/ig/media",i,{headers:{"Content-Type":"multipart/form-data"}}).catch(function(e){t.contactModal("Error",e.response.data.message,"error")})}),axios.post("/api/local/import/ig",{files:this.postMeta.filter(function(e){return t.selectedMedia.includes(e.media[0].uri)}).map(function(t){return t.hasOwnProperty("title")?{title:t.title,creation_timestamp:t.creation_timestamp,uri:t.uri,media:t.media}:{title:null,creation_timestamp:null,uri:null,media:t.media}})}).then(function(t){t&&setTimeout(function(){window.location.reload()},5e3)}).catch(function(e){t.contactModal("Error",e.response.data.error,"error")})},handleReviewPosts:function(){var t=this;this.page="reviewImports",axios.post("/api/local/import/ig/posts").then(function(e){t.importedPosts=e.data})},loadMorePosts:function(){var t=this;event.currentTarget.blur(),axios.post("/api/local/import/ig/posts",{cursor:this.importedPosts.meta.next_cursor}).then(function(e){var i=e.data;i.data=[].concat(s(t.importedPosts.data),s(e.data.data)),t.importedPosts=i})},contactModal:function(){swal({title:arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Error",text:arguments.length>1?arguments[1]:void 0,icon:arguments.length>2?arguments[2]:void 0,dangerMode:!0,buttons:{ok:arguments.length>3&&void 0!==arguments[3]?arguments[3]:"Close",danger:{text:"Contact Support",value:"contact"}}}).then(function(t){"contact"===t&&(window.location.href="/site/contact")})},handleSelectAll:function(){for(var t=this.postMeta.slice(0,this.toggleLimit),e=t.length-1;e>=0;e--){var i=t[e];this.toggleSelectedPost(i)}},handleClearAll:function(){this.selectedMedia=[],this.selectedPostsCounter=0}}}},18687:(t,e,i)=>{"use strict";i.r(e);var n=i(61022),s={};for(const t in n)"default"!==t&&(s[t]=()=>n[t]);i.d(e,s)},61022:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>r});var n=i(85072),s=i.n(n),a=i(75759),o={insert:"head",singleton:!1};s()(a.default,o);const r=a.default.locals||{}},63959:(t,e,i)=>{"use strict";i.r(e),i.d(e,{render:()=>n,staticRenderFns:()=>s});var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"h-100 pf-import"},[t.loaded?[e("input",{ref:"zipInput",staticClass:"d-none",attrs:{type:"file",name:"file"},on:{change:t.zipInputChanged}}),t._v(" "),1===t.page?[t._m(0),t._v(" "),e("hr"),t._v(" "),t._m(1),t._v(" "),e("section",{staticClass:"mt-4"},[e("ul",{staticClass:"list-group"},[e("li",{staticClass:"list-group-item d-flex justify-content-between flex-column",staticStyle:{gap:"1rem"}},[e("div",{staticClass:"d-flex justify-content-between align-items-center",staticStyle:{gap:"1rem"}},[e("div",[e("p",{staticClass:"font-weight-bold mb-1"},[t._v("Import from Instagram")]),t._v(" "),t.showDisabledWarning?e("p",{staticClass:"small mb-0"},[t._v("This feature has been disabled by the administrators.")]):t.showNotAllowedWarning?e("p",{staticClass:"small mb-0"},[t._v("You have not been permitted to use this feature, or have reached the maximum limits. For more info, view the "),e("a",{staticClass:"font-weight-bold",attrs:{href:"/site/kb/import"}},[t._v("Import Help Center")]),t._v(" page.")]):e("p",{staticClass:"small mb-0"},[t._v("Upload the JSON export from Instagram in .zip format."),e("br"),t._v("For more information click "),e("a",{attrs:{href:"/site/kb/import"}},[t._v("here")]),t._v(".")])]),t._v(" "),t.showDisabledWarning||t.showNotAllowedWarning?t._e():e("div",[1===t.step||t.invalidArchive?e("button",{staticClass:"font-weight-bold btn btn-primary rounded-pill px-4 btn-lg",attrs:{type:"button",disabled:t.showDisabledWarning},on:{click:function(e){return t.selectArchive()}}},[t._v("\n Import\n ")]):2===t.step?[e("div",{staticClass:"d-flex justify-content-center align-items-center flex-column"},[t.showUploadLoader?e("b-spinner",{attrs:{small:""}}):e("button",{staticClass:"font-weight-bold btn btn-outline-primary btn-sm btn-block",attrs:{type:"button"},on:{click:function(e){return t.reviewImports()}}},[t._v("Review Imports")]),t._v(" "),t.zipName?e("p",{staticClass:"small font-weight-bold mt-2 mb-0"},[t._v(t._s(t.zipName))]):t._e()],1)]:t._e()],2)])])]),t._v(" "),e("ul",{staticClass:"list-group mt-3"},[t.processingCount?e("li",{staticClass:"list-group-item d-flex justify-content-between flex-column",staticStyle:{gap:"1rem"}},[e("div",{staticClass:"d-flex justify-content-between align-items-center"},[t._m(2),t._v(" "),e("div",[e("span",{staticClass:"btn btn-danger rounded-pill py-0 font-weight-bold",attrs:{disabled:""}},[t._v(t._s(t.processingCount))])])])]):t._e(),t._v(" "),t.finishedCount?e("li",{staticClass:"list-group-item d-flex justify-content-between flex-column",staticStyle:{gap:"1rem"}},[e("div",{staticClass:"d-flex justify-content-between align-items-center"},[t._m(3),t._v(" "),e("div",[e("button",{staticClass:"font-weight-bold btn btn-primary btn-sm rounded-pill px-4 btn-block",attrs:{type:"button",disabled:!t.finishedCount},on:{click:function(e){return t.handleReviewPosts()}}},[t._v("\n Review "+t._s(t.finishedCount)+" Posts\n ")])])])]):t._e()])])]:2===t.page?[e("div",{staticClass:"d-flex justify-content-between align-items-center"},[t._m(4),t._v(" "),e("button",{staticClass:"btn btn-primary font-weight-bold rounded-pill px-4",class:{disabled:!t.selectedMedia||!t.selectedMedia.length},attrs:{disabled:!t.selectedMedia||!t.selectedMedia.length||t.importButtonLoading},on:{click:function(e){return t.handleImport()}}},[t.importButtonLoading?e("b-spinner",{attrs:{small:""}}):e("span",[t._v("Import")])],1)]),t._v(" "),e("hr"),t._v(" "),e("section",[e("div",{staticClass:"d-flex justify-content-between align-items-center mb-3"},[t.selectedMedia&&t.selectedMedia.length?e("p",{staticClass:"lead mb-0"},[e("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.selectedPostsCounter))]),t._v(" posts selected for import")]):e("div",[e("p",{staticClass:"lead mb-0"},[t._v("Review posts you'd like to import.")]),t._v(" "),e("p",{staticClass:"small text-muted mb-0"},[t._v("Tap on posts to include them in your import.")])]),t._v(" "),t.selectedMedia.length?e("button",{staticClass:"btn btn-outline-danger font-weight-bold rounded-pill btn-sm my-1",on:{click:function(e){return t.handleClearAll()}}},[t._v("Clear all selected")]):e("button",{staticClass:"btn btn-outline-primary font-weight-bold rounded-pill",on:{click:function(e){return t.handleSelectAll()}}},[t._v("Select first "+t._s(t.toggleLimit)+" posts")])])]),t._v(" "),e("section",{staticClass:"row mb-n5 media-selector",staticStyle:{"max-height":"600px","overflow-y":"auto"}},t._l(t.postMeta,function(i){return e("div",{staticClass:"col-12 col-md-4"},[e("div",{staticClass:"square cursor-pointer",on:{click:function(e){return t.toggleSelectedPost(i)}}},[i.media[0].uri.endsWith(".mp4")?e("div",{staticClass:"info-overlay-text-label rounded",class:{selected:-1!=t.selectedMedia.indexOf(i.media[0].uri)}},[t._m(5,!0)]):e("div",{staticClass:"square-content",class:{selected:-1!=t.selectedMedia.indexOf(i.media[0].uri)},style:{borderRadius:"5px",backgroundImage:"url("+t.getFileNameUrl(i.media[0].uri)+")"}})]),t._v(" "),e("div",{staticClass:"d-flex mt-1 justify-content-between align-items-center"},[e("p",{staticClass:"small"},[e("i",{staticClass:"far fa-clock"}),t._v(" "+t._s(t.formatDate(i.media[0].creation_timestamp)))]),t._v(" "),e("p",{staticClass:"small font-weight-bold"},[e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showDetailsModal(i)}}},[e("i",{staticClass:"far fa-info-circle"}),t._v(" Details")])])])])}),0)]:"reviewImports"===t.page?[t._m(6),t._v(" "),e("hr"),t._v(" "),e("section",{staticClass:"row mb-n5 media-selector",staticStyle:{"max-height":"600px","overflow-y":"auto"}},[t._l(t.importedPosts.data,function(i){return e("div",{staticClass:"col-12 col-md-4"},[e("div",{staticClass:"square cursor-pointer"},[i.media_attachments[0].url.endsWith(".mp4")?e("div",{staticClass:"info-overlay-text-label rounded"},[t._m(7,!0)]):e("div",{staticClass:"square-content",style:{borderRadius:"5px",backgroundImage:"url("+i.media_attachments[0].url+")"}})]),t._v(" "),e("div",{staticClass:"d-flex mt-1 justify-content-between align-items-center"},[e("p",{staticClass:"small"},[e("i",{staticClass:"far fa-clock"}),t._v(" "+t._s(t.formatDate(i.created_at,!1)))]),t._v(" "),e("p",{staticClass:"small font-weight-bold"},[e("a",{attrs:{href:i.url}},[e("i",{staticClass:"far fa-info-circle"}),t._v(" View")])])])])}),t._v(" "),e("div",{staticClass:"col-12 my-3"},[t.importedPosts.meta&&t.importedPosts.meta.next_cursor?e("button",{staticClass:"btn btn-primary btn-block font-weight-bold",on:{click:function(e){return t.loadMorePosts()}}},[t._v("\n Load more\n ")]):t._e()])],2)]:t._e()]:e("div",{staticClass:"d-flex justify-content-center align-items-center h-100"},[e("b-spinner")],1),t._v(" "),e("b-modal",{attrs:{id:"detailsModal",title:"Post Details","ok-only":!0,"ok-title":"Close",centered:""},model:{value:t.detailsModalShow,callback:function(e){t.detailsModalShow=e},expression:"detailsModalShow"}},[e("div",{},t._l(t.modalData.media,function(i,n){return e("div",{staticClass:"mb-3"},[e("div",{staticClass:"list-group"},[e("div",{staticClass:"list-group-item d-flex justify-content-between align-items-center"},[e("p",{staticClass:"text-center font-weight-bold mb-0"},[t._v("Media #"+t._s(n+1))]),t._v(" "),i.uri.endsWith(".jpg")||i.uri.endsWith(".png")?[e("img",{staticStyle:{"object-fit":"cover","border-radius":"5px"},attrs:{src:t.getFileNameUrl(i.uri),width:"30",height:"30"}})]:t._e()],2),t._v(" "),i.uri.endsWith(".mp4")?[e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"embed-responsive embed-responsive-4by3"},[e("video",{attrs:{src:t.getFileNameUrl(i.uri),controls:""}})])])]:t._e(),t._v(" "),e("div",{staticClass:"list-group-item"},[e("p",{staticClass:"small text-muted"},[t._v("Caption")]),t._v(" "),e("p",{staticClass:"mb-0 small read-more",staticStyle:{"font-size":"12px","overflow-y":"hidden"}},[t._v(t._s(i.title?i.title:t.modalData.title))])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"d-flex justify-content-between align-items-center"},[e("p",{staticClass:"small mb-0 text-muted"},[t._v("Timestamp")]),t._v(" "),e("p",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.formatDate(i.creation_timestamp)))])])])],2)])}),0)])],2)},s=[function(){var t=this._self._c;return t("div",{staticClass:"title"},[t("h3",{staticClass:"font-weight-bold"},[this._v("Import")])])},function(){var t=this._self._c;return t("section",[t("p",{staticClass:"lead"},[this._v("Account Import allows you to import your data from a supported service.")])])},function(){var t=this,e=t._self._c;return e("div",[e("p",{staticClass:"font-weight-bold mb-1"},[t._v("Processing Imported Posts")]),t._v(" "),e("p",{staticClass:"small mb-0"},[t._v("These are posts that are in the process of being imported.")])])},function(){var t=this,e=t._self._c;return e("div",[e("p",{staticClass:"font-weight-bold mb-1"},[t._v("Imported Posts")]),t._v(" "),e("p",{staticClass:"small mb-0"},[t._v("These are posts that have been successfully imported.")])])},function(){var t=this._self._c;return t("div",{staticClass:"title"},[t("h3",{staticClass:"font-weight-bold"},[this._v("Import from Instagram")])])},function(){var t=this._self._c;return t("h5",{staticClass:"text-white m-auto font-weight-bold"},[t("span",[t("span",{staticClass:"far fa-video fa-2x p-2 d-flex-inline"})])])},function(){var t=this._self._c;return t("div",{staticClass:"d-flex justify-content-between align-items-center"},[t("div",{staticClass:"title"},[t("h3",{staticClass:"font-weight-bold"},[this._v("Posts Imported from Instagram")])])])},function(){var t=this._self._c;return t("h5",{staticClass:"text-white m-auto font-weight-bold"},[t("span",[t("span",{staticClass:"far fa-video fa-2x p-2 d-flex-inline"})])])}]},70627:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>o});var n=i(4134),s=i(5316),a={};for(const t in s)"default"!==t&&(a[t]=()=>s[t]);i.d(e,a);i(18687);const o=(0,i(14486).default)(s.default,n.render,n.staticRenderFns,!1,null,"1896b5bd",null).exports},75759:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>a});var n=i(76798),s=i.n(n)()(function(t){return t[1]});s.push([t.id,".pf-import .media-selector .selected[data-v-1896b5bd]{border:5px solid red}",""]);const a=s},97697:(t,e,i)=>{Vue.component("account-import",i(70627).default)}},t=>{t.O(0,[3660],()=>{return e=97697,t(t.s=e);var e});t.O()}]);