summaryrefslogtreecommitdiff
path: root/priv/static/static/js/1264.1e16af28a0b44d4d17d0.js
diff options
context:
space:
mode:
Diffstat (limited to 'priv/static/static/js/1264.1e16af28a0b44d4d17d0.js')
-rw-r--r--priv/static/static/js/1264.1e16af28a0b44d4d17d0.js2
1 files changed, 0 insertions, 2 deletions
diff --git a/priv/static/static/js/1264.1e16af28a0b44d4d17d0.js b/priv/static/static/js/1264.1e16af28a0b44d4d17d0.js
deleted file mode 100644
index 009294aea..000000000
--- a/priv/static/static/js/1264.1e16af28a0b44d4d17d0.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";(self.webpackChunkpleroma_fe=self.webpackChunkpleroma_fe||[]).push([[1264],{71264:(e,t,n)=>{n.r(t),n.d(t,{default:()=>wi});var l=n(66252),a=["label"],o=["label"],s=["label"],r=["label"],i=["label"],u=["label"],c=["label"],d=["label"],p=["label"],m=n(79354),h=n(3577),f=["label"],g={class:"setting-item"},b={class:"setting-item"},w={class:"setting-item"},_={class:"setting-item"},k={class:"setting-item"},v={class:"setting-item"},y={class:"setting-item"},$=(0,l._)("th",null,null,-1),C={class:"actions"},V=["href"],T={key:1},x={key:0,class:"alert error"},L=["title"],U={key:1},O={key:2},W=n(4942),S={class:"importer"},z={key:2},P={key:3},D=n(9382),I=n(84131);D.vI.add(I.IJ7,I.NBC);const j={props:{submitHandler:{type:Function,required:!0},submitButtonLabel:{type:String},successMessage:{type:String},errorMessage:{type:String}},data:function(){return{file:null,error:!1,success:!1,submitting:!1}},methods:{change:function(){this.file=this.$refs.input.files[0]},submit:function(){var e=this;this.dismiss(),this.submitting=!0,this.submitHandler(this.file).then((function(){e.success=!0})).catch((function(){e.error=!0})).finally((function(){e.submitting=!1}))},dismiss:function(){this.success=!1,this.error=!1}}};var B=n(83744);const A=(0,B.Z)(j,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("FAIcon");return(0,l.wg)(),(0,l.iD)("div",S,[(0,l._)("form",null,[(0,l._)("input",{ref:"input",type:"file",onChange:t[0]||(t[0]=function(){return e.change&&e.change.apply(e,arguments)})},null,544)]),e.submitting?((0,l.wg)(),(0,l.j4)(r,{key:0,class:"importer-uploading",spin:"",icon:"circle-notch"})):((0,l.wg)(),(0,l.iD)("button",{key:1,class:"btn button-default",onClick:t[1]||(t[1]=function(){return e.submit&&e.submit.apply(e,arguments)})},(0,h.zw)(e.submitButtonLabel||e.$t("importer.submit")),1)),e.success?((0,l.wg)(),(0,l.iD)("div",z,[(0,l._)("button",{class:"button-unstyled",onClick:t[2]||(t[2]=function(){return e.dismiss&&e.dismiss.apply(e,arguments)})},[(0,l.Wm)(r,{icon:"times"})]),(0,l.Uk)(" "+(0,h.zw)(" ")+" "),(0,l._)("span",null,(0,h.zw)(e.successMessage||e.$t("importer.success")),1)])):e.error?((0,l.wg)(),(0,l.iD)("div",P,[(0,l._)("button",{class:"button-unstyled",onClick:t[3]||(t[3]=function(){return e.dismiss&&e.dismiss.apply(e,arguments)})},[(0,l.Wm)(r,{icon:"times"})]),(0,l.Uk)(" "+(0,h.zw)(" ")+" "),(0,l._)("span",null,(0,h.zw)(e.errorMessage||e.$t("importer.error")),1)])):(0,l.kq)("",!0)])}]]);var E={class:"exporter"},q={key:0};D.vI.add(I.IJ7);const F={props:{getContent:{type:Function,required:!0},filename:{type:String,default:"export.csv"},exportButtonLabel:{type:String},processingMessage:{type:String}},data:function(){return{processing:!1}},methods:{process:function(){var e=this;this.processing=!0,this.getContent().then((function(t){var n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),n.setAttribute("download",e.filename),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n),setTimeout((function(){e.processing=!1}),2e3)}))}}},Z=(0,B.Z)(F,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("FAIcon");return(0,l.wg)(),(0,l.iD)("div",E,[e.processing?((0,l.wg)(),(0,l.iD)("div",q,[(0,l.Wm)(r,{icon:"circle-notch",size:"lg",spin:""}),(0,l._)("span",null,(0,h.zw)(e.processingMessage||e.$t("exporter.processing")),1)])):((0,l.wg)(),(0,l.iD)("button",{key:1,class:"btn button-default",onClick:t[0]||(t[0]=function(){return e.process&&e.process.apply(e,arguments)})},(0,h.zw)(e.exportButtonLabel||e.$t("exporter.export")),1))])}]]);var M=n(40151),R=n(989);function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}const H={data:function(){return{activeTab:"profile",newDomainToMute:"",listBackupsError:!1,addBackupError:!1,addedBackup:!1,backups:[]}},created:function(){this.$store.dispatch("fetchTokens"),this.fetchBackups()},components:{Importer:A,Exporter:Z,Checkbox:M.Z},computed:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){(0,W.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,R.rn)({backendInteractor:function(e){return e.api.backendInteractor},user:function(e){return e.users.currentUser}})),methods:{getFollowsContent:function(){return this.backendInteractor.exportFriends({id:this.user.id}).then(this.generateExportableUsersContent)},getBlocksContent:function(){return this.backendInteractor.fetchBlocks().then(this.generateExportableUsersContent)},getMutesContent:function(){return this.backendInteractor.fetchMutes().then(this.generateExportableUsersContent)},importFollows:function(e){return this.backendInteractor.importFollows({file:e}).then((function(e){if(!e)throw new Error("failed")}))},importBlocks:function(e){return this.backendInteractor.importBlocks({file:e}).then((function(e){if(!e)throw new Error("failed")}))},importMutes:function(e){return this.backendInteractor.importMutes({file:e}).then((function(e){if(!e)throw new Error("failed")}))},generateExportableUsersContent:function(e){return e.map((function(e){return e&&e.is_local?e.screen_name+"@"+location.hostname:e.screen_name})).join("\n")},addBackup:function(){var e=this;this.$store.state.api.backendInteractor.addBackup().then((function(t){e.addedBackup=!0,e.addBackupError=!1})).catch((function(t){e.addedBackup=!1,e.addBackupError=t})).then((function(){return e.fetchBackups()}))},fetchBackups:function(){var e=this;this.$store.state.api.backendInteractor.listBackups().then((function(t){e.backups=t,e.listBackupsError=!1})).catch((function(t){e.listBackupsError=t.error}))}}},Y=(0,B.Z)(H,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("Importer"),i=(0,l.up)("Exporter"),u=(0,l.up)("FAIcon");return(0,l.wg)(),(0,l.iD)("div",{label:e.$t("settings.data_import_export_tab")},[(0,l._)("div",g,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.follow_import")),1),(0,l._)("p",null,(0,h.zw)(e.$t("settings.import_followers_from_a_csv_file")),1),(0,l.Wm)(r,{"submit-handler":e.importFollows,"success-message":e.$t("settings.follows_imported"),"error-message":e.$t("settings.follow_import_error")},null,8,["submit-handler","success-message","error-message"])]),(0,l._)("div",b,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.follow_export")),1),(0,l.Wm)(i,{"get-content":e.getFollowsContent,filename:"friends.csv","export-button-label":e.$t("settings.follow_export_button")},null,8,["get-content","export-button-label"])]),(0,l._)("div",w,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.block_import")),1),(0,l._)("p",null,(0,h.zw)(e.$t("settings.import_blocks_from_a_csv_file")),1),(0,l.Wm)(r,{"submit-handler":e.importBlocks,"success-message":e.$t("settings.blocks_imported"),"error-message":e.$t("settings.block_import_error")},null,8,["submit-handler","success-message","error-message"])]),(0,l._)("div",_,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.block_export")),1),(0,l.Wm)(i,{"get-content":e.getBlocksContent,filename:"blocks.csv","export-button-label":e.$t("settings.block_export_button")},null,8,["get-content","export-button-label"])]),(0,l._)("div",k,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.mute_import")),1),(0,l._)("p",null,(0,h.zw)(e.$t("settings.import_mutes_from_a_csv_file")),1),(0,l.Wm)(r,{"submit-handler":e.importMutes,"success-message":e.$t("settings.mutes_imported"),"error-message":e.$t("settings.mute_import_error")},null,8,["submit-handler","success-message","error-message"])]),(0,l._)("div",v,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.mute_export")),1),(0,l.Wm)(i,{"get-content":e.getMutesContent,filename:"mutes.csv","export-button-label":e.$t("settings.mute_export_button")},null,8,["get-content","export-button-label"])]),(0,l._)("div",y,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.account_backup")),1),(0,l._)("p",null,(0,h.zw)(e.$t("settings.account_backup_description")),1),(0,l._)("table",null,[(0,l._)("thead",null,[(0,l._)("tr",null,[(0,l._)("th",null,(0,h.zw)(e.$t("settings.account_backup_table_head")),1),$])]),(0,l._)("tbody",null,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.backups,(function(t){return(0,l.wg)(),(0,l.iD)("tr",{key:t.id},[(0,l._)("td",null,(0,h.zw)(t.inserted_at),1),(0,l._)("td",C,[t.processed?((0,l.wg)(),(0,l.iD)("a",{key:0,target:"_blank",href:t.url},(0,h.zw)(e.$t("settings.download_backup")),9,V)):((0,l.wg)(),(0,l.iD)("span",T,(0,h.zw)(e.$t("settings.backup_not_ready")),1))])])})),128))])]),e.listBackupsError?((0,l.wg)(),(0,l.iD)("div",x,[(0,l.Uk)((0,h.zw)(e.$t("settings.list_backups_error",{error:e.error}))+" ",1),(0,l._)("button",{title:e.$t("settings.hide_list_backups_error_action"),onClick:t[0]||(t[0]=function(t){return e.listBackupsError=!1})},[(0,l.Wm)(u,{class:"fa-scale-110 fa-old-padding",icon:"times"})],8,L)])):(0,l.kq)("",!0),(0,l._)("button",{class:"btn button-default",onClick:t[1]||(t[1]=function(){return e.addBackup&&e.addBackup.apply(e,arguments)})},(0,h.zw)(e.$t("settings.add_backup")),1),e.addedBackup?((0,l.wg)(),(0,l.iD)("p",U,(0,h.zw)(e.$t("settings.added_backup")),1)):(0,l.kq)("",!0),!1!==e.addBackupError?((0,l.wg)(),(0,l.iD)("p",O,(0,h.zw)(e.$t("settings.add_backup_error",{error:e.addBackupError})),1)):(0,l.kq)("",!0)])],8,f)}]]);var K=["label"],G={class:"usersearch-wrapper"},J={class:"bulk-actions"},Q=["label"],X=["label"],ee={class:"usersearch-wrapper"},te={class:"bulk-actions"},ne=["label"],le={class:"domain-mute-form"},ae={class:"bulk-actions"},oe=n(27361),se=n.n(oe),re=n(35161),ie=n.n(re),ue=n(43063),ce=n.n(ue),de=n(49963),pe={class:"autosuggest"},me=["placeholder"],he={key:0,class:"autosuggest-results"};const fe={props:{query:{type:Function,required:!0},filter:{type:Function},placeholder:{type:String,default:"Search..."}},data:function(){return{term:"",timeout:null,results:[],resultsVisible:!1}},computed:{filtered:function(){return this.filter?this.filter(this.results):this.results}},watch:{term:function(e){this.fetchResults(e)}},methods:{fetchResults:function(e){var t=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){t.results=[],e&&t.query(e).then((function(e){t.results=e}))}),500)},onInputClick:function(){this.resultsVisible=!0},onClickOutside:function(){this.resultsVisible=!1}}},ge=(0,B.Z)(fe,[["render",function(e,t,n,a,o,s){var r=(0,l.Q2)("click-outside");return(0,l.wy)(((0,l.wg)(),(0,l.iD)("div",pe,[(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.term=t}),placeholder:e.placeholder,class:"autosuggest-input",onClick:t[1]||(t[1]=function(){return e.onInputClick&&e.onInputClick.apply(e,arguments)})},null,8,me),[[de.nr,e.term]]),e.resultsVisible&&e.filtered.length>0?((0,l.wg)(),(0,l.iD)("div",he,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.filtered,(function(t){return(0,l.WI)(e.$slots,"default",{item:t})})),256))])):(0,l.kq)("",!0)])),[[r,e.onClickOutside]])}]]);var be={class:"block-card-content-container"},we=["disabled"],_e=["disabled"],ke=n(85267);const ve={props:["userId"],data:function(){return{progress:!1}},computed:{user:function(){return this.$store.getters.findUser(this.userId)},relationship:function(){return this.$store.getters.relationship(this.userId)},blocked:function(){return this.relationship.blocking}},components:{BasicUserCard:ke.Z},methods:{unblockUser:function(){var e=this;this.progress=!0,this.$store.dispatch("unblockUser",this.user.id).then((function(){e.progress=!1}))},blockUser:function(){var e=this;this.progress=!0,this.$store.dispatch("blockUser",this.user.id).then((function(){e.progress=!1}))}}},ye=(0,B.Z)(ve,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("basic-user-card");return(0,l.wg)(),(0,l.j4)(r,{user:e.user},{default:(0,l.w5)((function(){return[(0,l._)("div",be,[e.blocked?((0,l.wg)(),(0,l.iD)("button",{key:0,class:"btn button-default",disabled:e.progress,onClick:t[0]||(t[0]=function(){return e.unblockUser&&e.unblockUser.apply(e,arguments)})},[e.progress?((0,l.wg)(),(0,l.iD)(l.HY,{key:0},[(0,l.Uk)((0,h.zw)(e.$t("user_card.unblock_progress")),1)],64)):((0,l.wg)(),(0,l.iD)(l.HY,{key:1},[(0,l.Uk)((0,h.zw)(e.$t("user_card.unblock")),1)],64))],8,we)):((0,l.wg)(),(0,l.iD)("button",{key:1,class:"btn button-default",disabled:e.progress,onClick:t[1]||(t[1]=function(){return e.blockUser&&e.blockUser.apply(e,arguments)})},[e.progress?((0,l.wg)(),(0,l.iD)(l.HY,{key:0},[(0,l.Uk)((0,h.zw)(e.$t("user_card.block_progress")),1)],64)):((0,l.wg)(),(0,l.iD)(l.HY,{key:1},[(0,l.Uk)((0,h.zw)(e.$t("user_card.block")),1)],64))],8,_e))])]})),_:1},8,["user"])}]]);var $e={class:"mute-card-content-container"},Ce=["disabled"],Ve=["disabled"];const Te={props:["userId"],data:function(){return{progress:!1}},computed:{user:function(){return this.$store.getters.findUser(this.userId)},relationship:function(){return this.$store.getters.relationship(this.userId)},muted:function(){return this.relationship.muting}},components:{BasicUserCard:ke.Z},methods:{unmuteUser:function(){var e=this;this.progress=!0,this.$store.dispatch("unmuteUser",this.userId).then((function(){e.progress=!1}))},muteUser:function(){var e=this;this.progress=!0,this.$store.dispatch("muteUser",this.userId).then((function(){e.progress=!1}))}}},xe=(0,B.Z)(Te,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("basic-user-card");return(0,l.wg)(),(0,l.j4)(r,{user:e.user},{default:(0,l.w5)((function(){return[(0,l._)("div",$e,[e.muted?((0,l.wg)(),(0,l.iD)("button",{key:0,class:"btn button-default",disabled:e.progress,onClick:t[0]||(t[0]=function(){return e.unmuteUser&&e.unmuteUser.apply(e,arguments)})},[e.progress?((0,l.wg)(),(0,l.iD)(l.HY,{key:0},[(0,l.Uk)((0,h.zw)(e.$t("user_card.unmute_progress")),1)],64)):((0,l.wg)(),(0,l.iD)(l.HY,{key:1},[(0,l.Uk)((0,h.zw)(e.$t("user_card.unmute")),1)],64))],8,Ce)):((0,l.wg)(),(0,l.iD)("button",{key:1,class:"btn button-default",disabled:e.progress,onClick:t[1]||(t[1]=function(){return e.muteUser&&e.muteUser.apply(e,arguments)})},[e.progress?((0,l.wg)(),(0,l.iD)(l.HY,{key:0},[(0,l.Uk)((0,h.zw)(e.$t("user_card.mute_progress")),1)],64)):((0,l.wg)(),(0,l.iD)(l.HY,{key:1},[(0,l.Uk)((0,h.zw)(e.$t("user_card.mute")),1)],64))],8,Ve))])]})),_:1},8,["user"])}]]);var Le={class:"domain-mute-card"},Ue={class:"domain-mute-card-domain"},Oe=n(99507);const We={props:["domain"],components:{ProgressButton:Oe.Z},computed:{user:function(){return this.$store.state.users.currentUser},muted:function(){return this.user.domainMutes.includes(this.domain)}},methods:{unmuteDomain:function(){return this.$store.dispatch("unmuteDomain",this.domain)},muteDomain:function(){return this.$store.dispatch("muteDomain",this.domain)}}},Se=(0,B.Z)(We,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("ProgressButton");return(0,l.wg)(),(0,l.iD)("div",Le,[(0,l._)("div",Ue,(0,h.zw)(e.domain),1),e.muted?((0,l.wg)(),(0,l.j4)(r,{key:0,click:e.unmuteDomain,class:"btn button-default"},{progress:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("domain_mute_card.unmute_progress")),1)]})),default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("domain_mute_card.unmute"))+" ",1)]})),_:1},8,["click"])):((0,l.wg)(),(0,l.j4)(r,{key:1,click:e.muteDomain,class:"btn button-default"},{progress:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("domain_mute_card.mute_progress")),1)]})),default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("domain_mute_card.mute"))+" ",1)]})),_:1},8,["click"]))])}]]);var ze={class:"selectable-list"},Pe={key:0,class:"selectable-list-header"},De={class:"selectable-list-checkbox-wrapper"},Ie={class:"selectable-list-header-actions"},je={class:"selectable-list-checkbox-wrapper"};const Be={components:{List:n(83293).Z,Checkbox:M.Z},props:{items:{type:Array,default:function(){return[]}},getKey:{type:Function,default:function(e){return e.id}}},data:function(){return{selected:[]}},computed:{allKeys:function(){return this.items.map(this.getKey)},filteredSelected:function(){var e=this;return this.allKeys.filter((function(t){return-1!==e.selected.indexOf(t)}))},allSelected:function(){return this.filteredSelected.length===this.items.length},noneSelected:function(){return 0===this.filteredSelected.length},someSelected:function(){return!this.allSelected&&!this.noneSelected}},methods:{isSelected:function(e){return-1!==this.filteredSelected.indexOf(this.getKey(e))},toggle:function(e,t){var n=this.getKey(t);e!==this.isSelected(n)&&(e?this.selected.push(n):this.selected.splice(this.selected.indexOf(n),1))},toggleAll:function(e){this.selected=e?this.allKeys.slice(0):[]}}},Ae=(0,B.Z)(Be,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("Checkbox"),i=(0,l.up)("List");return(0,l.wg)(),(0,l.iD)("div",ze,[e.items.length>0?((0,l.wg)(),(0,l.iD)("div",Pe,[(0,l._)("div",De,[(0,l.Wm)(r,{"model-value":e.allSelected,indeterminate:e.someSelected,"onUpdate:modelValue":e.toggleAll},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("selectable_list.select_all")),1)]})),_:1},8,["model-value","indeterminate","onUpdate:modelValue"])]),(0,l._)("div",Ie,[(0,l.WI)(e.$slots,"header",{selected:e.filteredSelected})])])):(0,l.kq)("",!0),(0,l.Wm)(i,{items:e.items,"get-key":e.getKey},{item:(0,l.w5)((function(t){var n=t.item;return[(0,l._)("div",{class:(0,h.C_)(["selectable-list-item-inner",{"selectable-list-item-selected-inner":e.isSelected(n)}])},[(0,l._)("div",je,[(0,l.Wm)(r,{"model-value":e.isSelected(n),"onUpdate:modelValue":function(t){return e.toggle(t,n)}},null,8,["model-value","onUpdate:modelValue"])]),(0,l.WI)(e.$slots,"item",{item:n})],2)]})),empty:(0,l.w5)((function(){return[(0,l.WI)(e.$slots,"empty")]})),_:3},8,["items","get-key"])])}]]);var Ee=n(93433),qe=n(41609),Fe=n.n(qe),Ze=n(13562),Me=n(57810);function Re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function Ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(n),!0).forEach((function(t){(0,W.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}D.vI.add(I.IJ7);const He=function(e){var t=e.fetch,n=e.select,a=e.childPropName,o=void 0===a?"content":a,s=e.additionalPropNames,r=void 0===s?[]:s;return function(e){var a=Object.keys((0,Ze.g)(e)).filter((function(e){return e!==o})).concat(r);return{props:[].concat((0,Ee.Z)(a),["refresh"]),data:function(){return{loading:!1,error:!1}},computed:{fetchedData:function(){return n(this.$props,this.$store)}},created:function(){(this.refresh||Fe()(this.fetchedData))&&this.fetchData()},methods:{fetchData:function(){var e=this;this.loading||(this.loading=!0,this.error=!1,t(this.$props,this.$store).then((function(){e.loading=!1})).catch((function(){e.error=!0,e.loading=!1})))}},render:function(){if(this.error||this.loading)return(0,l.Wm)("div",{class:"with-subscription-loading"},[this.error?(0,l.Wm)("a",{onClick:this.fetchData,class:"alert error"},[this.$t("general.generic_error")]):(0,l.Wm)(Me.GN,{spin:!0,icon:"circle-notch"},null)]);var t,n=Ne(Ne({},this.$props),{},(0,W.Z)({},o,this.fetchedData)),a=this.$slots;return(0,l.Wm)("div",{class:"with-subscription"},[(0,l.Wm)(e,n,(t=a,"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!(0,l.lA)(t)?a:{default:function(){return[a]}}))])}}}};var Ye=He({fetch:function(e,t){return t.dispatch("fetchBlocks")},select:function(e,t){return se()(t.state.users.currentUser,"blockIds",[])},childPropName:"items"})(Ae),Ke=He({fetch:function(e,t){return t.dispatch("fetchMutes")},select:function(e,t){return se()(t.state.users.currentUser,"muteIds",[])},childPropName:"items"})(Ae),Ge=He({fetch:function(e,t){return t.dispatch("fetchDomainMutes")},select:function(e,t){return se()(t.state.users.currentUser,"domainMutes",[])},childPropName:"items"})(Ae);const Je={data:function(){return{activeTab:"profile"}},created:function(){this.$store.dispatch("fetchTokens"),this.$store.dispatch("getKnownDomains")},components:{TabSwitcher:m.Z,BlockList:Ye,MuteList:Ke,DomainMuteList:Ge,BlockCard:ye,MuteCard:xe,DomainMuteCard:Se,ProgressButton:Oe.Z,Autosuggest:ge,Checkbox:M.Z},computed:{knownDomains:function(){return this.$store.state.instance.knownDomains},user:function(){return this.$store.state.users.currentUser}},methods:{importFollows:function(e){return this.$store.state.api.backendInteractor.importFollows({file:e}).then((function(e){if(!e)throw new Error("failed")}))},importBlocks:function(e){return this.$store.state.api.backendInteractor.importBlocks({file:e}).then((function(e){if(!e)throw new Error("failed")}))},generateExportableUsersContent:function(e){return e.map((function(e){return e&&e.is_local?e.screen_name+"@"+location.hostname:e.screen_name})).join("\n")},activateTab:function(e){this.activeTab=e},filterUnblockedUsers:function(e){var t=this;return ce()(e,(function(e){return t.$store.getters.relationship(t.userId).blocking||e===t.user.id}))},filterUnMutedUsers:function(e){var t=this;return ce()(e,(function(e){return t.$store.getters.relationship(t.userId).muting||e===t.user.id}))},queryUserIds:function(e){return this.$store.dispatch("searchUsers",{query:e}).then((function(e){return ie()(e,"id")}))},blockUsers:function(e){return this.$store.dispatch("blockUsers",e)},unblockUsers:function(e){return this.$store.dispatch("unblockUsers",e)},muteUsers:function(e){return this.$store.dispatch("muteUsers",e)},unmuteUsers:function(e){return this.$store.dispatch("unmuteUsers",e)},filterUnMutedDomains:function(e){var t=this;return e.filter((function(e){return!t.user.domainMutes.includes(e)}))},queryKnownDomains:function(e){var t=this;return new Promise((function(n,l){n(t.knownDomains.filter((function(t){return t.toLowerCase().includes(e)})))}))},unmuteDomains:function(e){return this.$store.dispatch("unmuteDomains",e)}}},Qe=(0,B.Z)(Je,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("BlockCard"),i=(0,l.up)("Autosuggest"),u=(0,l.up)("ProgressButton"),c=(0,l.up)("BlockList"),d=(0,l.up)("MuteCard"),p=(0,l.up)("MuteList"),m=(0,l.up)("DomainMuteCard"),f=(0,l.up)("DomainMuteList"),g=(0,l.up)("tab-switcher");return(0,l.wg)(),(0,l.j4)(g,{"scrollable-tabs":!0,class:"mutes-and-blocks-tab"},{default:(0,l.w5)((function(){return[(0,l._)("div",{label:e.$t("settings.blocks_tab")},[(0,l._)("div",G,[(0,l.Wm)(i,{filter:e.filterUnblockedUsers,query:e.queryUserIds,placeholder:e.$t("settings.search_user_to_block")},{default:(0,l.w5)((function(e){return[(0,l.Wm)(r,{"user-id":e.item},null,8,["user-id"])]})),_:1},8,["filter","query","placeholder"])]),(0,l.Wm)(c,{refresh:!0,"get-key":function(e){return e}},{header:(0,l.w5)((function(t){var n=t.selected;return[(0,l._)("div",J,[n.length>0?((0,l.wg)(),(0,l.j4)(u,{key:0,class:"btn button-default bulk-action-button",click:function(){return e.blockUsers(n)}},{progress:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("user_card.block_progress")),1)]})),default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("user_card.block"))+" ",1)]})),_:2},1032,["click"])):(0,l.kq)("",!0),n.length>0?((0,l.wg)(),(0,l.j4)(u,{key:1,class:"btn button-default",click:function(){return e.unblockUsers(n)}},{progress:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("user_card.unblock_progress")),1)]})),default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("user_card.unblock"))+" ",1)]})),_:2},1032,["click"])):(0,l.kq)("",!0)])]})),item:(0,l.w5)((function(e){var t=e.item;return[(0,l.Wm)(r,{"user-id":t},null,8,["user-id"])]})),empty:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.no_blocks")),1)]})),_:1},8,["get-key"])],8,K),(0,l._)("div",{label:e.$t("settings.mutes_tab")},[(0,l.Wm)(g,null,{default:(0,l.w5)((function(){return[(0,l._)("div",{label:e.$t("settings.user_mutes")},[(0,l._)("div",ee,[(0,l.Wm)(i,{filter:e.filterUnMutedUsers,query:e.queryUserIds,placeholder:e.$t("settings.search_user_to_mute")},{default:(0,l.w5)((function(e){return[(0,l.Wm)(d,{"user-id":e.item},null,8,["user-id"])]})),_:1},8,["filter","query","placeholder"])]),(0,l.Wm)(p,{refresh:!0,"get-key":function(e){return e}},{header:(0,l.w5)((function(t){var n=t.selected;return[(0,l._)("div",te,[n.length>0?((0,l.wg)(),(0,l.j4)(u,{key:0,class:"btn button-default",click:function(){return e.muteUsers(n)}},{progress:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("user_card.mute_progress")),1)]})),default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("user_card.mute"))+" ",1)]})),_:2},1032,["click"])):(0,l.kq)("",!0),n.length>0?((0,l.wg)(),(0,l.j4)(u,{key:1,class:"btn button-default",click:function(){return e.unmuteUsers(n)}},{progress:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("user_card.unmute_progress")),1)]})),default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("user_card.unmute"))+" ",1)]})),_:2},1032,["click"])):(0,l.kq)("",!0)])]})),item:(0,l.w5)((function(e){var t=e.item;return[(0,l.Wm)(d,{"user-id":t},null,8,["user-id"])]})),empty:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.no_mutes")),1)]})),_:1},8,["get-key"])],8,X),(0,l._)("div",{label:e.$t("settings.domain_mutes")},[(0,l._)("div",le,[(0,l.Wm)(i,{filter:e.filterUnMutedDomains,query:e.queryKnownDomains,placeholder:e.$t("settings.type_domains_to_mute")},{default:(0,l.w5)((function(e){return[(0,l.Wm)(m,{domain:e.item},null,8,["domain"])]})),_:1},8,["filter","query","placeholder"])]),(0,l.Wm)(f,{refresh:!0,"get-key":function(e){return e}},{header:(0,l.w5)((function(t){var n=t.selected;return[(0,l._)("div",ae,[n.length>0?((0,l.wg)(),(0,l.j4)(u,{key:0,class:"btn button-default",click:function(){return e.unmuteDomains(n)}},{progress:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("domain_mute_card.unmute_progress")),1)]})),default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("domain_mute_card.unmute"))+" ",1)]})),_:2},1032,["click"])):(0,l.kq)("",!0)])]})),item:(0,l.w5)((function(e){var t=e.item;return[(0,l.Wm)(m,{domain:t},null,8,["domain"])]})),empty:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.no_mutes")),1)]})),_:1},8,["get-key"])],8,ne)]})),_:1})],8,Q)]})),_:1})}]]);var Xe=["label"],et={class:"setting-item"},tt={class:"setting-list"},nt={class:"select-multiple"},lt={class:"label"},at={class:"option-list"},ot={key:0,class:"setting-item"},st={class:"setting-list"},rt={class:"setting-item"},it={key:0,class:"BooleanSetting"},ut={key:0,class:"label"},ct=n(84506),dt=n(36968),pt=n.n(dt),mt={key:0,class:"ModifiedIndicator"},ht={class:"modified-tooltip"},ft=n(49874);D.vI.add(I.klh);const gt={components:{Popover:ft.default},props:["changed"]},bt=(0,B.Z)(gt,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("FAIcon"),i=(0,l.up)("Popover");return n.changed?((0,l.wg)(),(0,l.iD)("span",mt,[(0,l.Wm)(i,{trigger:"hover"},{trigger:(0,l.w5)((function(){return[(0,l.Uk)("   "),(0,l.Wm)(r,{icon:"wrench","aria-label":e.$t("settings.setting_changed")},null,8,["aria-label"])]})),content:(0,l.w5)((function(){return[(0,l._)("div",ht,(0,h.zw)(e.$t("settings.setting_changed")),1)]})),_:1})])):(0,l.kq)("",!0)}]]);var wt={key:0,class:"ServerSideIndicator"},_t={class:"serverside-tooltip"};D.vI.add(I.xf3);const kt={components:{Popover:ft.default},props:["serverSide"]},vt=(0,B.Z)(kt,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("FAIcon"),i=(0,l.up)("Popover");return n.serverSide?((0,l.wg)(),(0,l.iD)("span",wt,[(0,l.Wm)(i,{trigger:"hover"},{trigger:(0,l.w5)((function(){return[(0,l.Uk)("   "),(0,l.Wm)(r,{icon:"server","aria-label":e.$t("settings.setting_server_side")},null,8,["aria-label"])]})),content:(0,l.w5)((function(){return[(0,l._)("div",_t,(0,h.zw)(e.$t("settings.setting_server_side")),1)]})),_:1})])):(0,l.kq)("",!0)}]]);function yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}const $t={components:{Checkbox:M.Z,ModifiedIndicator:bt,ServerSideIndicator:vt},props:["path","disabled","expert"],computed:{pathDefault:function(){var e=this.path.split("."),t=(0,ct.Z)(e),n=t[0],l=t.slice(1);return[n+"DefaultValue"].concat((0,Ee.Z)(l)).join(".")},state:function(){var e=se()(this.$parent,this.path);return void 0===e?this.defaultState:e},defaultState:function(){return se()(this.$parent,this.pathDefault)},isServerSide:function(){return this.path.startsWith("serverSide_")},isChanged:function(){return!this.path.startsWith("serverSide_")&&this.state!==this.defaultState},matchesExpertLevel:function(){return(this.expert||0)<=this.$parent.expertLevel}},methods:{update:function(e){var t=this.path.split("."),n=(0,ct.Z)(t),l=n[0],a=n.slice(1);pt()(this.$parent,this.path,e),a.length>0&&pt()(this.$parent,l,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(n),!0).forEach((function(t){(0,W.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},se()(this.$parent,l)))},reset:function(){pt()(this.$parent,this.path,this.defaultState)}}},Ct=(0,B.Z)($t,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("ModifiedIndicator"),i=(0,l.up)("ServerSideIndicator"),u=(0,l.up)("Checkbox");return e.matchesExpertLevel?((0,l.wg)(),(0,l.iD)("label",it,[(0,l.Wm)(u,{"model-value":e.state,disabled:e.disabled,"onUpdate:modelValue":e.update},{default:(0,l.w5)((function(){return[e.$slots.default?((0,l.wg)(),(0,l.iD)("span",ut,[(0,l.WI)(e.$slots,"default")])):(0,l.kq)("",!0),(0,l.Uk)(" "+(0,h.zw)(" ")+" "),(0,l.Wm)(r,{changed:e.isChanged,onclick:e.reset},null,8,["changed","onclick"]),(0,l.Wm)(i,{"server-side":e.isServerSide},null,8,["server-side"])]})),_:3},8,["model-value","disabled","onUpdate:modelValue"])])):(0,l.kq)("",!0)}]]);var Vt=n(29439),Tt=n(85565),xt=n(65405);function Lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function Ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lt(Object(n),!0).forEach((function(t){(0,W.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ot=function(){return Ut(Ut(Ut(Ut({user:function(){return this.$store.state.users.currentUser}},Object.keys(Tt.W2).map((function(e){return[e+"DefaultValue",function(){return this.$store.getters.defaultConfig[e]}]})).reduce((function(e,t){var n=(0,Vt.Z)(t,2),l=n[0],a=n[1];return Ut(Ut({},e),{},(0,W.Z)({},l,a))}),{})),Object.keys(Tt.W2).map((function(e){return[e,{get:function(){return this.$store.getters.mergedConfig[e]},set:function(t){this.$store.dispatch("setOption",{name:e,value:t})}}]})).reduce((function(e,t){var n=(0,Vt.Z)(t,2),l=n[0],a=n[1];return Ut(Ut({},e),{},(0,W.Z)({},l,a))}),{})),Object.keys(xt.W2).map((function(e){return["serverSide_"+e,{get:function(){return this.$store.state.serverSideConfig[e]},set:function(t){this.$store.dispatch("setServerSideOption",{name:e,value:t})}}]})).reduce((function(e,t){var n=(0,Vt.Z)(t,2),l=n[0],a=n[1];return Ut(Ut({},e),{},(0,W.Z)({},l,a))}),{})),{},{useStreamingApi:{get:function(){return this.$store.getters.mergedConfig.useStreamingApi},set:function(e){var t=this;(e?this.$store.dispatch("enableMastoSockets"):this.$store.dispatch("disableMastoSockets")).then((function(){t.$store.dispatch("setOption",{name:"useStreamingApi",value:e})})).catch((function(e){console.error("Failed starting MastoAPI Streaming socket",e),t.$store.dispatch("disableMastoSockets"),t.$store.dispatch("setOption",{name:"useStreamingApi",value:!1})}))}}})};function Wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}const St={data:function(){return{activeTab:"profile",notificationSettings:this.$store.state.users.currentUser.notification_settings,newDomainToMute:""}},components:{BooleanSetting:Ct},computed:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wt(Object(n),!0).forEach((function(t){(0,W.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({user:function(){return this.$store.state.users.currentUser}},Ot()),methods:{updateNotificationSettings:function(){this.$store.state.api.backendInteractor.updateNotificationSettings({settings:this.notificationSettings})}}},zt=(0,B.Z)(St,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("BooleanSetting");return(0,l.wg)(),(0,l.iD)("div",{label:e.$t("settings.notifications")},[(0,l._)("div",et,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.notification_setting_filters")),1),(0,l._)("ul",tt,[(0,l._)("li",null,[(0,l.Wm)(r,{path:"serverSide_blockNotificationsFromStrangers"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.notification_setting_block_from_strangers")),1)]})),_:1})]),(0,l._)("li",nt,[(0,l._)("span",lt,(0,h.zw)(e.$t("settings.notification_visibility")),1),(0,l._)("ul",at,[(0,l._)("li",null,[(0,l.Wm)(r,{path:"notificationVisibility.likes"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.notification_visibility_likes")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"notificationVisibility.repeats"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.notification_visibility_repeats")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"notificationVisibility.follows"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.notification_visibility_follows")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"notificationVisibility.mentions"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.notification_visibility_mentions")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"notificationVisibility.moves"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.notification_visibility_moves")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"notificationVisibility.emojiReactions"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.notification_visibility_emoji_reactions")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"notificationVisibility.polls"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.notification_visibility_polls")),1)]})),_:1})])])])])]),e.expertLevel>0?((0,l.wg)(),(0,l.iD)("div",ot,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.notification_setting_privacy")),1),(0,l._)("ul",st,[(0,l._)("li",null,[(0,l.Wm)(r,{path:"webPushNotifications",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.enable_web_push_notifications")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"serverSide_webPushHideContents",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.notification_setting_hide_notification_contents")),1)]})),_:1})])])])):(0,l.kq)("",!0),(0,l._)("div",rt,[(0,l._)("p",null,(0,h.zw)(e.$t("settings.notification_mutes")),1),(0,l._)("p",null,(0,h.zw)(e.$t("settings.notification_blocks")),1)])],8,Xe)}]]);var Pt=["label"],Dt={class:"setting-item"},It={class:"setting-list"},jt={key:0,class:"setting-item"},Bt={class:"setting-list"},At=n(92742),Et=n.n(At),qt=n(63105),Ft=n.n(qt),Zt={key:0,class:"ChoiceSetting"},Mt=["value"],Rt=n(44313);const Nt={components:{Select:Rt.Z,ModifiedIndicator:bt,ServerSideIndicator:vt},props:["path","disabled","options","expert"],computed:{pathDefault:function(){var e=this.path.split("."),t=(0,ct.Z)(e),n=t[0],l=t.slice(1);return[n+"DefaultValue"].concat((0,Ee.Z)(l)).join(".")},state:function(){var e=se()(this.$parent,this.path);return void 0===e?this.defaultState:e},defaultState:function(){return se()(this.$parent,this.pathDefault)},isServerSide:function(){return this.path.startsWith("serverSide_")},isChanged:function(){return!this.path.startsWith("serverSide_")&&this.state!==this.defaultState},matchesExpertLevel:function(){return(this.expert||0)<=this.$parent.expertLevel}},methods:{update:function(e){pt()(this.$parent,this.path,e)},reset:function(){pt()(this.$parent,this.path,this.defaultState)}}},Ht=(0,B.Z)(Nt,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("Select"),i=(0,l.up)("ModifiedIndicator"),u=(0,l.up)("ServerSideIndicator");return e.matchesExpertLevel?((0,l.wg)(),(0,l.iD)("label",Zt,[(0,l.WI)(e.$slots,"default"),(0,l.Uk)(" "+(0,h.zw)(" ")+" "),(0,l.Wm)(r,{"model-value":e.state,disabled:e.disabled,"onUpdate:modelValue":e.update},{default:(0,l.w5)((function(){return[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.options,(function(t){return(0,l.wg)(),(0,l.iD)("option",{key:t.key,value:t.value},(0,h.zw)(t.label)+" "+(0,h.zw)(t.value===e.defaultState?e.$t("settings.instance_default_simple"):""),9,Mt)})),128))]})),_:1},8,["model-value","disabled","onUpdate:modelValue"]),(0,l.Wm)(i,{changed:e.isChanged,onclick:e.reset},null,8,["changed","onclick"]),(0,l.Wm)(u,{"server-side":e.isServerSide},null,8,["server-side"])])):(0,l.kq)("",!0)}]]);var Yt={key:0,class:"IntegerSetting"},Kt=["for"],Gt=["id","disabled","min","value"];const Jt={components:{ModifiedIndicator:bt},props:{path:String,disabled:Boolean,min:Number,expert:[Number,String]},computed:{pathDefault:function(){var e=this.path.split("."),t=(0,ct.Z)(e),n=t[0],l=t.slice(1);return[n+"DefaultValue"].concat((0,Ee.Z)(l)).join(".")},state:function(){var e=se()(this.$parent,this.path);return void 0===e?this.defaultState:e},defaultState:function(){return se()(this.$parent,this.pathDefault)},isChanged:function(){return this.state!==this.defaultState},matchesExpertLevel:function(){return(this.expert||0)<=this.$parent.expertLevel}},methods:{update:function(e){pt()(this.$parent,this.path,parseInt(e.target.value))},reset:function(){pt()(this.$parent,this.path,this.defaultState)}}},Qt=(0,B.Z)(Jt,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("ModifiedIndicator");return e.matchesExpertLevel?((0,l.wg)(),(0,l.iD)("span",Yt,[(0,l._)("label",{for:e.path},[(0,l.WI)(e.$slots,"default")],8,Kt),(0,l._)("input",{id:e.path,class:"number-input",type:"number",step:"1",disabled:e.disabled,min:e.min||0,value:e.state,onChange:t[0]||(t[0]=function(){return e.update&&e.update.apply(e,arguments)})},null,40,Gt),(0,l.Uk)(" "+(0,h.zw)(" ")+" "),(0,l.Wm)(r,{changed:e.isChanged,onclick:e.reset},null,8,["changed","onclick"])])):(0,l.kq)("",!0)}]]);function Xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function en(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xt(Object(n),!0).forEach((function(t){(0,W.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const tn={data:function(){var e=this;return{muteWordsStringLocal:this.$store.getters.mergedConfig.muteWords.join("\n"),replyVisibilityOptions:["all","following","self"].map((function(t){return{key:t,value:t,label:e.$t("settings.reply_visibility_".concat(t))}}))}},components:{BooleanSetting:Ct,ChoiceSetting:Ht,IntegerSetting:Qt},computed:en(en({},Ot()),{},{muteWordsString:{get:function(){return this.muteWordsStringLocal},set:function(e){this.muteWordsStringLocal=e,this.$store.dispatch("setOption",{name:"muteWords",value:Ft()(e.split("\n"),(function(e){return Et()(e).length>0}))})}}}),watch:{replyVisibility:function(){this.$store.dispatch("queueFlushAll")}}},nn=(0,B.Z)(tn,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("BooleanSetting"),i=(0,l.up)("ChoiceSetting"),u=(0,l.up)("IntegerSetting");return(0,l.wg)(),(0,l.iD)("div",{label:e.$t("settings.filtering")},[(0,l._)("div",Dt,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.posts")),1),(0,l._)("ul",It,[(0,l._)("li",null,[(0,l.Wm)(r,{path:"hideFilteredStatuses"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.hide_filtered_statuses")),1)]})),_:1}),(0,l._)("ul",{class:(0,h.C_)(["setting-list suboptions",[{disabled:!e.streaming}]])},[(0,l._)("li",null,[(0,l.Wm)(r,{disabled:e.hideFilteredStatuses,path:"hideWordFilteredPosts"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.hide_wordfiltered_statuses")),1)]})),_:1},8,["disabled"])]),(0,l._)("li",null,[e.user?((0,l.wg)(),(0,l.j4)(r,{key:0,disabled:e.hideFilteredStatuses,path:"hideMutedThreads"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.hide_muted_threads")),1)]})),_:1},8,["disabled"])):(0,l.kq)("",!0)]),(0,l._)("li",null,[e.user?((0,l.wg)(),(0,l.j4)(r,{key:0,disabled:e.hideFilteredStatuses,path:"hideMutedPosts"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.hide_muted_posts")),1)]})),_:1},8,["disabled"])):(0,l.kq)("",!0)])],2)]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"muteBotStatuses"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.mute_bot_posts")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"hidePostStats"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.hide_post_stats")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"hideBotIndication"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.hide_bot_indication")),1)]})),_:1})]),e.user?((0,l.wg)(),(0,l.j4)(i,{key:0,id:"replyVisibility",path:"replyVisibility",options:e.replyVisibilityOptions},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.replies_in_timeline")),1)]})),_:1},8,["options"])):(0,l.kq)("",!0),(0,l._)("li",null,[(0,l._)("h3",null,(0,h.zw)(e.$t("settings.wordfilter")),1),(0,l.wy)((0,l._)("textarea",{id:"muteWords","onUpdate:modelValue":t[0]||(t[0]=function(t){return e.muteWordsString=t}),class:"resize-height"},null,512),[[de.nr,e.muteWordsString]]),(0,l._)("div",null,(0,h.zw)(e.$t("settings.filtering_explanation")),1)]),(0,l._)("h3",null,(0,h.zw)(e.$t("settings.attachments")),1),(0,l._)("li",null,[(0,l.Wm)(u,{path:"maxThumbnails",expert:"1",min:0},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.max_thumbnails")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"hideAttachments"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.hide_attachments_in_tl")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"hideAttachmentsInConv"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.hide_attachments_in_convo")),1)]})),_:1})])])]),e.expertLevel>0?((0,l.wg)(),(0,l.iD)("div",jt,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.user_profiles")),1),(0,l._)("ul",Bt,[(0,l._)("li",null,[(0,l.Wm)(r,{path:"hideUserStats"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.hide_user_stats")),1)]})),_:1})])])])):(0,l.kq)("",!0)],8,Pt)}]]);var ln=["label"],an={class:"setting-item"},on={key:0},sn={class:"setting-item"},rn={key:0},un={key:1},cn={key:2},dn={class:"setting-item"},pn={class:"oauth-tokens"},mn=(0,l._)("th",null,null,-1),hn={class:"actions"},fn=["onClick"],gn={class:"setting-item"},bn=(0,l._)("th",null,null,-1),wn={class:"actions"},_n=["onClick"],kn={key:0,class:"alert error"},vn=(0,l._)("code",{place:"example"}," foo@example.org ",-1),yn={key:1},$n={key:2},Cn={class:"setting-item"},Vn=(0,l._)("code",{place:"example"}," foo@example.org ",-1),Tn={key:0},xn={key:1},Ln={class:"setting-item"},Un={key:0},On={key:1},Wn={key:2},Sn={key:3},zn={key:0,class:"setting-item mfa-settings"},Pn={class:"mfa-heading"},Dn={key:0,class:"setting-item"},In=(0,l._)("br",null,null,-1),jn={key:0},Bn={key:2},An={class:"warning"},En={key:1},qn={key:0},Fn={key:1},Zn={class:"setup-otp"},Mn={class:"qr-code"},Rn={class:"verify"},Nn={class:"confirm-otp-actions"},Hn={key:0,class:"alert error"},Yn=n(15861),Kn=n(64687),Gn=n.n(Kn),Jn={class:"mfa-backup-codes"},Qn={key:0},Xn={key:1},el={class:"alert warning"},tl={class:"backup-codes"};const nl={props:{backupCodes:{type:Object,default:function(){return{inProgress:!1,codes:[]}}}},data:function(){return{}},computed:{inProgress:function(){return this.backupCodes.inProgress},ready:function(){return this.backupCodes.codes.length>0},displayTitle:function(){return this.inProgress||this.ready}}},ll=(0,B.Z)(nl,[["render",function(e,t,n,a,o,s){return(0,l.wg)(),(0,l.iD)("div",Jn,[e.displayTitle?((0,l.wg)(),(0,l.iD)("h4",Qn,(0,h.zw)(e.$t("settings.mfa.recovery_codes")),1)):(0,l.kq)("",!0),e.inProgress?((0,l.wg)(),(0,l.iD)("i",Xn,(0,h.zw)(e.$t("settings.mfa.waiting_a_recovery_codes")),1)):(0,l.kq)("",!0),e.ready?((0,l.wg)(),(0,l.iD)(l.HY,{key:2},[(0,l._)("p",el,(0,h.zw)(e.$t("settings.mfa.recovery_codes_warning")),1),(0,l._)("ul",tl,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.backupCodes.codes,(function(e){return(0,l.wg)(),(0,l.iD)("li",{key:e},(0,h.zw)(e),1)})),128))])],64)):(0,l.kq)("",!0)])}]]);var al={class:"method-item"},ol=["disabled"],sl={key:1,class:"alert error"},rl=["disabled"],il=["disabled"];const ul={props:["disabled"],data:function(){return{}},methods:{confirm:function(){this.$emit("confirm")},cancel:function(){this.$emit("cancel")}}},cl=(0,B.Z)(ul,[["render",function(e,t,n,a,o,s){return(0,l.wg)(),(0,l.iD)("div",null,[(0,l.WI)(e.$slots,"default"),(0,l._)("button",{class:"btn button-default",disabled:e.disabled,onClick:t[0]||(t[0]=function(){return e.confirm&&e.confirm.apply(e,arguments)})},(0,h.zw)(e.$t("general.confirm")),9,rl),(0,l._)("button",{class:"btn button-default",disabled:e.disabled,onClick:t[1]||(t[1]=function(){return e.cancel&&e.cancel.apply(e,arguments)})},(0,h.zw)(e.$t("general.cancel")),9,il)])}]]);function dl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}const pl={props:["settings"],data:function(){return{error:!1,currentPassword:"",deactivate:!1,inProgress:!1}},components:{confirm:cl},computed:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dl(Object(n),!0).forEach((function(t){(0,W.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({isActivated:function(){return this.settings.totp}},(0,R.rn)({backendInteractor:function(e){return e.api.backendInteractor}})),methods:{doActivate:function(){this.$emit("activate")},cancelDeactivate:function(){this.deactivate=!1},doDeactivate:function(){this.error=null,this.deactivate=!0},confirmDeactivate:function(){var e=this;this.error=null,this.inProgress=!0,this.backendInteractor.mfaDisableOTP({password:this.currentPassword}).then((function(t){e.inProgress=!1,t.error?e.error=t.error:(e.deactivate=!1,e.$emit("deactivate"))}))}}};function ml(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}const hl={data:function(){return{settings:{available:!1,enabled:!1,totp:!1},setupState:{state:"",setupOTPState:""},backupCodes:{getNewCodes:!1,inProgress:!1,codes:[]},otpSettings:{provisioning_uri:"",key:""},currentPassword:null,otpConfirmToken:null,error:null,readyInit:!1}},components:{"recovery-codes":ll,"totp-item":(0,B.Z)(pl,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("confirm");return(0,l.wg)(),(0,l.iD)("div",null,[(0,l._)("div",al,[(0,l._)("strong",null,(0,h.zw)(e.$t("settings.mfa.otp")),1),e.isActivated?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("button",{key:0,class:"btn button-default",onClick:t[0]||(t[0]=function(){return e.doActivate&&e.doActivate.apply(e,arguments)})},(0,h.zw)(e.$t("general.enable")),1)),e.isActivated?((0,l.wg)(),(0,l.iD)("button",{key:1,class:"btn button-default",disabled:e.deactivate,onClick:t[1]||(t[1]=function(){return e.doDeactivate&&e.doDeactivate.apply(e,arguments)})},(0,h.zw)(e.$t("general.disable")),9,ol)):(0,l.kq)("",!0)]),e.deactivate?((0,l.wg)(),(0,l.j4)(r,{key:0,disabled:e.inProgress,onConfirm:e.confirmDeactivate,onCancel:e.cancelDeactivate},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.enter_current_password_to_confirm"))+": ",1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.currentPassword=t}),type:"password"},null,512),[[de.nr,e.currentPassword]])]})),_:1},8,["disabled","onConfirm","onCancel"])):(0,l.kq)("",!0),e.error?((0,l.wg)(),(0,l.iD)("div",sl,(0,h.zw)(e.error),1)):(0,l.kq)("",!0)])}]]),qrcode:n(99990).Z,confirm:cl},computed:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ml(Object(n),!0).forEach((function(t){(0,W.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ml(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({canSetupOTP:function(){return(this.setupInProgress&&this.backupCodesPrepared||this.settings.enabled)&&!this.settings.totp&&!this.setupOTPInProgress},setupInProgress:function(){return""!==this.setupState.state&&"complete"!==this.setupState.state},setupOTPInProgress:function(){return"setupOTP"===this.setupState.state&&!this.completedOTP},prepareOTP:function(){return"prepare"===this.setupState.setupOTPState},confirmOTP:function(){return"confirm"===this.setupState.setupOTPState},completedOTP:function(){return"completed"===this.setupState.setupOTPState},backupCodesPrepared:function(){return!this.backupCodes.inProgress&&this.backupCodes.codes.length>0},confirmNewBackupCodes:function(){return this.backupCodes.getNewCodes}},(0,R.rn)({backendInteractor:function(e){return e.api.backendInteractor}})),methods:{activateOTP:function(){this.settings.enabled||(this.setupState.state="getBackupcodes",this.fetchBackupCodes())},fetchBackupCodes:function(){var e=this;return this.backupCodes.inProgress=!0,this.backupCodes.codes=[],this.backendInteractor.generateMfaBackupCodes().then((function(t){e.backupCodes.codes=t.codes,e.backupCodes.inProgress=!1}))},getBackupCodes:function(){this.backupCodes.getNewCodes=!0},confirmBackupCodes:function(){var e=this;this.fetchBackupCodes().then((function(t){e.backupCodes.getNewCodes=!1}))},cancelBackupCodes:function(){this.backupCodes.getNewCodes=!1},setupOTP:function(){var e=this;this.setupState.state="setupOTP",this.setupState.setupOTPState="prepare",this.backendInteractor.mfaSetupOTP().then((function(t){e.otpSettings=t,e.setupState.setupOTPState="confirm"}))},doConfirmOTP:function(){var e=this;this.error=null,this.backendInteractor.mfaConfirmOTP({token:this.otpConfirmToken,password:this.currentPassword}).then((function(t){t.error?e.error=t.error:e.completeSetup()}))},completeSetup:function(){this.setupState.setupOTPState="complete",this.setupState.state="complete",this.currentPassword=null,this.error=null,this.fetchSettings()},cancelSetup:function(){this.setupState.setupOTPState="",this.setupState.state="",this.currentPassword=null,this.error=null},fetchSettings:function(){var e=this;return(0,Yn.Z)(Gn().mark((function t(){var n;return Gn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.backendInteractor.settingsMFA();case 2:if(!(n=t.sent).error){t.next=5;break}return t.abrupt("return");case 5:return e.settings=n.settings,e.settings.available=!0,t.abrupt("return",n);case 8:case"end":return t.stop()}}),t)})))()}},mounted:function(){var e=this;this.fetchSettings().then((function(){e.readyInit=!0}))}},fl=(0,B.Z)(hl,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("totp-item"),i=(0,l.up)("recovery-codes"),u=(0,l.up)("confirm"),c=(0,l.up)("qrcode");return e.readyInit&&e.settings.available?((0,l.wg)(),(0,l.iD)("div",zn,[(0,l._)("div",Pn,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.mfa.title")),1)]),(0,l._)("div",null,[e.setupInProgress?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("div",Dn,[(0,l._)("h3",null,(0,h.zw)(e.$t("settings.mfa.authentication_methods")),1),(0,l.Wm)(r,{settings:e.settings,onDeactivate:e.fetchSettings,onActivate:e.activateOTP},null,8,["settings","onDeactivate","onActivate"]),In,e.settings.enabled?((0,l.wg)(),(0,l.iD)("div",jn,[e.confirmNewBackupCodes?(0,l.kq)("",!0):((0,l.wg)(),(0,l.j4)(i,{key:0,"backup-codes":e.backupCodes},null,8,["backup-codes"])),e.confirmNewBackupCodes?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("button",{key:1,class:"btn button-default",onClick:t[0]||(t[0]=function(){return e.getBackupCodes&&e.getBackupCodes.apply(e,arguments)})},(0,h.zw)(e.$t("settings.mfa.generate_new_recovery_codes")),1)),e.confirmNewBackupCodes?((0,l.wg)(),(0,l.iD)("div",Bn,[(0,l.Wm)(u,{disabled:e.backupCodes.inProgress,onConfirm:e.confirmBackupCodes,onCancel:e.cancelBackupCodes},{default:(0,l.w5)((function(){return[(0,l._)("p",An,(0,h.zw)(e.$t("settings.mfa.warning_of_generate_new_codes")),1)]})),_:1},8,["disabled","onConfirm","onCancel"])])):(0,l.kq)("",!0)])):(0,l.kq)("",!0)])),e.setupInProgress?((0,l.wg)(),(0,l.iD)("div",En,[(0,l._)("h3",null,(0,h.zw)(e.$t("settings.mfa.setup_otp")),1),e.setupOTPInProgress?(0,l.kq)("",!0):((0,l.wg)(),(0,l.j4)(i,{key:0,"backup-codes":e.backupCodes},null,8,["backup-codes"])),e.canSetupOTP?((0,l.wg)(),(0,l.iD)("button",{key:1,class:"btn button-default",onClick:t[1]||(t[1]=function(){return e.cancelSetup&&e.cancelSetup.apply(e,arguments)})},(0,h.zw)(e.$t("general.cancel")),1)):(0,l.kq)("",!0),e.canSetupOTP?((0,l.wg)(),(0,l.iD)("button",{key:2,class:"btn button-default",onClick:t[2]||(t[2]=function(){return e.setupOTP&&e.setupOTP.apply(e,arguments)})},(0,h.zw)(e.$t("settings.mfa.setup_otp")),1)):(0,l.kq)("",!0),e.setupOTPInProgress?((0,l.wg)(),(0,l.iD)(l.HY,{key:3},[e.prepareOTP?((0,l.wg)(),(0,l.iD)("i",qn,(0,h.zw)(e.$t("settings.mfa.wait_pre_setup_otp")),1)):(0,l.kq)("",!0),e.confirmOTP?((0,l.wg)(),(0,l.iD)("div",Fn,[(0,l._)("div",Zn,[(0,l._)("div",Mn,[(0,l._)("h4",null,(0,h.zw)(e.$t("settings.mfa.scan.title")),1),(0,l._)("p",null,(0,h.zw)(e.$t("settings.mfa.scan.desc")),1),(0,l.Wm)(c,{value:e.otpSettings.provisioning_uri,options:{width:200}},null,8,["value"]),(0,l._)("p",null,(0,h.zw)(e.$t("settings.mfa.scan.secret_code"))+": "+(0,h.zw)(e.otpSettings.key),1)]),(0,l._)("div",Rn,[(0,l._)("h4",null,(0,h.zw)(e.$t("general.verify")),1),(0,l._)("p",null,(0,h.zw)(e.$t("settings.mfa.verify.desc")),1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.otpConfirmToken=t}),type:"text"},null,512),[[de.nr,e.otpConfirmToken]]),(0,l._)("p",null,(0,h.zw)(e.$t("settings.enter_current_password_to_confirm"))+":",1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.currentPassword=t}),type:"password"},null,512),[[de.nr,e.currentPassword]]),(0,l._)("div",Nn,[(0,l._)("button",{class:"btn button-default",onClick:t[5]||(t[5]=function(){return e.doConfirmOTP&&e.doConfirmOTP.apply(e,arguments)})},(0,h.zw)(e.$t("settings.mfa.confirm_and_enable")),1),(0,l._)("button",{class:"btn button-default",onClick:t[6]||(t[6]=function(){return e.cancelSetup&&e.cancelSetup.apply(e,arguments)})},(0,h.zw)(e.$t("general.cancel")),1)]),e.error?((0,l.wg)(),(0,l.iD)("div",Hn,(0,h.zw)(e.error),1)):(0,l.kq)("",!0)])])])):(0,l.kq)("",!0)],64)):(0,l.kq)("",!0)])):(0,l.kq)("",!0)])])):(0,l.kq)("",!0)}]]);var gl=n(39776);const bl={data:function(){return{newEmail:"",changeEmailError:!1,changeEmailPassword:"",changedEmail:!1,deletingAccount:!1,deleteAccountConfirmPasswordInput:"",deleteAccountError:!1,changePasswordInputs:["","",""],changedPassword:!1,changePasswordError:!1,moveAccountTarget:"",moveAccountPassword:"",movedAccount:!1,moveAccountError:!1,aliases:[],listAliasesError:!1,addAliasTarget:"",addedAlias:!1,addAliasError:!1}},created:function(){this.$store.dispatch("fetchTokens"),this.fetchAliases()},components:{ProgressButton:Oe.Z,Mfa:fl,Checkbox:M.Z},computed:{user:function(){return this.$store.state.users.currentUser},pleromaBackend:function(){return this.$store.state.instance.pleromaBackend},oauthTokens:function(){var e=this;return this.$store.state.oauthTokens.tokens.map((function(t){return{id:t.id,appName:t.app_name,validUntil:new Date(t.valid_until).toLocaleDateString(gl.Z.internalToBrowserLocale(e.$i18n.locale))}}))}},methods:{confirmDelete:function(){this.deletingAccount=!0},deleteAccount:function(){var e=this;this.$store.state.api.backendInteractor.deleteAccount({password:this.deleteAccountConfirmPasswordInput}).then((function(t){"success"===t.status?(e.$store.dispatch("logout"),e.$router.push({name:"root"})):e.deleteAccountError=t.error}))},changePassword:function(){var e=this,t={password:this.changePasswordInputs[0],newPassword:this.changePasswordInputs[1],newPasswordConfirmation:this.changePasswordInputs[2]};this.$store.state.api.backendInteractor.changePassword(t).then((function(t){"success"===t.status?(e.changedPassword=!0,e.changePasswordError=!1,e.logout()):(e.changedPassword=!1,e.changePasswordError=t.error)}))},changeEmail:function(){var e=this,t={email:this.newEmail,password:this.changeEmailPassword};this.$store.state.api.backendInteractor.changeEmail(t).then((function(t){"success"===t.status?(e.changedEmail=!0,e.changeEmailError=!1):(e.changedEmail=!1,e.changeEmailError=t.error)}))},moveAccount:function(){var e=this,t={targetAccount:this.moveAccountTarget,password:this.moveAccountPassword};this.$store.state.api.backendInteractor.moveAccount(t).then((function(t){"success"===t.status?(e.movedAccount=!0,e.moveAccountError=!1):(e.movedAccount=!1,e.moveAccountError=t.error)}))},removeAlias:function(e){var t=this;this.$store.state.api.backendInteractor.deleteAlias({alias:e}).then((function(){return t.fetchAliases()}))},addAlias:function(){var e=this;this.$store.state.api.backendInteractor.addAlias({alias:this.addAliasTarget}).then((function(t){e.addedAlias=!0,e.addAliasError=!1,e.addAliasTarget=""})).catch((function(t){e.addedAlias=!1,e.addAliasError=t})).then((function(){return e.fetchAliases()}))},fetchAliases:function(){var e=this;this.$store.state.api.backendInteractor.listAliases().then((function(t){e.aliases=t.aliases,e.listAliasesError=!1})).catch((function(t){e.listAliasesError=t.error}))},logout:function(){this.$store.dispatch("logout"),this.$router.replace("/")},revokeToken:function(e){window.confirm("".concat(this.$i18n.t("settings.revoke_token"),"?"))&&this.$store.dispatch("revokeToken",e)}}},wl=(0,B.Z)(bl,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("mfa"),i=(0,l.up)("FAIcon"),u=(0,l.up)("i18n");return(0,l.wg)(),(0,l.iD)("div",{label:e.$t("settings.security_tab")},[(0,l._)("div",an,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.change_email")),1),(0,l._)("div",null,[(0,l._)("p",null,(0,h.zw)(e.$t("settings.new_email")),1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.newEmail=t}),type:"email",autocomplete:"email"},null,512),[[de.nr,e.newEmail]])]),(0,l._)("div",null,[(0,l._)("p",null,(0,h.zw)(e.$t("settings.current_password")),1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.changeEmailPassword=t}),type:"password",autocomplete:"current-password"},null,512),[[de.nr,e.changeEmailPassword]])]),(0,l._)("button",{class:"btn button-default",onClick:t[2]||(t[2]=function(){return e.changeEmail&&e.changeEmail.apply(e,arguments)})},(0,h.zw)(e.$t("settings.save")),1),e.changedEmail?((0,l.wg)(),(0,l.iD)("p",on,(0,h.zw)(e.$t("settings.changed_email")),1)):(0,l.kq)("",!0),!1!==e.changeEmailError?((0,l.wg)(),(0,l.iD)(l.HY,{key:1},[(0,l._)("p",null,(0,h.zw)(e.$t("settings.change_email_error")),1),(0,l._)("p",null,(0,h.zw)(e.changeEmailError),1)],64)):(0,l.kq)("",!0)]),(0,l._)("div",sn,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.change_password")),1),(0,l._)("div",null,[(0,l._)("p",null,(0,h.zw)(e.$t("settings.current_password")),1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.changePasswordInputs[0]=t}),type:"password"},null,512),[[de.nr,e.changePasswordInputs[0]]])]),(0,l._)("div",null,[(0,l._)("p",null,(0,h.zw)(e.$t("settings.new_password")),1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.changePasswordInputs[1]=t}),type:"password"},null,512),[[de.nr,e.changePasswordInputs[1]]])]),(0,l._)("div",null,[(0,l._)("p",null,(0,h.zw)(e.$t("settings.confirm_new_password")),1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.changePasswordInputs[2]=t}),type:"password"},null,512),[[de.nr,e.changePasswordInputs[2]]])]),(0,l._)("button",{class:"btn button-default",onClick:t[6]||(t[6]=function(){return e.changePassword&&e.changePassword.apply(e,arguments)})},(0,h.zw)(e.$t("settings.save")),1),e.changedPassword?((0,l.wg)(),(0,l.iD)("p",rn,(0,h.zw)(e.$t("settings.changed_password")),1)):!1!==e.changePasswordError?((0,l.wg)(),(0,l.iD)("p",un,(0,h.zw)(e.$t("settings.change_password_error")),1)):(0,l.kq)("",!0),e.changePasswordError?((0,l.wg)(),(0,l.iD)("p",cn,(0,h.zw)(e.changePasswordError),1)):(0,l.kq)("",!0)]),(0,l._)("div",dn,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.oauth_tokens")),1),(0,l._)("table",pn,[(0,l._)("thead",null,[(0,l._)("tr",null,[(0,l._)("th",null,(0,h.zw)(e.$t("settings.app_name")),1),(0,l._)("th",null,(0,h.zw)(e.$t("settings.valid_until")),1),mn])]),(0,l._)("tbody",null,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.oauthTokens,(function(t){return(0,l.wg)(),(0,l.iD)("tr",{key:t.id},[(0,l._)("td",null,(0,h.zw)(t.appName),1),(0,l._)("td",null,(0,h.zw)(t.validUntil),1),(0,l._)("td",hn,[(0,l._)("button",{class:"btn button-default",onClick:function(n){return e.revokeToken(t.id)}},(0,h.zw)(e.$t("settings.revoke_token")),9,fn)])])})),128))])])]),(0,l.Wm)(r),(0,l._)("div",gn,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.account_alias")),1),(0,l._)("table",null,[(0,l._)("thead",null,[(0,l._)("tr",null,[(0,l._)("th",null,(0,h.zw)(e.$t("settings.account_alias_table_head")),1),bn])]),(0,l._)("tbody",null,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.aliases,(function(t){return(0,l.wg)(),(0,l.iD)("tr",{key:t},[(0,l._)("td",null,(0,h.zw)(t),1),(0,l._)("td",wn,[(0,l._)("button",{class:"btn button-default",onClick:function(n){return e.removeAlias(t)}},(0,h.zw)(e.$t("settings.remove_alias")),9,_n)])])})),128))])]),e.listAliasesError?((0,l.wg)(),(0,l.iD)("div",kn,[(0,l.Uk)((0,h.zw)(e.$t("settings.list_aliases_error",{error:e.error}))+" ",1),(0,l.Wm)(i,{class:"fa-scale-110 fa-old-padding",icon:"times",title:e.$t("settings.hide_list_aliases_error_action"),onClick:t[7]||(t[7]=function(t){return e.listAliasesError=!1})},null,8,["title"])])):(0,l.kq)("",!0),(0,l._)("div",null,[(0,l.Wm)(u,{path:"settings.new_alias_target",tag:"p"},{default:(0,l.w5)((function(){return[vn]})),_:1}),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.addAliasTarget=t})},null,512),[[de.nr,e.addAliasTarget]])]),(0,l._)("button",{class:"btn button-default",onClick:t[9]||(t[9]=function(){return e.addAlias&&e.addAlias.apply(e,arguments)})},(0,h.zw)(e.$t("settings.save")),1),e.addedAlias?((0,l.wg)(),(0,l.iD)("p",yn,(0,h.zw)(e.$t("settings.added_alias")),1)):(0,l.kq)("",!0),!1!==e.addAliasError?((0,l.wg)(),(0,l.iD)("p",$n,(0,h.zw)(e.$t("settings.add_alias_error",{error:e.addAliasError})),1)):(0,l.kq)("",!0)]),(0,l._)("div",Cn,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.move_account")),1),(0,l._)("p",null,(0,h.zw)(e.$t("settings.move_account_notes")),1),(0,l._)("div",null,[(0,l.Wm)(u,{path:"settings.move_account_target",tag:"p"},{default:(0,l.w5)((function(){return[Vn]})),_:1}),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[10]||(t[10]=function(t){return e.moveAccountTarget=t})},null,512),[[de.nr,e.moveAccountTarget]])]),(0,l._)("div",null,[(0,l._)("p",null,(0,h.zw)(e.$t("settings.current_password")),1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[11]||(t[11]=function(t){return e.moveAccountPassword=t}),type:"password",autocomplete:"current-password"},null,512),[[de.nr,e.moveAccountPassword]])]),(0,l._)("button",{class:"btn button-default",onClick:t[12]||(t[12]=function(){return e.moveAccount&&e.moveAccount.apply(e,arguments)})},(0,h.zw)(e.$t("settings.save")),1),e.movedAccount?((0,l.wg)(),(0,l.iD)("p",Tn,(0,h.zw)(e.$t("settings.moved_account")),1)):(0,l.kq)("",!0),!1!==e.moveAccountError?((0,l.wg)(),(0,l.iD)("p",xn,(0,h.zw)(e.$t("settings.move_account_error",{error:e.moveAccountError})),1)):(0,l.kq)("",!0)]),(0,l._)("div",Ln,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.delete_account")),1),e.deletingAccount?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("p",Un,(0,h.zw)(e.$t("settings.delete_account_description")),1)),e.deletingAccount?((0,l.wg)(),(0,l.iD)("div",On,[(0,l._)("p",null,(0,h.zw)(e.$t("settings.delete_account_instructions")),1),(0,l._)("p",null,(0,h.zw)(e.$t("login.password")),1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[13]||(t[13]=function(t){return e.deleteAccountConfirmPasswordInput=t}),type:"password"},null,512),[[de.nr,e.deleteAccountConfirmPasswordInput]]),(0,l._)("button",{class:"btn button-default",onClick:t[14]||(t[14]=function(){return e.deleteAccount&&e.deleteAccount.apply(e,arguments)})},(0,h.zw)(e.$t("settings.delete_account")),1)])):(0,l.kq)("",!0),!1!==e.deleteAccountError?((0,l.wg)(),(0,l.iD)("p",Wn,(0,h.zw)(e.$t("settings.delete_account_error")),1)):(0,l.kq)("",!0),e.deleteAccountError?((0,l.wg)(),(0,l.iD)("p",Sn,(0,h.zw)(e.deleteAccountError),1)):(0,l.kq)("",!0),e.deletingAccount?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("button",{key:4,class:"btn button-default",onClick:t[15]||(t[15]=function(){return e.confirmDelete&&e.confirmDelete.apply(e,arguments)})},(0,h.zw)(e.$t("settings.delete_account")),1))])],8,ln)}]]);var _l={class:"profile-tab"},kl={class:"setting-item"},vl={key:0},yl={key:1},$l=["onUpdate:modelValue","placeholder"],Cl=["onUpdate:modelValue","placeholder"],Vl=["onClick"],Tl=["disabled"],xl={class:"setting-item"},Ll={class:"visibility-notice"},Ul={class:"current-avatar-container"},Ol=["src"],Wl=["title"],Sl={class:"setting-item"},zl={class:"banner-background-preview"},Pl=["src"],Dl=["title"],Il=["src"],jl={class:"setting-item"},Bl={class:"banner-background-preview"},Al=["src"],El=["title"],ql=["src"],Fl={class:"setting-item"},Zl={class:"setting-list"},Ml=n(27955),Rl=n.n(Ml),Nl=n(82492),Hl=n.n(Nl),Yl={class:"image-cropper"},Kl={key:0},Gl={class:"image-cropper-image-container"},Jl=["src"],Ql={class:"image-cropper-buttons-wrapper"},Xl=["disabled","textContent"],ea=["disabled","textContent"],ta=["disabled","textContent"],na=["accept"],la=n(71002),aa=n(33129),oa=n.n(aa);D.vI.add(I.IJ7);const sa={props:{trigger:{type:[String,window.Element],required:!0},submitHandler:{type:Function,required:!0},cropperOptions:{type:Object,default:function(){return{aspectRatio:1,autoCropArea:1,viewMode:1,movable:!1,zoomable:!1,guides:!1}}},mimes:{type:String,default:"image/png, image/gif, image/jpeg, image/bmp, image/x-icon"},saveButtonLabel:{type:String},saveWithoutCroppingButtonlabel:{type:String},cancelButtonLabel:{type:String}},data:function(){return{cropper:void 0,dataUrl:void 0,filename:void 0,submitting:!1}},computed:{saveText:function(){return this.saveButtonLabel||this.$t("image_cropper.save")},saveWithoutCroppingText:function(){return this.saveWithoutCroppingButtonlabel||this.$t("image_cropper.save_without_cropping")},cancelText:function(){return this.cancelButtonLabel||this.$t("image_cropper.cancel")}},methods:{destroy:function(){this.cropper&&this.cropper.destroy(),this.$refs.input.value="",this.dataUrl=void 0,this.$emit("close")},submit:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.submitting=!0,this.submitHandler(t&&this.cropper,this.file).then((function(){return e.destroy()})).finally((function(){e.submitting=!1}))},pickImage:function(){this.$refs.input.click()},createCropper:function(){this.cropper=new(oa())(this.$refs.img,this.cropperOptions)},getTriggerDOM:function(){return"object"===(0,la.Z)(this.trigger)?this.trigger:document.querySelector(this.trigger)},readFile:function(){var e=this,t=this.$refs.input;if(null!=t.files&&null!=t.files[0]){this.file=t.files[0];var n=new window.FileReader;n.onload=function(t){e.dataUrl=t.target.result,e.$emit("open")},n.readAsDataURL(this.file),this.$emit("changed",this.file,n)}}},mounted:function(){var e=this.getTriggerDOM();e?e.addEventListener("click",this.pickImage):this.$emit("error","No image make trigger found.","user"),this.$refs.input.addEventListener("change",this.readFile)},beforeUnmount:function(){var e=this.getTriggerDOM();e&&e.removeEventListener("click",this.pickImage),this.$refs.input.removeEventListener("change",this.readFile)}},ra=(0,B.Z)(sa,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("FAIcon");return(0,l.wg)(),(0,l.iD)("div",Yl,[e.dataUrl?((0,l.wg)(),(0,l.iD)("div",Kl,[(0,l._)("div",Gl,[(0,l._)("img",{ref:"img",src:e.dataUrl,alt:"",onLoad:t[0]||(t[0]=(0,de.iM)((function(){return e.createCropper&&e.createCropper.apply(e,arguments)}),["stop"]))},null,40,Jl)]),(0,l._)("div",Ql,[(0,l._)("button",{class:"button-default btn",type:"button",disabled:e.submitting,onClick:t[1]||(t[1]=function(t){return e.submit()}),textContent:(0,h.zw)(e.saveText)},null,8,Xl),(0,l._)("button",{class:"button-default btn",type:"button",disabled:e.submitting,onClick:t[2]||(t[2]=function(){return e.destroy&&e.destroy.apply(e,arguments)}),textContent:(0,h.zw)(e.cancelText)},null,8,ea),(0,l._)("button",{class:"button-default btn",type:"button",disabled:e.submitting,onClick:t[3]||(t[3]=function(t){return e.submit(!1)}),textContent:(0,h.zw)(e.saveWithoutCroppingText)},null,8,ta),e.submitting?((0,l.wg)(),(0,l.j4)(r,{key:0,spin:"",icon:"circle-notch"})):(0,l.kq)("",!0)])])):(0,l.kq)("",!0),(0,l._)("input",{ref:"input",type:"file",class:"image-cropper-img-input",accept:e.mimes},null,8,na)])}]]);var ia=n(4078),ua=n(65079),ca=n(38658),da=n(19003),pa=n(80034);function ma(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function ha(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ma(Object(n),!0).forEach((function(t){(0,W.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ma(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}D.vI.add(I.NBC,I.r8p,I.IJ7);var fa={data:function(){return{newName:this.$store.state.users.currentUser.name_unescaped,newBio:Rl()(this.$store.state.users.currentUser.description),newLocked:this.$store.state.users.currentUser.locked,newFields:this.$store.state.users.currentUser.fields.map((function(e){return{name:e.name,value:e.value}})),showRole:this.$store.state.users.currentUser.show_role,role:this.$store.state.users.currentUser.role,bot:this.$store.state.users.currentUser.bot,pickAvatarBtnVisible:!0,bannerUploading:!1,backgroundUploading:!1,banner:null,bannerPreview:null,background:null,backgroundPreview:null,emailLanguage:this.$store.state.users.currentUser.language||""}},components:{ScopeSelector:ia.Z,ImageCropper:ra,EmojiInput:ca.Z,Autosuggest:ge,ProgressButton:Oe.Z,Checkbox:M.Z,BooleanSetting:Ct,InterfaceLanguageSwitcher:pa.Z},computed:ha(ha({user:function(){return this.$store.state.users.currentUser}},Ot()),{},{emojiUserSuggestor:function(){return(0,da.ZP)({emoji:[].concat((0,Ee.Z)(this.$store.getters.standardEmojiList),(0,Ee.Z)(this.$store.state.instance.customEmoji)),store:this.$store})},emojiSuggestor:function(){return(0,da.ZP)({emoji:[].concat((0,Ee.Z)(this.$store.getters.standardEmojiList),(0,Ee.Z)(this.$store.state.instance.customEmoji))})},userSuggestor:function(){return(0,da.ZP)({store:this.$store})},fieldsLimits:function(){return this.$store.state.instance.fieldsLimits},maxFields:function(){return this.fieldsLimits?this.fieldsLimits.maxFields:0},defaultAvatar:function(){return this.$store.state.instance.server+this.$store.state.instance.defaultAvatar},defaultBanner:function(){return this.$store.state.instance.server+this.$store.state.instance.defaultBanner},isDefaultAvatar:function(){var e=this.$store.state.instance.defaultAvatar;return!this.$store.state.users.currentUser.profile_image_url||this.$store.state.users.currentUser.profile_image_url.includes(e)},isDefaultBanner:function(){var e=this.$store.state.instance.defaultBanner;return!this.$store.state.users.currentUser.cover_photo||this.$store.state.users.currentUser.cover_photo.includes(e)},isDefaultBackground:function(){return!this.$store.state.users.currentUser.background_image},avatarImgSrc:function(){return this.$store.state.users.currentUser.profile_image_url_original||this.defaultAvatar},bannerImgSrc:function(){return this.$store.state.users.currentUser.cover_photo||this.defaultBanner}}),methods:{updateProfile:function(){var e=this,t={note:this.newBio,locked:this.newLocked,display_name:this.newName,fields_attributes:this.newFields.filter((function(e){return null!=e})),bot:this.bot,show_role:this.showRole};this.emailLanguage&&(t.language=gl.Z.internalToBackendLocale(this.emailLanguage)),this.$store.state.api.backendInteractor.updateProfile({params:t}).then((function(t){e.newFields.splice(t.fields.length),Hl()(e.newFields,t.fields),e.$store.commit("addNewUsers",[t]),e.$store.commit("setCurrentUser",t)}))},changeVis:function(e){this.newDefaultScope=e},addField:function(){return this.newFields.length<this.maxFields&&(this.newFields.push({name:"",value:""}),!0)},deleteField:function(e,t){this.$delete(this.newFields,e)},uploadFile:function(e,t){var n=this,l=t.target.files[0];if(l)if(l.size>this.$store.state.instance[e+"limit"]){var a=ua.Z.fileSizeFormat(l.size),o=ua.Z.fileSizeFormat(this.$store.state.instance[e+"limit"]);this.$store.dispatch("pushGlobalNotice",{messageKey:"upload.error.message",messageArgs:[this.$t("upload.error.file_too_big",{filesize:a.num,filesizeunit:a.unit,allowedsize:o.num,allowedsizeunit:o.unit})],level:"error"})}else{var s=new FileReader;s.onload=function(t){var a=t.target.result;n[e+"Preview"]=a,n[e]=l},s.readAsDataURL(l)}},resetAvatar:function(){window.confirm(this.$t("settings.reset_avatar_confirm"))&&this.submitAvatar(void 0,"")},resetBanner:function(){window.confirm(this.$t("settings.reset_banner_confirm"))&&this.submitBanner("")},resetBackground:function(){window.confirm(this.$t("settings.reset_background_confirm"))&&this.submitBackground("")},submitAvatar:function(e,t){var n=this;return new Promise((function(l,a){function o(e,t){n.$store.state.api.backendInteractor.updateProfileImages({avatar:e,avatarName:t}).then((function(e){n.$store.commit("addNewUsers",[e]),n.$store.commit("setCurrentUser",e),l()})).catch((function(e){n.displayUploadError(e),a(e)}))}e?e.getCroppedCanvas().toBlob((function(e){return o(e,t.name)}),t.type):o(t,t.name)}))},submitBanner:function(e){var t=this;(this.bannerPreview||""===e)&&(this.bannerUploading=!0,this.$store.state.api.backendInteractor.updateProfileImages({banner:e}).then((function(e){t.$store.commit("addNewUsers",[e]),t.$store.commit("setCurrentUser",e),t.bannerPreview=null})).catch(this.displayUploadError).finally((function(){t.bannerUploading=!1})))},submitBackground:function(e){var t=this;(this.backgroundPreview||""===e)&&(this.backgroundUploading=!0,this.$store.state.api.backendInteractor.updateProfileImages({background:e}).then((function(e){t.$store.commit("addNewUsers",[e]),t.$store.commit("setCurrentUser",e),t.backgroundPreview=null})).catch(this.displayUploadError).finally((function(){t.backgroundUploading=!1})))},displayUploadError:function(e){this.$store.dispatch("pushGlobalNotice",{messageKey:"upload.error.message",messageArgs:[e.message],level:"error"})}}};const ga=fa,ba=(0,B.Z)(ga,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("EmojiInput"),i=(0,l.up)("Checkbox"),u=(0,l.up)("FAIcon"),c=(0,l.up)("interface-language-switcher"),d=(0,l.up)("image-cropper"),p=(0,l.up)("BooleanSetting");return(0,l.wg)(),(0,l.iD)("div",_l,[(0,l._)("div",kl,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.name_bio")),1),(0,l._)("p",null,(0,h.zw)(e.$t("settings.name")),1),(0,l.Wm)(r,{modelValue:e.newName,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.newName=t}),"enable-emoji-picker":"",suggest:e.emojiSuggestor},{default:(0,l.w5)((function(){return[(0,l.wy)((0,l._)("input",{id:"username","onUpdate:modelValue":t[0]||(t[0]=function(t){return e.newName=t}),class:"name-changer"},null,512),[[de.nr,e.newName]])]})),_:1},8,["modelValue","suggest"]),(0,l._)("p",null,(0,h.zw)(e.$t("settings.bio")),1),(0,l.Wm)(r,{modelValue:e.newBio,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.newBio=t}),"enable-emoji-picker":"",suggest:e.emojiUserSuggestor},{default:(0,l.w5)((function(){return[(0,l.wy)((0,l._)("textarea",{"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.newBio=t}),class:"bio resize-height"},null,512),[[de.nr,e.newBio]])]})),_:1},8,["modelValue","suggest"]),"admin"===e.role||"moderator"===e.role?((0,l.wg)(),(0,l.iD)("p",vl,[(0,l.Wm)(i,{modelValue:e.showRole,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.showRole=t})},{default:(0,l.w5)((function(){return["admin"===e.role?((0,l.wg)(),(0,l.iD)(l.HY,{key:0},[(0,l.Uk)((0,h.zw)(e.$t("settings.show_admin_badge")),1)],64)):(0,l.kq)("",!0),"moderator"===e.role?((0,l.wg)(),(0,l.iD)(l.HY,{key:1},[(0,l.Uk)((0,h.zw)(e.$t("settings.show_moderator_badge")),1)],64)):(0,l.kq)("",!0)]})),_:1},8,["modelValue"])])):(0,l.kq)("",!0),e.maxFields>0?((0,l.wg)(),(0,l.iD)("div",yl,[(0,l._)("p",null,(0,h.zw)(e.$t("settings.profile_fields.label")),1),((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.newFields,(function(t,n){return(0,l.wg)(),(0,l.iD)("div",{key:n,class:"profile-fields"},[(0,l.Wm)(r,{modelValue:e.newFields[n].name,"onUpdate:modelValue":function(t){return e.newFields[n].name=t},"enable-emoji-picker":"","hide-emoji-button":"",suggest:e.userSuggestor},{default:(0,l.w5)((function(){return[(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":function(t){return e.newFields[n].name=t},placeholder:e.$t("settings.profile_fields.name")},null,8,$l),[[de.nr,e.newFields[n].name]])]})),_:2},1032,["modelValue","onUpdate:modelValue","suggest"]),(0,l.Wm)(r,{modelValue:e.newFields[n].value,"onUpdate:modelValue":function(t){return e.newFields[n].value=t},"enable-emoji-picker":"","hide-emoji-button":"",suggest:e.userSuggestor},{default:(0,l.w5)((function(){return[(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":function(t){return e.newFields[n].value=t},placeholder:e.$t("settings.profile_fields.value")},null,8,Cl),[[de.nr,e.newFields[n].value]])]})),_:2},1032,["modelValue","onUpdate:modelValue","suggest"]),(0,l._)("button",{class:"delete-field button-unstyled -hover-highlight",onClick:function(t){return e.deleteField(n)}},[e.newFields.length>1?((0,l.wg)(),(0,l.j4)(u,{key:0,icon:"times"})):(0,l.kq)("",!0)],8,Vl)])})),128)),e.newFields.length<e.maxFields?((0,l.wg)(),(0,l.iD)("button",{key:0,class:"add-field faint button-unstyled -hover-highlight",onClick:t[5]||(t[5]=function(){return e.addField&&e.addField.apply(e,arguments)})},[(0,l.Wm)(u,{icon:"plus"}),(0,l.Uk)(" "+(0,h.zw)(e.$t("settings.profile_fields.add_field")),1)])):(0,l.kq)("",!0)])):(0,l.kq)("",!0),(0,l._)("p",null,[(0,l.Wm)(i,{modelValue:e.bot,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.bot=t})},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.bot")),1)]})),_:1},8,["modelValue"])]),(0,l._)("p",null,[(0,l.Wm)(c,{"prompt-text":e.$t("settings.email_language"),language:e.emailLanguage,"set-language":function(t){return e.emailLanguage=t}},null,8,["prompt-text","language","set-language"])]),(0,l._)("button",{disabled:e.newName&&0===e.newName.length,class:"btn button-default",onClick:t[7]||(t[7]=function(){return e.updateProfile&&e.updateProfile.apply(e,arguments)})},(0,h.zw)(e.$t("settings.save")),9,Tl)]),(0,l._)("div",xl,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.avatar")),1),(0,l._)("p",Ll,(0,h.zw)(e.$t("settings.avatar_size_instruction")),1),(0,l._)("div",Ul,[(0,l._)("img",{src:e.user.profile_image_url_original,class:"current-avatar"},null,8,Ol),!e.isDefaultAvatar&&e.pickAvatarBtnVisible?((0,l.wg)(),(0,l.iD)("button",{key:0,title:e.$t("settings.reset_avatar"),class:"button-unstyled reset-button",onClick:t[8]||(t[8]=function(){return e.resetAvatar&&e.resetAvatar.apply(e,arguments)})},[(0,l.Wm)(u,{icon:"times",type:"button"})],8,Wl)):(0,l.kq)("",!0)]),(0,l._)("p",null,(0,h.zw)(e.$t("settings.set_new_avatar")),1),(0,l.wy)((0,l._)("button",{id:"pick-avatar",class:"button-default btn",type:"button"},(0,h.zw)(e.$t("settings.upload_a_photo")),513),[[de.F8,e.pickAvatarBtnVisible]]),(0,l.Wm)(d,{trigger:"#pick-avatar","submit-handler":e.submitAvatar,onOpen:t[9]||(t[9]=function(t){return e.pickAvatarBtnVisible=!1}),onClose:t[10]||(t[10]=function(t){return e.pickAvatarBtnVisible=!0})},null,8,["submit-handler"])]),(0,l._)("div",Sl,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.profile_banner")),1),(0,l._)("div",zl,[(0,l._)("img",{src:e.user.cover_photo},null,8,Pl),e.isDefaultBanner?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("button",{key:0,class:"button-unstyled reset-button",title:e.$t("settings.reset_profile_banner"),onClick:t[11]||(t[11]=function(){return e.resetBanner&&e.resetBanner.apply(e,arguments)})},[(0,l.Wm)(u,{icon:"times",type:"button"})],8,Dl))]),(0,l._)("p",null,(0,h.zw)(e.$t("settings.set_new_profile_banner")),1),e.bannerPreview?((0,l.wg)(),(0,l.iD)("img",{key:0,class:"banner-background-preview",src:e.bannerPreview},null,8,Il)):(0,l.kq)("",!0),(0,l._)("div",null,[(0,l._)("input",{type:"file",onChange:t[12]||(t[12]=function(t){return e.uploadFile("banner",t)})},null,32)]),e.bannerUploading?((0,l.wg)(),(0,l.j4)(u,{key:1,class:"uploading",spin:"",icon:"circle-notch"})):e.bannerPreview?((0,l.wg)(),(0,l.iD)("button",{key:2,class:"btn button-default",onClick:t[13]||(t[13]=function(t){return e.submitBanner(e.banner)})},(0,h.zw)(e.$t("settings.save")),1)):(0,l.kq)("",!0)]),(0,l._)("div",jl,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.profile_background")),1),(0,l._)("div",Bl,[(0,l._)("img",{src:e.user.background_image},null,8,Al),e.isDefaultBackground?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("button",{key:0,class:"button-unstyled reset-button",title:e.$t("settings.reset_profile_background"),onClick:t[14]||(t[14]=function(){return e.resetBackground&&e.resetBackground.apply(e,arguments)})},[(0,l.Wm)(u,{icon:"times",type:"button"})],8,El))]),(0,l._)("p",null,(0,h.zw)(e.$t("settings.set_new_profile_background")),1),e.backgroundPreview?((0,l.wg)(),(0,l.iD)("img",{key:0,class:"banner-background-preview",src:e.backgroundPreview},null,8,ql)):(0,l.kq)("",!0),(0,l._)("div",null,[(0,l._)("input",{type:"file",onChange:t[15]||(t[15]=function(t){return e.uploadFile("background",t)})},null,32)]),e.backgroundUploading?((0,l.wg)(),(0,l.j4)(u,{key:1,class:"uploading",spin:"",icon:"circle-notch"})):e.backgroundPreview?((0,l.wg)(),(0,l.iD)("button",{key:2,class:"btn button-default",onClick:t[16]||(t[16]=function(t){return e.submitBackground(e.background)})},(0,h.zw)(e.$t("settings.save")),1)):(0,l.kq)("",!0)]),(0,l._)("div",Fl,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.account_privacy")),1),(0,l._)("ul",Zl,[(0,l._)("li",null,[(0,l.Wm)(p,{path:"serverSide_locked"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.lock_account_description")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(p,{path:"serverSide_discoverable"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.discoverable")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(p,{path:"serverSide_allowFollowingMove"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.allow_following_move")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(p,{path:"serverSide_hideFavorites"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.hide_favorites_description")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(p,{path:"serverSide_hideFollowers"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.hide_followers_description")),1)]})),_:1}),(0,l._)("ul",{class:(0,h.C_)(["setting-list suboptions",[{disabled:!e.serverSide_hideFollowers}]])},[(0,l._)("li",null,[(0,l.Wm)(p,{path:"serverSide_hideFollowersCount",disabled:!e.serverSide_hideFollowers},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.hide_followers_count_description")),1)]})),_:1},8,["disabled"])])],2)]),(0,l._)("li",null,[(0,l.Wm)(p,{path:"serverSide_hideFollows"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.hide_follows_description")),1)]})),_:1}),(0,l._)("ul",{class:(0,h.C_)(["setting-list suboptions",[{disabled:!e.serverSide_hideFollows}]])},[(0,l._)("li",null,[(0,l.Wm)(p,{path:"serverSide_hideFollowsCount",disabled:!e.serverSide_hideFollows},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.hide_follows_count_description")),1)]})),_:1},8,["disabled"])])],2)])])])])}]]);var wa=["label"],_a={class:"setting-item"},ka={class:"setting-list"},va={key:0},ya={key:1},$a={key:2},Ca={key:3},Va={class:"column-settings"},Ta={class:"setting-item"},xa={class:"setting-list"},La={key:0,class:"setting-list suboptions"},Ua={class:"setting-list suboptions"},Oa={key:0,class:"unavailable"},Wa={key:1},Sa={key:2},za={key:3},Pa={key:0,class:"setting-item"},Da={class:"setting-list"},Ia={for:"default-vis"},ja={key:0},Ba={key:0,class:"SizeSetting"},Aa=["for"],Ea=["id","disabled","min","value"],qa=["value"],Fa=["cm","mm","in","px","pt","pc","em","ex","ch","rem","vw","vh","vmin","vmax","%"],Za=["px","rem","vw"];const Ma={components:{ModifiedIndicator:bt,Select:Rt.Z},props:{path:String,disabled:Boolean,min:Number,units:{type:[String],default:function(){return Fa}},expert:[Number,String]},computed:{pathDefault:function(){var e=this.path.split("."),t=(0,ct.Z)(e),n=t[0],l=t.slice(1);return[n+"DefaultValue"].concat((0,Ee.Z)(l)).join(".")},stateUnit:function(){return(this.state||"").replace(/\d+/,"")},stateValue:function(){return(this.state||"").replace(/\D+/,"")},state:function(){var e=se()(this.$parent,this.path);return void 0===e?this.defaultState:e},defaultState:function(){return se()(this.$parent,this.pathDefault)},isChanged:function(){return this.state!==this.defaultState},matchesExpertLevel:function(){return(this.expert||0)<=this.$parent.expertLevel}},methods:{update:function(e){pt()(this.$parent,this.path,e)},reset:function(){pt()(this.$parent,this.path,this.defaultState)},updateValue:function(e){pt()(this.$parent,this.path,parseInt(e.target.value)+this.stateUnit)},updateUnit:function(e){pt()(this.$parent,this.path,this.stateValue+e.target.value)}}},Ra=(0,B.Z)(Ma,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("Select"),i=(0,l.up)("ModifiedIndicator");return e.matchesExpertLevel?((0,l.wg)(),(0,l.iD)("span",Ba,[(0,l._)("label",{for:e.path,class:"size-label"},[(0,l.WI)(e.$slots,"default")],8,Aa),(0,l._)("input",{id:e.path,class:"number-input",type:"number",step:"1",disabled:e.disabled,min:e.min||0,value:e.stateValue,onChange:t[0]||(t[0]=function(){return e.updateValue&&e.updateValue.apply(e,arguments)})},null,40,Ea),(0,l.Wm)(r,{id:e.path,"model-value":e.stateUnit,disabled:e.disabled,class:"css-unit-input",onChange:e.updateUnit},{default:(0,l.w5)((function(){return[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.units,(function(e){return(0,l.wg)(),(0,l.iD)("option",{key:e,value:e},(0,h.zw)(e),9,qa)})),128))]})),_:1},8,["id","model-value","disabled","onChange"]),(0,l.Uk)(" "+(0,h.zw)(" ")+" "),(0,l.Wm)(i,{changed:e.isChanged,onclick:e.reset},null,8,["changed","onclick"])])):(0,l.kq)("",!0)}]]);function Na(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}D.vI.add(I.g4A);const Ha={data:function(){var e=this;return{subjectLineOptions:["email","noop","masto"].map((function(t){return{key:t,value:t,label:e.$t("settings.subject_line_".concat("masto"===t?"mastodon":t))}})),conversationDisplayOptions:["tree","linear"].map((function(t){return{key:t,value:t,label:e.$t("settings.conversation_display_".concat(t))}})),conversationOtherRepliesButtonOptions:["below","inside"].map((function(t){return{key:t,value:t,label:e.$t("settings.conversation_other_replies_button_".concat(t))}})),mentionLinkDisplayOptions:["short","full_for_remote","full"].map((function(t){return{key:t,value:t,label:e.$t("settings.mention_link_display_".concat(t))}})),thirdColumnModeOptions:["none","notifications","postform"].map((function(t){return{key:t,value:t,label:e.$t("settings.third_column_mode_".concat(t))}})),userPopoverAvatarActionOptions:["close","zoom","open"].map((function(t){return{key:t,value:t,label:e.$t("settings.user_popover_avatar_action_".concat(t))}})),loopSilentAvailable:Object.getOwnPropertyDescriptor(HTMLVideoElement.prototype,"mozHasAudio")||Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"webkitAudioDecodedByteCount")||Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"audioTracks")}},components:{BooleanSetting:Ct,ChoiceSetting:Ht,IntegerSetting:Qt,SizeSetting:Ra,InterfaceLanguageSwitcher:pa.Z,ScopeSelector:ia.Z,ServerSideIndicator:vt},computed:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Na(Object(n),!0).forEach((function(t){(0,W.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Na(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({horizontalUnits:function(){return Za},postFormats:function(){return this.$store.state.instance.postFormats||[]},postContentOptions:function(){var e=this;return this.postFormats.map((function(t){return{key:t,value:t,label:e.$t('post_status.content_type["'.concat(t,'"]'))}}))},columns:function(){var e=this.$store.getters.mergedConfig.thirdColumnMode,t="none"===e?[]:["notifs"];return this.$store.getters.mergedConfig.sidebarRight||"postform"===e?[].concat(t,["content","sidebar"]):["sidebar","content"].concat(t)},instanceSpecificPanelPresent:function(){return this.$store.state.instance.showInstanceSpecificPanel},instanceWallpaperUsed:function(){return this.$store.state.instance.background&&!this.$store.state.users.currentUser.background_image},instanceShoutboxPresent:function(){return this.$store.state.instance.shoutAvailable},language:{get:function(){return this.$store.getters.mergedConfig.interfaceLanguage},set:function(e){this.$store.dispatch("setOption",{name:"interfaceLanguage",value:e})}}},Ot()),methods:{changeDefaultScope:function(e){this.$store.dispatch("setServerSideOption",{name:"defaultScope",value:e})}}},Ya=(0,B.Z)(Ha,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("interface-language-switcher"),i=(0,l.up)("BooleanSetting"),u=(0,l.up)("ChoiceSetting"),c=(0,l.up)("SizeSetting"),d=(0,l.up)("IntegerSetting"),p=(0,l.up)("FAIcon"),m=(0,l.up)("ServerSideIndicator"),f=(0,l.up)("ScopeSelector");return(0,l.wg)(),(0,l.iD)("div",{label:e.$t("settings.general")},[(0,l._)("div",_a,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.interface")),1),(0,l._)("ul",ka,[(0,l._)("li",null,[(0,l.Wm)(r,{"prompt-text":e.$t("settings.interfaceLanguage"),language:e.language,"set-language":function(t){return e.language=t}},null,8,["prompt-text","language","set-language"])]),e.instanceSpecificPanelPresent?((0,l.wg)(),(0,l.iD)("li",va,[(0,l.Wm)(i,{path:"hideISP"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.hide_isp")),1)]})),_:1})])):(0,l.kq)("",!0),e.instanceWallpaperUsed?((0,l.wg)(),(0,l.iD)("li",ya,[(0,l.Wm)(i,{path:"hideInstanceWallpaper"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.hide_wallpaper")),1)]})),_:1})])):(0,l.kq)("",!0),(0,l._)("li",null,[(0,l.Wm)(i,{path:"stopGifs"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.stop_gifs")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"streaming"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.streaming")),1)]})),_:1}),(0,l._)("ul",{class:(0,h.C_)(["setting-list suboptions",[{disabled:!e.streaming}]])},[(0,l._)("li",null,[(0,l.Wm)(i,{path:"pauseOnUnfocused",disabled:!e.streaming},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.pause_on_unfocused")),1)]})),_:1},8,["disabled"])])],2)]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"useStreamingApi",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.useStreamingApi")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"virtualScrolling",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.virtual_scrolling")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(u,{id:"userPopoverAvatarAction",path:"userPopoverAvatarAction",options:e.userPopoverAvatarActionOptions,expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.user_popover_avatar_action")),1)]})),_:1},8,["options"])]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"userPopoverOverlay",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.user_popover_avatar_overlay")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"alwaysShowNewPostButton",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.always_show_post_button")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"autohideFloatingPostButton",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.autohide_floating_post_button")),1)]})),_:1})]),e.instanceShoutboxPresent?((0,l.wg)(),(0,l.iD)("li",$a,[(0,l.Wm)(i,{path:"hideShoutbox",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.hide_shoutbox")),1)]})),_:1})])):(0,l.kq)("",!0),(0,l._)("li",null,[(0,l._)("h3",null,(0,h.zw)(e.$t("settings.columns")),1)]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"disableStickyHeaders"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.disable_sticky_headers")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"showScrollbars"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.show_scrollbars")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"sidebarRight"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.right_sidebar")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"navbarColumnStretch"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.navbar_column_stretch")),1)]})),_:1})]),(0,l._)("li",null,[e.user?((0,l.wg)(),(0,l.j4)(u,{key:0,id:"thirdColumnMode",path:"thirdColumnMode",options:e.thirdColumnModeOptions},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.third_column_mode")),1)]})),_:1},8,["options"])):(0,l.kq)("",!0)]),e.expertLevel>0?((0,l.wg)(),(0,l.iD)("li",Ca,[(0,l.Uk)((0,h.zw)(e.$t("settings.column_sizes"))+" ",1),(0,l._)("div",Va,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.columns,(function(t){return(0,l.wg)(),(0,l.j4)(c,{key:t,path:t+"ColumnWidth",units:e.horizontalUnits,expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.column_sizes_"+t)),1)]})),_:2},1032,["path","units"])})),128))])])):(0,l.kq)("",!0)])]),(0,l._)("div",Ta,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.post_look_feel")),1),(0,l._)("ul",xa,[(0,l._)("li",null,[(0,l.Wm)(u,{id:"conversationDisplay",path:"conversationDisplay",options:e.conversationDisplayOptions},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.conversation_display")),1)]})),_:1},8,["options"])]),"linear"!==e.conversationDisplay?((0,l.wg)(),(0,l.iD)("ul",La,[(0,l._)("li",null,[(0,l.Wm)(i,{path:"conversationTreeAdvanced"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.tree_advanced")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"conversationTreeFadeAncestors",expert:1},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.tree_fade_ancestors")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(d,{path:"maxDepthInThread",min:3,expert:1},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.max_depth_in_thread")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(u,{id:"conversationOtherRepliesButton",path:"conversationOtherRepliesButton",options:e.conversationOtherRepliesButtonOptions,expert:1},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.conversation_other_replies_button")),1)]})),_:1},8,["options"])])])):(0,l.kq)("",!0),(0,l._)("li",null,[(0,l.Wm)(i,{path:"collapseMessageWithSubject"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.collapse_subject")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"emojiReactionsOnTimeline",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.emoji_reactions_on_timeline")),1)]})),_:1})]),(0,l._)("li",null,[e.user?((0,l.wg)(),(0,l.j4)(i,{key:0,path:"serverSide_stripRichContent",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.no_rich_text_description")),1)]})),_:1})):(0,l.kq)("",!0)]),(0,l._)("h3",null,(0,h.zw)(e.$t("settings.attachments")),1),(0,l._)("li",null,[(0,l.Wm)(i,{path:"useContainFit",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.use_contain_fit")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"hideNsfw"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.nsfw_clickthrough")),1)]})),_:1})]),(0,l._)("ul",Ua,[(0,l._)("li",null,[(0,l.Wm)(i,{path:"preloadImage",expert:"1",disabled:!e.hideNsfw},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.preload_images")),1)]})),_:1},8,["disabled"])]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"useOneClickNsfw",expert:"1",disabled:!e.hideNsfw},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.use_one_click_nsfw")),1)]})),_:1},8,["disabled"])])]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"loopVideo",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.loop_video")),1)]})),_:1}),(0,l._)("ul",{class:(0,h.C_)(["setting-list suboptions",[{disabled:!e.streaming}]])},[(0,l._)("li",null,[(0,l.Wm)(i,{path:"loopVideoSilentOnly",expert:"1",disabled:!e.loopVideo||!e.loopSilentAvailable},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.loop_video_silent_only")),1)]})),_:1},8,["disabled"]),e.loopSilentAvailable?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("div",Oa,[(0,l.Wm)(p,{icon:"globe"}),(0,l.Uk)("! "+(0,h.zw)(e.$t("settings.limited_availability")),1)]))])],2)]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"playVideosInModal",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.play_videos_in_modal")),1)]})),_:1})]),(0,l._)("h3",null,(0,h.zw)(e.$t("settings.mention_links")),1),(0,l._)("li",null,[(0,l.Wm)(u,{id:"mentionLinkDisplay",path:"mentionLinkDisplay",options:e.mentionLinkDisplayOptions},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.mention_link_display")),1)]})),_:1},8,["options"])]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"mentionLinkShowTooltip",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.mention_link_use_tooltip")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"useAtIcon",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.use_at_icon")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"mentionLinkShowAvatar"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.mention_link_show_avatar")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"mentionLinkFadeDomain",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.mention_link_fade_domain")),1)]})),_:1})]),e.user?((0,l.wg)(),(0,l.iD)("li",Wa,[(0,l.Wm)(i,{path:"mentionLinkBoldenYou",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.mention_link_bolden_you")),1)]})),_:1})])):(0,l.kq)("",!0),e.expertLevel>0?((0,l.wg)(),(0,l.iD)("h3",Sa,(0,h.zw)(e.$t("settings.fun")),1)):(0,l.kq)("",!0),(0,l._)("li",null,[(0,l.Wm)(i,{path:"greentext",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.greentext")),1)]})),_:1})]),e.user?((0,l.wg)(),(0,l.iD)("li",za,[(0,l.Wm)(i,{path:"mentionLinkShowYous",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.show_yous")),1)]})),_:1})])):(0,l.kq)("",!0)])]),e.user?((0,l.wg)(),(0,l.iD)("div",Pa,[(0,l._)("h2",null,(0,h.zw)(e.$t("settings.composing")),1),(0,l._)("ul",Da,[(0,l._)("li",null,[(0,l._)("label",Ia,[(0,l.Uk)((0,h.zw)(e.$t("settings.default_vis"))+" ",1),(0,l.Wm)(m,{"server-side":!0}),(0,l.Wm)(f,{class:"scope-selector","show-all":!0,"user-default":e.serverSide_defaultScope,"initial-scope":e.serverSide_defaultScope,"on-scope-change":e.changeDefaultScope},null,8,["user-default","initial-scope","on-scope-change"])])]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"sensitiveByDefault"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.sensitive_by_default")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"scopeCopy",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.scope_copy")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"alwaysShowSubjectInput",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.subject_input_always_show")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(u,{id:"subjectLineBehavior",path:"subjectLineBehavior",options:e.subjectLineOptions,expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.subject_line_behavior")),1)]})),_:1},8,["options"])]),e.postFormats.length>0?((0,l.wg)(),(0,l.iD)("li",ja,[(0,l.Wm)(u,{id:"postContentType",path:"postContentType",options:e.postContentOptions},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.post_status_content_type")),1)]})),_:1},8,["options"])])):(0,l.kq)("",!0),(0,l._)("li",null,[(0,l.Wm)(i,{path:"minimalScopesMode",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.minimal_scopes_mode")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"alwaysShowNewPostButton",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.always_show_post_button")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"autohideFloatingPostButton",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.autohide_floating_post_button")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"padEmoji",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.pad_emoji")),1)]})),_:1})])])])):(0,l.kq)("",!0)],8,wa)}]]);var Ka=["label"],Ga={class:"setting-item"},Ja={class:"setting-list"},Qa={class:"option-list"},Xa=["href"],eo={class:"option-list"},to=["href"];const no={data:function(){var e=this.$store.state.instance;return{backendVersion:e.backendVersion,frontendVersion:e.frontendVersion}},computed:{frontendVersionLink:function(){return"https://git.pleroma.social/pleroma/pleroma-fe/commit/"+this.frontendVersion},backendVersionLink:function(){return"https://git.pleroma.social/pleroma/pleroma/commit/"+((e=this.backendVersion.match(/-g(\w+)/i))?e[1]:"");var e}}},lo=(0,B.Z)(no,[["render",function(e,t,n,a,o,s){return(0,l.wg)(),(0,l.iD)("div",{label:e.$t("settings.version.title")},[(0,l._)("div",Ga,[(0,l._)("ul",Ja,[(0,l._)("li",null,[(0,l._)("p",null,(0,h.zw)(e.$t("settings.version.backend_version")),1),(0,l._)("ul",Qa,[(0,l._)("li",null,[(0,l._)("a",{href:e.backendVersionLink,target:"_blank"},(0,h.zw)(e.backendVersion),9,Xa)])])]),(0,l._)("li",null,[(0,l._)("p",null,(0,h.zw)(e.$t("settings.version.frontend_version")),1),(0,l._)("ul",eo,[(0,l._)("li",null,[(0,l._)("a",{href:e.frontendVersionLink,target:"_blank"},(0,h.zw)(e.frontendVersion),9,to)])])])])])],8,Ka)}]]);var ao={class:"theme-tab"},oo={class:"presets-container"},so={class:"save-load"},ro={key:0,class:"theme-warning"},io={class:"alert warning"},uo={class:"buttons"},co={class:"top"},po={class:"presets"},mo={for:"preset-switcher",class:"select"},ho=["value"],fo={class:"export-import"},go={class:"save-load-options"},bo={class:"keep-option"},wo={class:"keep-option"},_o={class:"keep-option"},ko={class:"keep-option"},vo={class:"keep-option"},yo=["label"],$o={class:"tab-header"},Co={class:"tab-header-buttons"},Vo={class:"color-item"},To={class:"color-item"},xo={class:"color-item"},Lo={class:"color-item"},Uo=["label"],Oo={class:"tab-header"},Wo={class:"color-item"},So={class:"color-item"},zo={class:"color-item"},Po={class:"color-item"},Do={class:"color-item"},Io={class:"color-item"},jo={class:"color-item"},Bo={class:"color-item"},Ao={class:"color-item"},Eo={class:"color-item"},qo={class:"color-item"},Fo={class:"color-item"},Zo={class:"color-item"},Mo={class:"color-item"},Ro={class:"color-item"},No={class:"color-item"},Ho={class:"color-item"},Yo={class:"color-item"},Ko=["label"],Go={class:"tab-header"},Jo=["label"],Qo={class:"tab-header shadow-selector"},Xo={class:"select-container"},es=["value"],ts={class:"override"},ns={for:"override",class:"label"},ls=(0,l._)("label",{class:"checkbox-label",for:"override"},null,-1),as={key:0},os=(0,l._)("code",null,"filter: drop-shadow()",-1),ss=(0,l._)("code",null,"drop-shadow",-1),rs=(0,l._)("code",null,"spread-radius",-1),is=(0,l._)("code",null,"inset",-1),us=(0,l._)("code",null,"box-shadow",-1),cs=["label"],ds={class:"tab-header"},ps={class:"apply-container"},ms=["disabled"],hs=n(21865),fs=n(77394),gs=n(25771),bs=n(44551),ws=n(40454),_s=["for"],ks={class:"input color-input-field"},vs=["id","value","disabled"],ys=["id","value","disabled"],$s={key:1,class:"transparentIndicator"};const Cs={components:{Checkbox:M.Z},props:{name:{required:!0,type:String},label:{required:!0,type:String},modelValue:{required:!1,type:String,default:void 0},fallback:{required:!1,type:String,default:void 0},disabled:{required:!1,type:Boolean,default:!1},showOptionalTickbox:{required:!1,type:Boolean,default:!0}},emits:["update:modelValue"],computed:{present:function(){return void 0!==this.modelValue},validColor:function(){return(0,hs.wK)(this.modelValue||this.fallback)},transparentColor:function(){return"transparent"===this.modelValue},computedColor:function(){return this.modelValue&&this.modelValue.startsWith("--")}}},Vs=(0,B.Z)(Cs,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("Checkbox");return(0,l.wg)(),(0,l.iD)("div",{class:(0,h.C_)(["color-input style-control",{disabled:!s.present||n.disabled}])},[(0,l._)("label",{for:n.name,class:"label"},(0,h.zw)(n.label),9,_s),void 0!==n.fallback&&n.showOptionalTickbox?((0,l.wg)(),(0,l.j4)(r,{key:0,"model-value":s.present,disabled:n.disabled,class:"opt","onUpdate:modelValue":t[0]||(t[0]=function(t){return e.$emit("update:modelValue",void 0===n.modelValue?n.fallback:void 0)})},null,8,["model-value","disabled"])):(0,l.kq)("",!0),(0,l._)("div",ks,[(0,l._)("input",{id:n.name+"-t",class:"textColor unstyled",type:"text",value:n.modelValue||n.fallback,disabled:!s.present||n.disabled,onInput:t[1]||(t[1]=function(t){return e.$emit("update:modelValue",t.target.value)})},null,40,vs),s.validColor?((0,l.wg)(),(0,l.iD)("input",{key:0,id:n.name,class:"nativeColor unstyled",type:"color",value:n.modelValue||n.fallback,disabled:!s.present||n.disabled,onInput:t[2]||(t[2]=function(t){return e.$emit("update:modelValue",t.target.value)})},null,40,ys)):(0,l.kq)("",!0),s.transparentColor?((0,l.wg)(),(0,l.iD)("div",$s)):(0,l.kq)("",!0),s.computedColor?((0,l.wg)(),(0,l.iD)("div",{key:2,class:"computedIndicator",style:(0,h.j5)({backgroundColor:n.fallback})},null,4)):(0,l.kq)("",!0)])],2)}]]);var Ts=["for"],xs=["id","checked"],Ls=["for"],Us=["id","value","disabled","max","min","step"],Os=["id","value","disabled","max","min","step"];const Ws={props:["name","modelValue","fallback","disabled","label","max","min","step","hardMin","hardMax"],emits:["update:modelValue"],computed:{present:function(){return void 0!==this.modelValue}}},Ss=(0,B.Z)(Ws,[["render",function(e,t,n,a,o,s){return(0,l.wg)(),(0,l.iD)("div",{class:(0,h.C_)(["range-control style-control",{disabled:!s.present||n.disabled}])},[(0,l._)("label",{for:n.name,class:"label"},(0,h.zw)(n.label),9,Ts),void 0!==n.fallback?((0,l.wg)(),(0,l.iD)("input",{key:0,id:n.name+"-o",class:"opt",type:"checkbox",checked:s.present,onChange:t[0]||(t[0]=function(t){return e.$emit("update:modelValue",s.present?void 0:n.fallback)})},null,40,xs)):(0,l.kq)("",!0),void 0!==n.fallback?((0,l.wg)(),(0,l.iD)("label",{key:1,class:"opt-l",for:n.name+"-o"},null,8,Ls)):(0,l.kq)("",!0),(0,l._)("input",{id:n.name,class:"input-number",type:"range",value:n.modelValue||n.fallback,disabled:!s.present||n.disabled,max:n.max||n.hardMax||100,min:n.min||n.hardMin||0,step:n.step||1,onInput:t[1]||(t[1]=function(t){return e.$emit("update:modelValue",t.target.value)})},null,40,Us),(0,l._)("input",{id:n.name,class:"input-number",type:"number",value:n.modelValue||n.fallback,disabled:!s.present||n.disabled,max:n.hardMax,min:n.hardMin,step:n.step||1,onInput:t[2]||(t[2]=function(t){return e.$emit("update:modelValue",t.target.value)})},null,40,Os)],2)}]]);var zs=["for"],Ps=["id","value","disabled"];const Ds={components:{Checkbox:M.Z},props:["name","modelValue","fallback","disabled"],emits:["update:modelValue"],computed:{present:function(){return void 0!==this.modelValue}}},Is=(0,B.Z)(Ds,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("Checkbox");return(0,l.wg)(),(0,l.iD)("div",{class:(0,h.C_)(["opacity-control style-control",{disabled:!s.present||n.disabled}])},[(0,l._)("label",{for:n.name,class:"label"},(0,h.zw)(e.$t("settings.style.common.opacity")),9,zs),void 0!==n.fallback?((0,l.wg)(),(0,l.j4)(r,{key:0,"model-value":s.present,disabled:n.disabled,class:"opt","onUpdate:modelValue":t[0]||(t[0]=function(t){return e.$emit("update:modelValue",s.present?void 0:n.fallback)})},null,8,["model-value","disabled"])):(0,l.kq)("",!0),(0,l._)("input",{id:n.name,class:"input-number",type:"number",value:n.modelValue||n.fallback,disabled:!s.present||n.disabled,max:"1",min:"0",step:".05",onInput:t[1]||(t[1]=function(t){return e.$emit("update:modelValue",t.target.value)})},null,40,Ps)],2)}]]);var js={class:"shadow-preview-container"},Bs=["disabled"],As=["disabled"],Es={class:"wrap"},qs=["disabled"],Fs={class:"preview-window"},Zs=["disabled"],Ms=["disabled"],Rs={class:"wrap"},Ns=["disabled"],Hs={class:"shadow-tweak"},Ys=["disabled"],Ks=["value"],Gs=["disabled"],Js=["disabled"],Qs=["disabled"],Xs=["disabled"],er=["disabled"],tr={for:"inset",class:"label"},nr=["disabled"],lr=(0,l._)("label",{class:"checkbox-label",for:"inset"},null,-1),ar=["disabled"],or={for:"spread",class:"label"},sr=["disabled"],rr=["disabled"],ir=["disabled"],ur={for:"spread",class:"label"},cr=["disabled"],dr=["disabled"],pr=(0,l._)("code",null,"--variable,mod",-1);function mr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function hr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mr(Object(n),!0).forEach((function(t){(0,W.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}D.vI.add(I.ptq,I.mTx,I.NBC,I.r8p);var fr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return hr({x:0,y:0,blur:0,spread:0,inset:!1,color:"#000000",alpha:1},e)};const gr={props:["modelValue","fallback","ready"],emits:["update:modelValue"],data:function(){return{selectedId:0,cValue:(this.modelValue||this.fallback||[]).map(fr)}},components:{ColorInput:Vs,OpacityInput:Is,Select:Rt.Z},methods:{add:function(){this.cValue.push(fr(this.selected)),this.selectedId=this.cValue.length-1},del:function(){this.cValue.splice(this.selectedId,1),this.selectedId=0===this.cValue.length?void 0:Math.max(this.selectedId-1,0)},moveUp:function(){var e=this.cValue.splice(this.selectedId,1)[0];this.cValue.splice(this.selectedId-1,0,e),this.selectedId-=1},moveDn:function(){var e=this.cValue.splice(this.selectedId,1)[0];this.cValue.splice(this.selectedId+1,0,e),this.selectedId+=1}},beforeUpdate:function(){this.cValue=this.modelValue||this.fallback},computed:{anyShadows:function(){return this.cValue.length>0},anyShadowsFallback:function(){return this.fallback.length>0},selected:function(){return this.ready&&this.anyShadows?this.cValue[this.selectedId]:fr({})},currentFallback:function(){return this.ready&&this.anyShadowsFallback?this.fallback[this.selectedId]:fr({})},moveUpValid:function(){return this.ready&&this.selectedId>0},moveDnValid:function(){return this.ready&&this.selectedId<this.cValue.length-1},present:function(){return this.ready&&void 0!==this.cValue[this.selectedId]&&!this.usingFallback},usingFallback:function(){return void 0===this.modelValue},rgb:function(){return(0,hs.wK)(this.selected.color)},style:function(){return this.ready?{boxShadow:(0,fs.Ot)(this.fallback)}:{}}}},br=(0,B.Z)(gr,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("Select"),i=(0,l.up)("FAIcon"),u=(0,l.up)("ColorInput"),c=(0,l.up)("OpacityInput"),d=(0,l.up)("i18n-t");return(0,l.wg)(),(0,l.iD)("div",{class:(0,h.C_)(["shadow-control",{disabled:!e.present}])},[(0,l._)("div",js,[(0,l._)("div",{disabled:!e.present,class:"y-shift-control"},[(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.selected.y=t}),disabled:!e.present,class:"input-number",type:"number"},null,8,As),[[de.nr,e.selected.y]]),(0,l._)("div",Es,[(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.selected.y=t}),disabled:!e.present,class:"input-range",type:"range",max:"20",min:"-20"},null,8,qs),[[de.nr,e.selected.y]])])],8,Bs),(0,l._)("div",Fs,[(0,l._)("div",{class:"preview-block",style:(0,h.j5)(e.style)},null,4)]),(0,l._)("div",{disabled:!e.present,class:"x-shift-control"},[(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.selected.x=t}),disabled:!e.present,class:"input-number",type:"number"},null,8,Ms),[[de.nr,e.selected.x]]),(0,l._)("div",Rs,[(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.selected.x=t}),disabled:!e.present,class:"input-range",type:"range",max:"20",min:"-20"},null,8,Ns),[[de.nr,e.selected.x]])])],8,Zs)]),(0,l._)("div",Hs,[(0,l._)("div",{disabled:e.usingFallback,class:"id-control style-control"},[(0,l.Wm)(r,{id:"shadow-switcher",modelValue:e.selectedId,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.selectedId=t}),class:"shadow-switcher",disabled:!e.ready||e.usingFallback},{default:(0,l.w5)((function(){return[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.cValue,(function(t,n){return(0,l.wg)(),(0,l.iD)("option",{key:n,value:n},(0,h.zw)(e.$t("settings.style.shadows.shadow_id",{value:n})),9,Ks)})),128))]})),_:1},8,["modelValue","disabled"]),(0,l._)("button",{class:"btn button-default",disabled:!e.ready||!e.present,onClick:t[5]||(t[5]=function(){return e.del&&e.del.apply(e,arguments)})},[(0,l.Wm)(i,{"fixed-width":"",icon:"times"})],8,Gs),(0,l._)("button",{class:"btn button-default",disabled:!e.moveUpValid,onClick:t[6]||(t[6]=function(){return e.moveUp&&e.moveUp.apply(e,arguments)})},[(0,l.Wm)(i,{"fixed-width":"",icon:"chevron-up"})],8,Js),(0,l._)("button",{class:"btn button-default",disabled:!e.moveDnValid,onClick:t[7]||(t[7]=function(){return e.moveDn&&e.moveDn.apply(e,arguments)})},[(0,l.Wm)(i,{"fixed-width":"",icon:"chevron-down"})],8,Qs),(0,l._)("button",{class:"btn button-default",disabled:e.usingFallback,onClick:t[8]||(t[8]=function(){return e.add&&e.add.apply(e,arguments)})},[(0,l.Wm)(i,{"fixed-width":"",icon:"plus"})],8,Xs)],8,Ys),(0,l._)("div",{disabled:!e.present,class:"inset-control style-control"},[(0,l._)("label",tr,(0,h.zw)(e.$t("settings.style.shadows.inset")),1),(0,l.wy)((0,l._)("input",{id:"inset","onUpdate:modelValue":t[9]||(t[9]=function(t){return e.selected.inset=t}),disabled:!e.present,name:"inset",class:"input-inset",type:"checkbox"},null,8,nr),[[de.e8,e.selected.inset]]),lr],8,er),(0,l._)("div",{disabled:!e.present,class:"blur-control style-control"},[(0,l._)("label",or,(0,h.zw)(e.$t("settings.style.shadows.blur")),1),(0,l.wy)((0,l._)("input",{id:"blur","onUpdate:modelValue":t[10]||(t[10]=function(t){return e.selected.blur=t}),disabled:!e.present,name:"blur",class:"input-range",type:"range",max:"20",min:"0"},null,8,sr),[[de.nr,e.selected.blur]]),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[11]||(t[11]=function(t){return e.selected.blur=t}),disabled:!e.present,class:"input-number",type:"number",min:"0"},null,8,rr),[[de.nr,e.selected.blur]])],8,ar),(0,l._)("div",{disabled:!e.present,class:"spread-control style-control"},[(0,l._)("label",ur,(0,h.zw)(e.$t("settings.style.shadows.spread")),1),(0,l.wy)((0,l._)("input",{id:"spread","onUpdate:modelValue":t[12]||(t[12]=function(t){return e.selected.spread=t}),disabled:!e.present,name:"spread",class:"input-range",type:"range",max:"20",min:"-20"},null,8,cr),[[de.nr,e.selected.spread]]),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[13]||(t[13]=function(t){return e.selected.spread=t}),disabled:!e.present,class:"input-number",type:"number"},null,8,dr),[[de.nr,e.selected.spread]])],8,ir),(0,l.Wm)(u,{modelValue:e.selected.color,"onUpdate:modelValue":t[14]||(t[14]=function(t){return e.selected.color=t}),disabled:!e.present,label:e.$t("settings.style.common.color"),fallback:e.currentFallback.color,"show-optional-tickbox":!1,name:"shadow"},null,8,["modelValue","disabled","label","fallback"]),(0,l.Wm)(c,{modelValue:e.selected.alpha,"onUpdate:modelValue":t[15]||(t[15]=function(t){return e.selected.alpha=t}),disabled:!e.present},null,8,["modelValue","disabled"]),(0,l.Wm)(d,{scope:"global",keypath:"settings.style.shadows.hintV3",tag:"p"},{default:(0,l.w5)((function(){return[pr]})),_:1})])],2)}]]);var wr=["for"],_r=["id","checked"],kr=["for"],vr=["value"],yr=["id"];const $r={components:{Select:Rt.Z},props:["name","label","modelValue","fallback","options","no-inherit"],emits:["update:modelValue"],data:function(){return{lValue:this.modelValue,availableOptions:[this.noInherit?"":"inherit","custom"].concat((0,Ee.Z)(this.options||[]),["serif","monospace","sans-serif"]).filter((function(e){return e}))}},beforeUpdate:function(){this.lValue=this.modelValue},computed:{present:function(){return void 0!==this.lValue},dValue:function(){return this.lValue||this.fallback||{}},family:{get:function(){return this.dValue.family},set:function(e){pt()(this.lValue,"family",e),this.$emit("update:modelValue",this.lValue)}},isCustom:function(){return"custom"===this.preset},preset:{get:function(){return"serif"===this.family||"sans-serif"===this.family||"monospace"===this.family||"inherit"===this.family?this.family:"custom"},set:function(e){this.family="custom"===e?"":e}}}},Cr=(0,B.Z)($r,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("Select");return(0,l.wg)(),(0,l.iD)("div",{class:(0,h.C_)(["font-control style-control",{custom:e.isCustom}])},[(0,l._)("label",{for:"custom"===e.preset?e.name:e.name+"-font-switcher",class:"label"},(0,h.zw)(e.label),9,wr),void 0!==e.fallback?((0,l.wg)(),(0,l.iD)("input",{key:0,id:e.name+"-o",class:"opt exlcude-disabled",type:"checkbox",checked:e.present,onChange:t[0]||(t[0]=function(t){return e.$emit("update:modelValue",void 0===e.modelValue?e.fallback:void 0)})},null,40,_r)):(0,l.kq)("",!0),void 0!==e.fallback?((0,l.wg)(),(0,l.iD)("label",{key:1,class:"opt-l",for:e.name+"-o"},null,8,kr)):(0,l.kq)("",!0),(0,l.Uk)(" "+(0,h.zw)(" ")+" "),(0,l.Wm)(r,{id:e.name+"-font-switcher",modelValue:e.preset,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.preset=t}),disabled:!e.present,class:"font-switcher"},{default:(0,l.w5)((function(){return[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.availableOptions,(function(t){return(0,l.wg)(),(0,l.iD)("option",{key:t,value:t},(0,h.zw)("custom"===t?e.$t("settings.style.fonts.custom"):t),9,vr)})),128))]})),_:1},8,["id","modelValue","disabled"]),e.isCustom?(0,l.wy)(((0,l.wg)(),(0,l.iD)("input",{key:2,id:e.name,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.family=t}),class:"custom-font",type:"text"},null,8,yr)),[[de.nr,e.family]]):(0,l.kq)("",!0)],2)}]]);var Vr={key:0,class:"contrast-ratio"},Tr=["title"],xr={key:0},Lr={key:1},Ur={key:2},Or=["title"],Wr={key:0},Sr={key:1},zr={key:2};D.vI.add(I.OwZ,I.eHv,I.u8Q);const Pr={props:{large:{required:!1,type:Boolean,default:!1},contrast:{required:!1,type:Object,default:function(){return{}}}},computed:{hint:function(){var e=this.contrast.aaa?"aaa":this.contrast.aa?"aa":"bad",t=this.$t("settings.style.common.contrast.level.".concat(e)),n=this.$t("settings.style.common.contrast.context.text"),l=this.contrast.text;return this.$t("settings.style.common.contrast.hint",{level:t,context:n,ratio:l})},hint_18pt:function(){var e=this.contrast.laaa?"aaa":this.contrast.laa?"aa":"bad",t=this.$t("settings.style.common.contrast.level.".concat(e)),n=this.$t("settings.style.common.contrast.context.18pt"),l=this.contrast.text;return this.$t("settings.style.common.contrast.hint",{level:t,context:n,ratio:l})}}},Dr=(0,B.Z)(Pr,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("FAIcon");return n.contrast?((0,l.wg)(),(0,l.iD)("span",Vr,[(0,l._)("span",{title:s.hint,class:"rating"},[n.contrast.aaa?((0,l.wg)(),(0,l.iD)("span",xr,[(0,l.Wm)(r,{icon:"thumbs-up"})])):(0,l.kq)("",!0),!n.contrast.aaa&&n.contrast.aa?((0,l.wg)(),(0,l.iD)("span",Lr,[(0,l.Wm)(r,{icon:"adjust"})])):(0,l.kq)("",!0),n.contrast.aaa||n.contrast.aa?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("span",Ur,[(0,l.Wm)(r,{icon:"exclamation-triangle"})]))],8,Tr),n.contrast&&n.large?((0,l.wg)(),(0,l.iD)("span",{key:0,class:"rating",title:s.hint_18pt},[n.contrast.laaa?((0,l.wg)(),(0,l.iD)("span",Wr,[(0,l.Wm)(r,{icon:"thumbs-up"})])):(0,l.kq)("",!0),!n.contrast.laaa&&n.contrast.laa?((0,l.wg)(),(0,l.iD)("span",Sr,[(0,l.Wm)(r,{icon:"adjust"})])):(0,l.kq)("",!0),n.contrast.laaa||n.contrast.laa?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("span",zr,[(0,l.Wm)(r,{icon:"exclamation-triangle"})]))],8,Or)):(0,l.kq)("",!0)])):(0,l.kq)("",!0)}]]);var Ir={class:"preview-container"},jr=(0,l._)("div",{class:"underlay underlay-preview"},null,-1),Br={class:"panel dummy"},Ar={class:"panel-heading"},Er={class:"title"},qr=(0,l._)("span",{class:"badge badge-notification"}," 99 ",-1),Fr={class:"faint"},Zr={class:"alert error"},Mr={class:"btn button-default"},Rr={class:"panel-body theme-preview-content"},Nr={class:"post"},Hr=(0,l._)("div",{class:"avatar still-image"}," ( ͡° ͜ʖ ͡°) ",-1),Yr={class:"content"},Kr={style:{"font-family":"var(--postCodeFont)"}},Gr={style:{color:"var(--link)"}},Jr={class:"icons"},Qr={class:"after-post"},Xr=(0,l._)("div",{class:"avatar-alt"}," :^) ",-1),ei={class:"content"},ti={style:{color:"var(--faintLink)"}},ni=(0,l._)("div",{class:"separator"},null,-1),li={class:"alert error"},ai=["value"],oi={class:"actions"},si={class:"checkbox"},ri=(0,l._)("input",{id:"preview_checkbox",checked:"very yes",type:"checkbox"},null,-1),ii={for:"preview_checkbox"},ui={class:"btn button-default"};D.vI.add(I.NBC,I.Tab,I.x5v,I.Lh7);const ci={},di=(0,B.Z)(ci,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("i18n-t"),i=(0,l.up)("FAIcon");return(0,l.wg)(),(0,l.iD)("div",Ir,[jr,(0,l._)("div",Br,[(0,l._)("div",Ar,[(0,l._)("div",Er,[(0,l.Uk)((0,h.zw)(e.$t("settings.style.preview.header"))+" ",1),qr]),(0,l._)("span",Fr,(0,h.zw)(e.$t("settings.style.preview.header_faint")),1),(0,l._)("span",Zr,(0,h.zw)(e.$t("settings.style.preview.error")),1),(0,l._)("button",Mr,(0,h.zw)(e.$t("settings.style.preview.button")),1)]),(0,l._)("div",Rr,[(0,l._)("div",Nr,[Hr,(0,l._)("div",Yr,[(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.preview.content")),1),(0,l.Wm)(r,{scope:"global",keypath:"settings.style.preview.text"},{default:(0,l.w5)((function(){return[(0,l._)("code",Kr,(0,h.zw)(e.$t("settings.style.preview.mono")),1),(0,l._)("a",Gr,(0,h.zw)(e.$t("settings.style.preview.link")),1)]})),_:1}),(0,l._)("div",Jr,[(0,l.Wm)(i,{"fixed-width":"",style:{color:"var(--cBlue)"},class:"fa-scale-110 fa-old-padding",icon:"reply"}),(0,l.Wm)(i,{"fixed-width":"",style:{color:"var(--cGreen)"},class:"fa-scale-110 fa-old-padding",icon:"retweet"}),(0,l.Wm)(i,{"fixed-width":"",style:{color:"var(--cOrange)"},class:"fa-scale-110 fa-old-padding",icon:"star"}),(0,l.Wm)(i,{"fixed-width":"",style:{color:"var(--cRed)"},class:"fa-scale-110 fa-old-padding",icon:"times"})])])]),(0,l._)("div",Qr,[Xr,(0,l._)("div",ei,[(0,l.Wm)(r,{keypath:"settings.style.preview.fine_print",tag:"span",class:"faint",scope:"global"},{default:(0,l.w5)((function(){return[(0,l._)("a",ti,(0,h.zw)(e.$t("settings.style.preview.faint_link")),1)]})),_:1})])]),ni,(0,l._)("span",li,(0,h.zw)(e.$t("settings.style.preview.error")),1),(0,l._)("input",{value:e.$t("settings.style.preview.input"),type:"text"},null,8,ai),(0,l._)("div",oi,[(0,l._)("span",si,[ri,(0,l._)("label",ii,(0,h.zw)(e.$t("settings.style.preview.checkbox")),1)]),(0,l._)("button",ui,(0,h.zw)(e.$t("settings.style.preview.button")),1)])])])])}]]);function pi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function mi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pi(Object(n),!0).forEach((function(t){(0,W.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var hi=["bg","fg","text","link","cRed","cGreen","cBlue","cOrange"].map((function(e){return e+"ColorLocal"}));const fi={data:function(){var e=this;return mi(mi(mi({themeImporter:(0,gs.i)({validator:this.importValidator,onImport:this.onImport,onImportFailure:this.onImportFailure}),themeExporter:(0,gs.M)({filename:"pleroma_theme",getExportedObject:function(){return e.exportedTheme}}),availableStyles:[],selected:"",selectedTheme:this.$store.getters.mergedConfig.theme,themeWarning:void 0,tempImportFile:void 0,engineVersion:0,previewShadows:{},previewColors:{},previewRadii:{},previewFonts:{},shadowsInvalid:!0,colorsInvalid:!0,radiiInvalid:!0,keepColor:!1,keepShadows:!1,keepOpacity:!1,keepRoundness:!1,keepFonts:!1},Object.keys(bs.em).map((function(e){return[e,""]})).reduce((function(e,t){var n=(0,Vt.Z)(t,2),l=n[0],a=n[1];return mi(mi({},e),{},(0,W.Z)({},l+"ColorLocal",a))}),{})),Object.keys(ws.AQ).map((function(e){return[e,""]})).reduce((function(e,t){var n=(0,Vt.Z)(t,2),l=n[0],a=n[1];return mi(mi({},e),{},(0,W.Z)({},l+"OpacityLocal",a))}),{})),{},{shadowSelected:void 0,shadowsLocal:{},fontsLocal:{},btnRadiusLocal:"",inputRadiusLocal:"",checkboxRadiusLocal:"",panelRadiusLocal:"",avatarRadiusLocal:"",avatarAltRadiusLocal:"",attachmentRadiusLocal:"",tooltipRadiusLocal:"",chatMessageRadiusLocal:""})},created:function(){var e=this;(0,fs.RC)().then((function(e){return Promise.all(Object.entries(e).map((function(e){var t=(0,Vt.Z)(e,2),n=t[0];return t[1].then((function(e){return[n,e]}))})))})).then((function(e){return e.reduce((function(e,t){var n=(0,Vt.Z)(t,2),l=n[0],a=n[1];return a?mi(mi({},e),{},(0,W.Z)({},l,a)):e}),{})})).then((function(t){e.availableStyles=t}))},mounted:function(){this.loadThemeFromLocalStorage(),void 0===this.shadowSelected&&(this.shadowSelected=this.shadowsAvailable[0])},computed:{themeWarningHelp:function(){if(this.themeWarning){var e=this.$t,t="settings.style.switcher.help.",n=this.themeWarning,l=n.origin,a=n.themeEngineVersion,o=n.type,s=n.noActionsPossible;if("file"===l){if(2===a&&"wrong_version"===o)return e(t+"v2_imported");if(a>ws.we)return e(t+"future_version_imported")+" "+e(s?t+"snapshot_missing":t+"snapshot_present");if(a<ws.we)return e(t+"future_version_imported")+" "+e(s?t+"snapshot_missing":t+"snapshot_present")}else if("localStorage"===l){if("snapshot_source_mismatch"===o)return e(t+"snapshot_source_mismatch");if(2===a)return e(t+"upgraded_from_v2");if(a>ws.we)return e(t+"fe_downgraded")+" "+e(s?t+"migration_snapshot_ok":t+"migration_snapshot_gone");if(a<ws.we)return e(t+"fe_upgraded")+" "+e(s?t+"migration_snapshot_ok":t+"migration_snapshot_gone")}}},selectedVersion:function(){return Array.isArray(this.selectedTheme)?1:2},currentColors:function(){var e=this;return Object.keys(bs.em).map((function(t){return[t,e[t+"ColorLocal"]]})).reduce((function(e,t){var n=(0,Vt.Z)(t,2),l=n[0],a=n[1];return mi(mi({},e),{},(0,W.Z)({},l,a))}),{})},currentOpacity:function(){var e=this;return Object.keys(ws.AQ).map((function(t){return[t,e[t+"OpacityLocal"]]})).reduce((function(e,t){var n=(0,Vt.Z)(t,2),l=n[0],a=n[1];return mi(mi({},e),{},(0,W.Z)({},l,a))}),{})},currentRadii:function(){return{btn:this.btnRadiusLocal,input:this.inputRadiusLocal,checkbox:this.checkboxRadiusLocal,panel:this.panelRadiusLocal,avatar:this.avatarRadiusLocal,avatarAlt:this.avatarAltRadiusLocal,tooltip:this.tooltipRadiusLocal,attachment:this.attachmentRadiusLocal,chatMessage:this.chatMessageRadiusLocal}},preview:function(){return(0,fs.gm)(this.previewColors,this.previewRadii,this.previewShadows,this.previewFonts)},previewTheme:function(){return this.preview.theme.colors?this.preview.theme:{colors:{},opacity:{},radii:{},shadows:{},fonts:{}}},previewContrast:function(){try{if(!this.previewTheme.colors.bg)return{};var e=this.previewTheme.colors,t=this.previewTheme.opacity;if(!e.bg)return{};var n=Object.entries(e).reduce((function(e,t){var n,l=(0,Vt.Z)(t,2),a=l[0],o=l[1];return mi(mi({},e),{},(0,W.Z)({},a,(n=o).startsWith("--")||"transparent"===n?n:(0,hs.wK)(n)))}),{}),l=Object.entries(bs.em).reduce((function(e,l){var a=(0,Vt.Z)(l,2),o=a[0],s=a[1],r="text"===o||"link"===o;if(!(r||"object"===(0,la.Z)(s)&&null!==s&&s.textColor))return e;var i=r?{layer:"bg"}:s,u=i.layer,c=i.variant,d=c||u,p=(0,ws.AV)(d),m=[o].concat((0,Ee.Z)("bg"===d?["cRed","cGreen","cBlue","cOrange"]:[])),h=(0,ws.xb)(u,c||u,p,n,t);return h.flat().some((function(e){return null==e}))?e:mi(mi({},e),m.reduce((function(e,t){var l=r?"bg"+t[0].toUpperCase()+t.slice(1):t;return mi(mi({},e),{},(0,W.Z)({},l,(0,hs.aj)(n[t],h,n[t])))}),{}))}),{});return Object.entries(l).reduce((function(e,t){var n,l=(0,Vt.Z)(t,2),a=l[0],o=l[1];return e[a]={text:(n=o).toPrecision(3)+":1",aa:n>=4.5,aaa:n>=7,laa:n>=3,laaa:n>=4.5},e}),{})}catch(e){return console.warn("Failure computing contrasts",e),{}}},previewRules:function(){return this.preview.rules?[].concat((0,Ee.Z)(Object.values(this.preview.rules)),["color: var(--text)","font-family: var(--interfaceFont, sans-serif)"]).join(";"):""},shadowsAvailable:function(){return Object.keys(fs.vp).sort()},currentShadowOverriden:{get:function(){return!!this.currentShadow},set:function(e){e?this.shadowsLocal[this.shadowSelected]=this.currentShadowFallback.map((function(e){return Object.assign({},e)})):delete this.shadowsLocal[this.shadowSelected]}},currentShadowFallback:function(){return(this.previewTheme.shadows||{})[this.shadowSelected]},currentShadow:{get:function(){return this.shadowsLocal[this.shadowSelected]},set:function(e){this.shadowsLocal[this.shadowSelected]=e}},themeValid:function(){return!this.shadowsInvalid&&!this.colorsInvalid&&!this.radiiInvalid},exportedTheme:function(){var e=!(this.keepFonts||this.keepShadows||this.keepOpacity||this.keepRoundness||this.keepColor),t={themeEngineVersion:ws.we};return(this.keepFonts||e)&&(t.fonts=this.fontsLocal),(this.keepShadows||e)&&(t.shadows=this.shadowsLocal),(this.keepOpacity||e)&&(t.opacity=this.currentOpacity),(this.keepColor||e)&&(t.colors=this.currentColors),(this.keepRoundness||e)&&(t.radii=this.currentRadii),{_pleroma_theme_version:2,theme:mi({themeEngineVersion:ws.we},this.previewTheme),source:t}},isActive:function(){var e=this.$parent;return!!e&&e.isActive("theme")}},components:{ColorInput:Vs,OpacityInput:Is,RangeInput:Ss,ContrastRatio:Dr,ShadowControl:br,FontControl:Cr,TabSwitcher:m.Z,Preview:di,Checkbox:M.Z,Select:Rt.Z},methods:{loadTheme:function(e,t){var n=e.theme,l=e.source,a=e._pleroma_theme_version,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.dismissWarning(),!l&&!n)throw new Error("Can't load theme: empty");var s="localStorage"!==t||n.colors?a:"l1",r=(n||{}).themeEngineVersion,i=(l||{}).themeEngineVersion||2,u=i===ws.we,c=void 0!==n&&void 0!==l&&i!==r,d=l&&o||!n;u&&!c||d||"l1"===s||"defaults"===t||(c&&"localStorage"===t?this.themeWarning={origin:t,themeEngineVersion:i,type:"snapshot_source_mismatch"}:n?u||(this.themeWarning={origin:t,noActionsPossible:!l,themeEngineVersion:i,type:"wrong_version"}):this.themeWarning={origin:t,noActionsPossible:!0,themeEngineVersion:i,type:"no_snapshot_old_version"}),this.normalizeLocalState(n,s,l,d)},forceLoadLocalStorage:function(){this.loadThemeFromLocalStorage(!0)},dismissWarning:function(){this.themeWarning=void 0,this.tempImportFile=void 0},forceLoad:function(){switch(this.themeWarning.origin){case"localStorage":this.loadThemeFromLocalStorage(!0);break;case"file":this.onImport(this.tempImportFile,!0)}this.dismissWarning()},forceSnapshot:function(){switch(this.themeWarning.origin){case"localStorage":this.loadThemeFromLocalStorage(!1,!0);break;case"file":console.error("Forcing snapshot from file is not supported yet")}this.dismissWarning()},loadThemeFromLocalStorage:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.$store.getters.mergedConfig,l=n.customTheme,a=n.customThemeSource;l||a?this.loadTheme({theme:l,source:t?l:a},"localStorage",e):this.loadTheme(this.$store.state.instance.themeData,"defaults",e)},setCustomTheme:function(){this.$store.dispatch("setOption",{name:"customTheme",value:mi({themeEngineVersion:ws.we},this.previewTheme)}),this.$store.dispatch("setOption",{name:"customThemeSource",value:{themeEngineVersion:ws.we,shadows:this.shadowsLocal,fonts:this.fontsLocal,opacity:this.currentOpacity,colors:this.currentColors,radii:this.currentRadii}})},updatePreviewColorsAndShadows:function(){this.previewColors=(0,fs.LP)({opacity:this.currentOpacity,colors:this.currentColors}),this.previewShadows=(0,fs.H2)({shadows:this.shadowsLocal,opacity:this.previewTheme.opacity,themeEngineVersion:this.engineVersion},this.previewColors.theme.colors,this.previewColors.mod)},importTheme:function(){this.themeImporter.importData()},exportTheme:function(){this.themeExporter.exportData()},onImport:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.tempImportFile=e,this.loadTheme(e,"file",t)},onImportFailure:function(e){this.$store.dispatch("pushGlobalNotice",{messageKey:"settings.invalid_theme_imported",level:"error"})},importValidator:function(e){var t=e._pleroma_theme_version;return t>=1||t<=2},clearAll:function(){this.loadThemeFromLocalStorage()},clearV1:function(){var e=this;Object.keys(this.$data).filter((function(e){return e.endsWith("ColorLocal")||e.endsWith("OpacityLocal")})).filter((function(e){return!hi.includes(e)})).forEach((function(t){e.$data[t]=void 0}))},clearRoundness:function(){var e=this;Object.keys(this.$data).filter((function(e){return e.endsWith("RadiusLocal")})).forEach((function(t){e.$data[t]=void 0}))},clearOpacity:function(){var e=this;Object.keys(this.$data).filter((function(e){return e.endsWith("OpacityLocal")})).forEach((function(t){e.$data[t]=void 0}))},clearShadows:function(){this.shadowsLocal={}},clearFonts:function(){this.fontsLocal={}},normalizeLocalState:function(e){var t,n=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];void 0===a||!o&&a.themeEngineVersion!==ws.we?t=e:(t=a,l=a.themeEngineVersion);var s=t.radii||t,r=t.opacity,i=t.shadows||{},u=t.fonts||{},c=t.themeEngineVersion?t.colors||t:(0,fs.dE)(t.colors||t);if(0===l&&(t.version&&(l=t.version),void 0===c.text&&void 0!==c.fg&&(l=1),void 0!==c.text&&void 0!==c.fg&&(l=2)),this.engineVersion=l,1===l&&(this.fgColorLocal=(0,hs.CO)(c.btn),this.textColorLocal=(0,hs.CO)(c.fg)),!this.keepColor){this.clearV1();var d=new Set(1!==l?Object.keys(bs.em):[]);1!==l&&"l1"!==l||d.add("bg").add("link").add("cRed").add("cBlue").add("cGreen").add("cOrange"),d.forEach((function(e){var t=c[e],l=(0,hs.CO)(c[e]);n[e+"ColorLocal"]="#aN"===l?t:l}))}r&&!this.keepOpacity&&(this.clearOpacity(),Object.entries(r).forEach((function(e){var t=(0,Vt.Z)(e,2),l=t[0],a=t[1];null==a||Number.isNaN(a)||(n[l+"OpacityLocal"]=a)}))),this.keepRoundness||(this.clearRoundness(),Object.entries(s).forEach((function(e){var t=(0,Vt.Z)(e,2),l=t[0],a=t[1],o=l.endsWith("Radius")?l.split("Radius")[0]:l;n[o+"RadiusLocal"]=a}))),this.keepShadows||(this.clearShadows(),this.shadowsLocal=2===l?(0,fs.l9)(i,this.previewTheme.opacity):i,this.shadowSelected=this.shadowsAvailable[0]),this.keepFonts||(this.clearFonts(),this.fontsLocal=u)}},watch:{currentRadii:function(){try{this.previewRadii=(0,fs.lD)({radii:this.currentRadii}),this.radiiInvalid=!1}catch(e){this.radiiInvalid=!0,console.warn(e)}},shadowsLocal:{handler:function(){if(1!==Object.getOwnPropertyNames(this.previewColors).length)try{this.updatePreviewColorsAndShadows(),this.shadowsInvalid=!1}catch(e){this.shadowsInvalid=!0,console.warn(e)}},deep:!0},fontsLocal:{handler:function(){try{this.previewFonts=(0,fs.m)({fonts:this.fontsLocal}),this.fontsInvalid=!1}catch(e){this.fontsInvalid=!0,console.warn(e)}},deep:!0},currentColors:function(){try{this.updatePreviewColorsAndShadows(),this.colorsInvalid=!1,this.shadowsInvalid=!1}catch(e){this.colorsInvalid=!0,this.shadowsInvalid=!0,console.warn(e)}},currentOpacity:function(){try{this.updatePreviewColorsAndShadows()}catch(e){console.warn(e)}},selected:function(){var e=this;this.selectedTheme=Object.entries(this.availableStyles).find((function(t){var n=(0,Vt.Z)(t,2),l=(n[0],n[1]);return Array.isArray(l)?(console.log(l[0]===e.selected,e.selected),l[0]===e.selected):l.name===e.selected}))[1]},selectedTheme:function(){this.dismissWarning(),1===this.selectedVersion?(this.keepRoundness||this.clearRoundness(),this.keepShadows||this.clearShadows(),this.keepOpacity||this.clearOpacity(),this.keepColor||(this.clearV1(),this.bgColorLocal=this.selectedTheme[1],this.fgColorLocal=this.selectedTheme[2],this.textColorLocal=this.selectedTheme[3],this.linkColorLocal=this.selectedTheme[4],this.cRedColorLocal=this.selectedTheme[5],this.cGreenColorLocal=this.selectedTheme[6],this.cBlueColorLocal=this.selectedTheme[7],this.cOrangeColorLocal=this.selectedTheme[8])):this.selectedVersion>=2&&this.normalizeLocalState(this.selectedTheme.theme,2,this.selectedTheme.source)}}},gi=(0,B.Z)(fi,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("Select"),i=(0,l.up)("Checkbox"),u=(0,l.up)("preview"),c=(0,l.up)("ColorInput"),d=(0,l.up)("OpacityInput"),p=(0,l.up)("ContrastRatio"),m=(0,l.up)("RangeInput"),f=(0,l.up)("ShadowControl"),g=(0,l.up)("i18n-t"),b=(0,l.up)("FontControl"),w=(0,l.up)("tab-switcher");return(0,l.wg)(),(0,l.iD)("div",ao,[(0,l._)("div",oo,[(0,l._)("div",so,[e.themeWarning?((0,l.wg)(),(0,l.iD)("div",ro,[(0,l._)("div",io,(0,h.zw)(e.themeWarningHelp),1),(0,l._)("div",uo,["snapshot_source_mismatch"===e.themeWarning.type?((0,l.wg)(),(0,l.iD)(l.HY,{key:0},[(0,l._)("button",{class:"btn button-default",onClick:t[0]||(t[0]=function(){return e.forceLoad&&e.forceLoad.apply(e,arguments)})},(0,h.zw)(e.$t("settings.style.switcher.use_source")),1),(0,l._)("button",{class:"btn button-default",onClick:t[1]||(t[1]=function(){return e.forceSnapshot&&e.forceSnapshot.apply(e,arguments)})},(0,h.zw)(e.$t("settings.style.switcher.use_snapshot")),1)],64)):e.themeWarning.noActionsPossible?((0,l.wg)(),(0,l.iD)("button",{key:1,class:"btn button-default",onClick:t[2]||(t[2]=function(){return e.dismissWarning&&e.dismissWarning.apply(e,arguments)})},(0,h.zw)(e.$t("general.dismiss")),1)):((0,l.wg)(),(0,l.iD)(l.HY,{key:2},[(0,l._)("button",{class:"btn button-default",onClick:t[3]||(t[3]=function(){return e.forceLoad&&e.forceLoad.apply(e,arguments)})},(0,h.zw)(e.$t("settings.style.switcher.load_theme")),1),(0,l._)("button",{class:"btn button-default",onClick:t[4]||(t[4]=function(){return e.dismissWarning&&e.dismissWarning.apply(e,arguments)})},(0,h.zw)(e.$t("settings.style.switcher.keep_as_is")),1)],64))])])):(0,l.kq)("",!0),(0,l._)("div",co,[(0,l._)("div",po,[(0,l.Uk)((0,h.zw)(e.$t("settings.presets"))+" ",1),(0,l._)("label",mo,[(0,l.Wm)(r,{id:"preset-switcher",modelValue:e.selected,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.selected=t}),class:"preset-switcher"},{default:(0,l.w5)((function(){return[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.availableStyles,(function(e){return(0,l.wg)(),(0,l.iD)("option",{key:e.name,value:e.name||e[0],style:(0,h.j5)({backgroundColor:e[1]||(e.theme||e.source).colors.bg,color:e[3]||(e.theme||e.source).colors.text})},(0,h.zw)(e[0]||e.name),13,ho)})),128))]})),_:1},8,["modelValue"])])]),(0,l._)("div",fo,[(0,l._)("button",{class:"btn button-default",onClick:t[6]||(t[6]=function(){return e.importTheme&&e.importTheme.apply(e,arguments)})},(0,h.zw)(e.$t("settings.import_theme")),1),(0,l._)("button",{class:"btn button-default",onClick:t[7]||(t[7]=function(){return e.exportTheme&&e.exportTheme.apply(e,arguments)})},(0,h.zw)(e.$t("settings.export_theme")),1)])])]),(0,l._)("div",go,[(0,l._)("span",bo,[(0,l.Wm)(i,{modelValue:e.keepColor,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.keepColor=t})},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.style.switcher.keep_color")),1)]})),_:1},8,["modelValue"])]),(0,l._)("span",wo,[(0,l.Wm)(i,{modelValue:e.keepShadows,"onUpdate:modelValue":t[9]||(t[9]=function(t){return e.keepShadows=t})},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.style.switcher.keep_shadows")),1)]})),_:1},8,["modelValue"])]),(0,l._)("span",_o,[(0,l.Wm)(i,{modelValue:e.keepOpacity,"onUpdate:modelValue":t[10]||(t[10]=function(t){return e.keepOpacity=t})},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.style.switcher.keep_opacity")),1)]})),_:1},8,["modelValue"])]),(0,l._)("span",ko,[(0,l.Wm)(i,{modelValue:e.keepRoundness,"onUpdate:modelValue":t[11]||(t[11]=function(t){return e.keepRoundness=t})},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.style.switcher.keep_roundness")),1)]})),_:1},8,["modelValue"])]),(0,l._)("span",vo,[(0,l.Wm)(i,{modelValue:e.keepFonts,"onUpdate:modelValue":t[12]||(t[12]=function(t){return e.keepFonts=t})},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,h.zw)(e.$t("settings.style.switcher.keep_fonts")),1)]})),_:1},8,["modelValue"])]),(0,l._)("p",null,(0,h.zw)(e.$t("settings.style.switcher.save_load_hint")),1)])]),(0,l.Wm)(u,{style:(0,h.j5)(e.previewRules)},null,8,["style"]),((0,l.wg)(),(0,l.j4)(l.Ob,null,[(0,l.Wm)(w,{key:"style-tweak"},{default:(0,l.w5)((function(){return[(0,l._)("div",{label:e.$t("settings.style.common_colors._tab_label"),class:"color-container"},[(0,l._)("div",$o,[(0,l._)("p",null,(0,h.zw)(e.$t("settings.theme_help")),1),(0,l._)("div",Co,[(0,l._)("button",{class:"btn button-default",onClick:t[13]||(t[13]=function(){return e.clearOpacity&&e.clearOpacity.apply(e,arguments)})},(0,h.zw)(e.$t("settings.style.switcher.clear_opacity")),1),(0,l._)("button",{class:"btn button-default",onClick:t[14]||(t[14]=function(){return e.clearV1&&e.clearV1.apply(e,arguments)})},(0,h.zw)(e.$t("settings.style.switcher.clear_all")),1)])]),(0,l._)("p",null,(0,h.zw)(e.$t("settings.theme_help_v2_1")),1),(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.common_colors.main")),1),(0,l._)("div",Vo,[(0,l.Wm)(c,{modelValue:e.bgColorLocal,"onUpdate:modelValue":t[15]||(t[15]=function(t){return e.bgColorLocal=t}),name:"bgColor",label:e.$t("settings.background")},null,8,["modelValue","label"]),(0,l.Wm)(d,{modelValue:e.bgOpacityLocal,"onUpdate:modelValue":t[16]||(t[16]=function(t){return e.bgOpacityLocal=t}),name:"bgOpacity",fallback:e.previewTheme.opacity.bg},null,8,["modelValue","fallback"]),(0,l.Wm)(c,{modelValue:e.textColorLocal,"onUpdate:modelValue":t[17]||(t[17]=function(t){return e.textColorLocal=t}),name:"textColor",label:e.$t("settings.text")},null,8,["modelValue","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.bgText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.accentColorLocal,"onUpdate:modelValue":t[18]||(t[18]=function(t){return e.accentColorLocal=t}),name:"accentColor",fallback:e.previewTheme.colors.link,label:e.$t("settings.accent"),"show-optional-tickbox":void 0!==e.linkColorLocal},null,8,["modelValue","fallback","label","show-optional-tickbox"]),(0,l.Wm)(c,{modelValue:e.linkColorLocal,"onUpdate:modelValue":t[19]||(t[19]=function(t){return e.linkColorLocal=t}),name:"linkColor",fallback:e.previewTheme.colors.accent,label:e.$t("settings.links"),"show-optional-tickbox":void 0!==e.accentColorLocal},null,8,["modelValue","fallback","label","show-optional-tickbox"]),(0,l.Wm)(p,{contrast:e.previewContrast.bgLink},null,8,["contrast"])]),(0,l._)("div",To,[(0,l.Wm)(c,{modelValue:e.fgColorLocal,"onUpdate:modelValue":t[20]||(t[20]=function(t){return e.fgColorLocal=t}),name:"fgColor",label:e.$t("settings.foreground")},null,8,["modelValue","label"]),(0,l.Wm)(c,{modelValue:e.fgTextColorLocal,"onUpdate:modelValue":t[21]||(t[21]=function(t){return e.fgTextColorLocal=t}),name:"fgTextColor",label:e.$t("settings.text"),fallback:e.previewTheme.colors.fgText},null,8,["modelValue","label","fallback"]),(0,l.Wm)(c,{modelValue:e.fgLinkColorLocal,"onUpdate:modelValue":t[22]||(t[22]=function(t){return e.fgLinkColorLocal=t}),name:"fgLinkColor",label:e.$t("settings.links"),fallback:e.previewTheme.colors.fgLink},null,8,["modelValue","label","fallback"]),(0,l._)("p",null,(0,h.zw)(e.$t("settings.style.common_colors.foreground_hint")),1)]),(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.common_colors.rgbo")),1),(0,l._)("div",xo,[(0,l.Wm)(c,{modelValue:e.cRedColorLocal,"onUpdate:modelValue":t[23]||(t[23]=function(t){return e.cRedColorLocal=t}),name:"cRedColor",label:e.$t("settings.cRed")},null,8,["modelValue","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.bgCRed},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.cBlueColorLocal,"onUpdate:modelValue":t[24]||(t[24]=function(t){return e.cBlueColorLocal=t}),name:"cBlueColor",label:e.$t("settings.cBlue")},null,8,["modelValue","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.bgCBlue},null,8,["contrast"])]),(0,l._)("div",Lo,[(0,l.Wm)(c,{modelValue:e.cGreenColorLocal,"onUpdate:modelValue":t[25]||(t[25]=function(t){return e.cGreenColorLocal=t}),name:"cGreenColor",label:e.$t("settings.cGreen")},null,8,["modelValue","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.bgCGreen},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.cOrangeColorLocal,"onUpdate:modelValue":t[26]||(t[26]=function(t){return e.cOrangeColorLocal=t}),name:"cOrangeColor",label:e.$t("settings.cOrange")},null,8,["modelValue","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.bgCOrange},null,8,["contrast"])]),(0,l._)("p",null,(0,h.zw)(e.$t("settings.theme_help_v2_2")),1)],8,yo),(0,l._)("div",{label:e.$t("settings.style.advanced_colors._tab_label"),class:"color-container"},[(0,l._)("div",Oo,[(0,l._)("p",null,(0,h.zw)(e.$t("settings.theme_help")),1),(0,l._)("button",{class:"btn button-default",onClick:t[27]||(t[27]=function(){return e.clearOpacity&&e.clearOpacity.apply(e,arguments)})},(0,h.zw)(e.$t("settings.style.switcher.clear_opacity")),1),(0,l._)("button",{class:"btn button-default",onClick:t[28]||(t[28]=function(){return e.clearV1&&e.clearV1.apply(e,arguments)})},(0,h.zw)(e.$t("settings.style.switcher.clear_all")),1)]),(0,l._)("div",Wo,[(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.advanced_colors.post")),1),(0,l.Wm)(c,{modelValue:e.postLinkColorLocal,"onUpdate:modelValue":t[29]||(t[29]=function(t){return e.postLinkColorLocal=t}),name:"postLinkColor",fallback:e.previewTheme.colors.accent,label:e.$t("settings.links")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.postLink},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.postGreentextColorLocal,"onUpdate:modelValue":t[30]||(t[30]=function(t){return e.postGreentextColorLocal=t}),name:"postGreentextColor",fallback:e.previewTheme.colors.cGreen,label:e.$t("settings.greentext")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.postGreentext},null,8,["contrast"]),(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.advanced_colors.alert")),1),(0,l.Wm)(c,{modelValue:e.alertErrorColorLocal,"onUpdate:modelValue":t[31]||(t[31]=function(t){return e.alertErrorColorLocal=t}),name:"alertError",label:e.$t("settings.style.advanced_colors.alert_error"),fallback:e.previewTheme.colors.alertError},null,8,["modelValue","label","fallback"]),(0,l.Wm)(c,{modelValue:e.alertErrorTextColorLocal,"onUpdate:modelValue":t[32]||(t[32]=function(t){return e.alertErrorTextColorLocal=t}),name:"alertErrorText",label:e.$t("settings.text"),fallback:e.previewTheme.colors.alertErrorText},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.alertErrorText,large:""},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.alertWarningColorLocal,"onUpdate:modelValue":t[33]||(t[33]=function(t){return e.alertWarningColorLocal=t}),name:"alertWarning",label:e.$t("settings.style.advanced_colors.alert_warning"),fallback:e.previewTheme.colors.alertWarning},null,8,["modelValue","label","fallback"]),(0,l.Wm)(c,{modelValue:e.alertWarningTextColorLocal,"onUpdate:modelValue":t[34]||(t[34]=function(t){return e.alertWarningTextColorLocal=t}),name:"alertWarningText",label:e.$t("settings.text"),fallback:e.previewTheme.colors.alertWarningText},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.alertWarningText,large:""},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.alertNeutralColorLocal,"onUpdate:modelValue":t[35]||(t[35]=function(t){return e.alertNeutralColorLocal=t}),name:"alertNeutral",label:e.$t("settings.style.advanced_colors.alert_neutral"),fallback:e.previewTheme.colors.alertNeutral},null,8,["modelValue","label","fallback"]),(0,l.Wm)(c,{modelValue:e.alertNeutralTextColorLocal,"onUpdate:modelValue":t[36]||(t[36]=function(t){return e.alertNeutralTextColorLocal=t}),name:"alertNeutralText",label:e.$t("settings.text"),fallback:e.previewTheme.colors.alertNeutralText},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.alertNeutralText,large:""},null,8,["contrast"]),(0,l.Wm)(d,{modelValue:e.alertOpacityLocal,"onUpdate:modelValue":t[37]||(t[37]=function(t){return e.alertOpacityLocal=t}),name:"alertOpacity",fallback:e.previewTheme.opacity.alert},null,8,["modelValue","fallback"])]),(0,l._)("div",So,[(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.advanced_colors.badge")),1),(0,l.Wm)(c,{modelValue:e.badgeNotificationColorLocal,"onUpdate:modelValue":t[38]||(t[38]=function(t){return e.badgeNotificationColorLocal=t}),name:"badgeNotification",label:e.$t("settings.style.advanced_colors.badge_notification"),fallback:e.previewTheme.colors.badgeNotification},null,8,["modelValue","label","fallback"]),(0,l.Wm)(c,{modelValue:e.badgeNotificationTextColorLocal,"onUpdate:modelValue":t[39]||(t[39]=function(t){return e.badgeNotificationTextColorLocal=t}),name:"badgeNotificationText",label:e.$t("settings.text"),fallback:e.previewTheme.colors.badgeNotificationText},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.badgeNotificationText,large:""},null,8,["contrast"])]),(0,l._)("div",zo,[(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.advanced_colors.panel_header")),1),(0,l.Wm)(c,{modelValue:e.panelColorLocal,"onUpdate:modelValue":t[40]||(t[40]=function(t){return e.panelColorLocal=t}),name:"panelColor",fallback:e.previewTheme.colors.panel,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(d,{modelValue:e.panelOpacityLocal,"onUpdate:modelValue":t[41]||(t[41]=function(t){return e.panelOpacityLocal=t}),name:"panelOpacity",fallback:e.previewTheme.opacity.panel,disabled:"transparent"===e.panelColorLocal},null,8,["modelValue","fallback","disabled"]),(0,l.Wm)(c,{modelValue:e.panelTextColorLocal,"onUpdate:modelValue":t[42]||(t[42]=function(t){return e.panelTextColorLocal=t}),name:"panelTextColor",fallback:e.previewTheme.colors.panelText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.panelText,large:""},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.panelLinkColorLocal,"onUpdate:modelValue":t[43]||(t[43]=function(t){return e.panelLinkColorLocal=t}),name:"panelLinkColor",fallback:e.previewTheme.colors.panelLink,label:e.$t("settings.links")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.panelLink,large:""},null,8,["contrast"])]),(0,l._)("div",Po,[(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.advanced_colors.top_bar")),1),(0,l.Wm)(c,{modelValue:e.topBarColorLocal,"onUpdate:modelValue":t[44]||(t[44]=function(t){return e.topBarColorLocal=t}),name:"topBarColor",fallback:e.previewTheme.colors.topBar,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.topBarTextColorLocal,"onUpdate:modelValue":t[45]||(t[45]=function(t){return e.topBarTextColorLocal=t}),name:"topBarTextColor",fallback:e.previewTheme.colors.topBarText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.topBarText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.topBarLinkColorLocal,"onUpdate:modelValue":t[46]||(t[46]=function(t){return e.topBarLinkColorLocal=t}),name:"topBarLinkColor",fallback:e.previewTheme.colors.topBarLink,label:e.$t("settings.links")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.topBarLink},null,8,["contrast"])]),(0,l._)("div",Do,[(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.advanced_colors.inputs")),1),(0,l.Wm)(c,{modelValue:e.inputColorLocal,"onUpdate:modelValue":t[47]||(t[47]=function(t){return e.inputColorLocal=t}),name:"inputColor",fallback:e.previewTheme.colors.input,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(d,{modelValue:e.inputOpacityLocal,"onUpdate:modelValue":t[48]||(t[48]=function(t){return e.inputOpacityLocal=t}),name:"inputOpacity",fallback:e.previewTheme.opacity.input,disabled:"transparent"===e.inputColorLocal},null,8,["modelValue","fallback","disabled"]),(0,l.Wm)(c,{modelValue:e.inputTextColorLocal,"onUpdate:modelValue":t[49]||(t[49]=function(t){return e.inputTextColorLocal=t}),name:"inputTextColor",fallback:e.previewTheme.colors.inputText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.inputText},null,8,["contrast"])]),(0,l._)("div",Io,[(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.advanced_colors.buttons")),1),(0,l.Wm)(c,{modelValue:e.btnColorLocal,"onUpdate:modelValue":t[50]||(t[50]=function(t){return e.btnColorLocal=t}),name:"btnColor",fallback:e.previewTheme.colors.btn,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(d,{modelValue:e.btnOpacityLocal,"onUpdate:modelValue":t[51]||(t[51]=function(t){return e.btnOpacityLocal=t}),name:"btnOpacity",fallback:e.previewTheme.opacity.btn,disabled:"transparent"===e.btnColorLocal},null,8,["modelValue","fallback","disabled"]),(0,l.Wm)(c,{modelValue:e.btnTextColorLocal,"onUpdate:modelValue":t[52]||(t[52]=function(t){return e.btnTextColorLocal=t}),name:"btnTextColor",fallback:e.previewTheme.colors.btnText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.btnText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.btnPanelTextColorLocal,"onUpdate:modelValue":t[53]||(t[53]=function(t){return e.btnPanelTextColorLocal=t}),name:"btnPanelTextColor",fallback:e.previewTheme.colors.btnPanelText,label:e.$t("settings.style.advanced_colors.panel_header")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.btnPanelText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.btnTopBarTextColorLocal,"onUpdate:modelValue":t[54]||(t[54]=function(t){return e.btnTopBarTextColorLocal=t}),name:"btnTopBarTextColor",fallback:e.previewTheme.colors.btnTopBarText,label:e.$t("settings.style.advanced_colors.top_bar")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.btnTopBarText},null,8,["contrast"]),(0,l._)("h5",null,(0,h.zw)(e.$t("settings.style.advanced_colors.pressed")),1),(0,l.Wm)(c,{modelValue:e.btnPressedColorLocal,"onUpdate:modelValue":t[55]||(t[55]=function(t){return e.btnPressedColorLocal=t}),name:"btnPressedColor",fallback:e.previewTheme.colors.btnPressed,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.btnPressedTextColorLocal,"onUpdate:modelValue":t[56]||(t[56]=function(t){return e.btnPressedTextColorLocal=t}),name:"btnPressedTextColor",fallback:e.previewTheme.colors.btnPressedText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.btnPressedText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.btnPressedPanelTextColorLocal,"onUpdate:modelValue":t[57]||(t[57]=function(t){return e.btnPressedPanelTextColorLocal=t}),name:"btnPressedPanelTextColor",fallback:e.previewTheme.colors.btnPressedPanelText,label:e.$t("settings.style.advanced_colors.panel_header")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.btnPressedPanelText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.btnPressedTopBarTextColorLocal,"onUpdate:modelValue":t[58]||(t[58]=function(t){return e.btnPressedTopBarTextColorLocal=t}),name:"btnPressedTopBarTextColor",fallback:e.previewTheme.colors.btnPressedTopBarText,label:e.$t("settings.style.advanced_colors.top_bar")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.btnPressedTopBarText},null,8,["contrast"]),(0,l._)("h5",null,(0,h.zw)(e.$t("settings.style.advanced_colors.disabled")),1),(0,l.Wm)(c,{modelValue:e.btnDisabledColorLocal,"onUpdate:modelValue":t[59]||(t[59]=function(t){return e.btnDisabledColorLocal=t}),name:"btnDisabledColor",fallback:e.previewTheme.colors.btnDisabled,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.btnDisabledTextColorLocal,"onUpdate:modelValue":t[60]||(t[60]=function(t){return e.btnDisabledTextColorLocal=t}),name:"btnDisabledTextColor",fallback:e.previewTheme.colors.btnDisabledText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.btnDisabledPanelTextColorLocal,"onUpdate:modelValue":t[61]||(t[61]=function(t){return e.btnDisabledPanelTextColorLocal=t}),name:"btnDisabledPanelTextColor",fallback:e.previewTheme.colors.btnDisabledPanelText,label:e.$t("settings.style.advanced_colors.panel_header")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.btnDisabledTopBarTextColorLocal,"onUpdate:modelValue":t[62]||(t[62]=function(t){return e.btnDisabledTopBarTextColorLocal=t}),name:"btnDisabledTopBarTextColor",fallback:e.previewTheme.colors.btnDisabledTopBarText,label:e.$t("settings.style.advanced_colors.top_bar")},null,8,["modelValue","fallback","label"]),(0,l._)("h5",null,(0,h.zw)(e.$t("settings.style.advanced_colors.toggled")),1),(0,l.Wm)(c,{modelValue:e.btnToggledColorLocal,"onUpdate:modelValue":t[63]||(t[63]=function(t){return e.btnToggledColorLocal=t}),name:"btnToggledColor",fallback:e.previewTheme.colors.btnToggled,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.btnToggledTextColorLocal,"onUpdate:modelValue":t[64]||(t[64]=function(t){return e.btnToggledTextColorLocal=t}),name:"btnToggledTextColor",fallback:e.previewTheme.colors.btnToggledText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.btnToggledText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.btnToggledPanelTextColorLocal,"onUpdate:modelValue":t[65]||(t[65]=function(t){return e.btnToggledPanelTextColorLocal=t}),name:"btnToggledPanelTextColor",fallback:e.previewTheme.colors.btnToggledPanelText,label:e.$t("settings.style.advanced_colors.panel_header")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.btnToggledPanelText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.btnToggledTopBarTextColorLocal,"onUpdate:modelValue":t[66]||(t[66]=function(t){return e.btnToggledTopBarTextColorLocal=t}),name:"btnToggledTopBarTextColor",fallback:e.previewTheme.colors.btnToggledTopBarText,label:e.$t("settings.style.advanced_colors.top_bar")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.btnToggledTopBarText},null,8,["contrast"])]),(0,l._)("div",jo,[(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.advanced_colors.tabs")),1),(0,l.Wm)(c,{modelValue:e.tabColorLocal,"onUpdate:modelValue":t[67]||(t[67]=function(t){return e.tabColorLocal=t}),name:"tabColor",fallback:e.previewTheme.colors.tab,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.tabTextColorLocal,"onUpdate:modelValue":t[68]||(t[68]=function(t){return e.tabTextColorLocal=t}),name:"tabTextColor",fallback:e.previewTheme.colors.tabText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.tabText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.tabActiveTextColorLocal,"onUpdate:modelValue":t[69]||(t[69]=function(t){return e.tabActiveTextColorLocal=t}),name:"tabActiveTextColor",fallback:e.previewTheme.colors.tabActiveText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.tabActiveText},null,8,["contrast"])]),(0,l._)("div",Bo,[(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.advanced_colors.borders")),1),(0,l.Wm)(c,{modelValue:e.borderColorLocal,"onUpdate:modelValue":t[70]||(t[70]=function(t){return e.borderColorLocal=t}),name:"borderColor",fallback:e.previewTheme.colors.border,label:e.$t("settings.style.common.color")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(d,{modelValue:e.borderOpacityLocal,"onUpdate:modelValue":t[71]||(t[71]=function(t){return e.borderOpacityLocal=t}),name:"borderOpacity",fallback:e.previewTheme.opacity.border,disabled:"transparent"===e.borderColorLocal},null,8,["modelValue","fallback","disabled"])]),(0,l._)("div",Ao,[(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.advanced_colors.faint_text")),1),(0,l.Wm)(c,{modelValue:e.faintColorLocal,"onUpdate:modelValue":t[72]||(t[72]=function(t){return e.faintColorLocal=t}),name:"faintColor",fallback:e.previewTheme.colors.faint,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.faintLinkColorLocal,"onUpdate:modelValue":t[73]||(t[73]=function(t){return e.faintLinkColorLocal=t}),name:"faintLinkColor",fallback:e.previewTheme.colors.faintLink,label:e.$t("settings.links")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.panelFaintColorLocal,"onUpdate:modelValue":t[74]||(t[74]=function(t){return e.panelFaintColorLocal=t}),name:"panelFaintColor",fallback:e.previewTheme.colors.panelFaint,label:e.$t("settings.style.advanced_colors.panel_header")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(d,{modelValue:e.faintOpacityLocal,"onUpdate:modelValue":t[75]||(t[75]=function(t){return e.faintOpacityLocal=t}),name:"faintOpacity",fallback:e.previewTheme.opacity.faint},null,8,["modelValue","fallback"])]),(0,l._)("div",Eo,[(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.advanced_colors.underlay")),1),(0,l.Wm)(c,{modelValue:e.underlayColorLocal,"onUpdate:modelValue":t[76]||(t[76]=function(t){return e.underlayColorLocal=t}),name:"underlay",label:e.$t("settings.style.advanced_colors.underlay"),fallback:e.previewTheme.colors.underlay},null,8,["modelValue","label","fallback"]),(0,l.Wm)(d,{modelValue:e.underlayOpacityLocal,"onUpdate:modelValue":t[77]||(t[77]=function(t){return e.underlayOpacityLocal=t}),name:"underlayOpacity",fallback:e.previewTheme.opacity.underlay,disabled:"transparent"===e.underlayOpacityLocal},null,8,["modelValue","fallback","disabled"])]),(0,l._)("div",qo,[(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.advanced_colors.wallpaper")),1),(0,l.Wm)(c,{modelValue:e.wallpaperColorLocal,"onUpdate:modelValue":t[78]||(t[78]=function(t){return e.wallpaperColorLocal=t}),name:"wallpaper",label:e.$t("settings.style.advanced_colors.wallpaper"),fallback:e.previewTheme.colors.wallpaper},null,8,["modelValue","label","fallback"])]),(0,l._)("div",Fo,[(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.advanced_colors.poll")),1),(0,l.Wm)(c,{modelValue:e.pollColorLocal,"onUpdate:modelValue":t[79]||(t[79]=function(t){return e.pollColorLocal=t}),name:"poll",label:e.$t("settings.background"),fallback:e.previewTheme.colors.poll},null,8,["modelValue","label","fallback"]),(0,l.Wm)(c,{modelValue:e.pollTextColorLocal,"onUpdate:modelValue":t[80]||(t[80]=function(t){return e.pollTextColorLocal=t}),name:"pollText",label:e.$t("settings.text"),fallback:e.previewTheme.colors.pollText},null,8,["modelValue","label","fallback"])]),(0,l._)("div",Zo,[(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.advanced_colors.icons")),1),(0,l.Wm)(c,{modelValue:e.iconColorLocal,"onUpdate:modelValue":t[81]||(t[81]=function(t){return e.iconColorLocal=t}),name:"icon",label:e.$t("settings.style.advanced_colors.icons"),fallback:e.previewTheme.colors.icon},null,8,["modelValue","label","fallback"])]),(0,l._)("div",Mo,[(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.advanced_colors.highlight")),1),(0,l.Wm)(c,{modelValue:e.highlightColorLocal,"onUpdate:modelValue":t[82]||(t[82]=function(t){return e.highlightColorLocal=t}),name:"highlight",label:e.$t("settings.background"),fallback:e.previewTheme.colors.highlight},null,8,["modelValue","label","fallback"]),(0,l.Wm)(c,{modelValue:e.highlightTextColorLocal,"onUpdate:modelValue":t[83]||(t[83]=function(t){return e.highlightTextColorLocal=t}),name:"highlightText",label:e.$t("settings.text"),fallback:e.previewTheme.colors.highlightText},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.highlightText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.highlightLinkColorLocal,"onUpdate:modelValue":t[84]||(t[84]=function(t){return e.highlightLinkColorLocal=t}),name:"highlightLink",label:e.$t("settings.links"),fallback:e.previewTheme.colors.highlightLink},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.highlightLink},null,8,["contrast"])]),(0,l._)("div",Ro,[(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.advanced_colors.popover")),1),(0,l.Wm)(c,{modelValue:e.popoverColorLocal,"onUpdate:modelValue":t[85]||(t[85]=function(t){return e.popoverColorLocal=t}),name:"popover",label:e.$t("settings.background"),fallback:e.previewTheme.colors.popover},null,8,["modelValue","label","fallback"]),(0,l.Wm)(d,{modelValue:e.popoverOpacityLocal,"onUpdate:modelValue":t[86]||(t[86]=function(t){return e.popoverOpacityLocal=t}),name:"popoverOpacity",fallback:e.previewTheme.opacity.popover,disabled:"transparent"===e.popoverOpacityLocal},null,8,["modelValue","fallback","disabled"]),(0,l.Wm)(c,{modelValue:e.popoverTextColorLocal,"onUpdate:modelValue":t[87]||(t[87]=function(t){return e.popoverTextColorLocal=t}),name:"popoverText",label:e.$t("settings.text"),fallback:e.previewTheme.colors.popoverText},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.popoverText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.popoverLinkColorLocal,"onUpdate:modelValue":t[88]||(t[88]=function(t){return e.popoverLinkColorLocal=t}),name:"popoverLink",label:e.$t("settings.links"),fallback:e.previewTheme.colors.popoverLink},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.popoverLink},null,8,["contrast"])]),(0,l._)("div",No,[(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.advanced_colors.selectedPost")),1),(0,l.Wm)(c,{modelValue:e.selectedPostColorLocal,"onUpdate:modelValue":t[89]||(t[89]=function(t){return e.selectedPostColorLocal=t}),name:"selectedPost",label:e.$t("settings.background"),fallback:e.previewTheme.colors.selectedPost},null,8,["modelValue","label","fallback"]),(0,l.Wm)(c,{modelValue:e.selectedPostTextColorLocal,"onUpdate:modelValue":t[90]||(t[90]=function(t){return e.selectedPostTextColorLocal=t}),name:"selectedPostText",label:e.$t("settings.text"),fallback:e.previewTheme.colors.selectedPostText},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.selectedPostText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.selectedPostLinkColorLocal,"onUpdate:modelValue":t[91]||(t[91]=function(t){return e.selectedPostLinkColorLocal=t}),name:"selectedPostLink",label:e.$t("settings.links"),fallback:e.previewTheme.colors.selectedPostLink},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.selectedPostLink},null,8,["contrast"])]),(0,l._)("div",Ho,[(0,l._)("h4",null,(0,h.zw)(e.$t("settings.style.advanced_colors.selectedMenu")),1),(0,l.Wm)(c,{modelValue:e.selectedMenuColorLocal,"onUpdate:modelValue":t[92]||(t[92]=function(t){return e.selectedMenuColorLocal=t}),name:"selectedMenu",label:e.$t("settings.background"),fallback:e.previewTheme.colors.selectedMenu},null,8,["modelValue","label","fallback"]),(0,l.Wm)(c,{modelValue:e.selectedMenuTextColorLocal,"onUpdate:modelValue":t[93]||(t[93]=function(t){return e.selectedMenuTextColorLocal=t}),name:"selectedMenuText",label:e.$t("settings.text"),fallback:e.previewTheme.colors.selectedMenuText},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.selectedMenuText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.selectedMenuLinkColorLocal,"onUpdate:modelValue":t[94]||(t[94]=function(t){return e.selectedMenuLinkColorLocal=t}),name:"selectedMenuLink",label:e.$t("settings.links"),fallback:e.previewTheme.colors.selectedMenuLink},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.selectedMenuLink},null,8,["contrast"])]),(0,l._)("div",Yo,[(0,l._)("h4",null,(0,h.zw)(e.$t("chats.chats")),1),(0,l.Wm)(c,{modelValue:e.chatBgColorLocal,"onUpdate:modelValue":t[95]||(t[95]=function(t){return e.chatBgColorLocal=t}),name:"chatBgColor",fallback:e.previewTheme.colors.bg,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l._)("h5",null,(0,h.zw)(e.$t("settings.style.advanced_colors.chat.incoming")),1),(0,l.Wm)(c,{modelValue:e.chatMessageIncomingBgColorLocal,"onUpdate:modelValue":t[96]||(t[96]=function(t){return e.chatMessageIncomingBgColorLocal=t}),name:"chatMessageIncomingBgColor",fallback:e.previewTheme.colors.bg,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.chatMessageIncomingTextColorLocal,"onUpdate:modelValue":t[97]||(t[97]=function(t){return e.chatMessageIncomingTextColorLocal=t}),name:"chatMessageIncomingTextColor",fallback:e.previewTheme.colors.text,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.chatMessageIncomingLinkColorLocal,"onUpdate:modelValue":t[98]||(t[98]=function(t){return e.chatMessageIncomingLinkColorLocal=t}),name:"chatMessageIncomingLinkColor",fallback:e.previewTheme.colors.link,label:e.$t("settings.links")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.chatMessageIncomingBorderColorLocal,"onUpdate:modelValue":t[99]||(t[99]=function(t){return e.chatMessageIncomingBorderColorLocal=t}),name:"chatMessageIncomingBorderLinkColor",fallback:e.previewTheme.colors.fg,label:e.$t("settings.style.advanced_colors.chat.border")},null,8,["modelValue","fallback","label"]),(0,l._)("h5",null,(0,h.zw)(e.$t("settings.style.advanced_colors.chat.outgoing")),1),(0,l.Wm)(c,{modelValue:e.chatMessageOutgoingBgColorLocal,"onUpdate:modelValue":t[100]||(t[100]=function(t){return e.chatMessageOutgoingBgColorLocal=t}),name:"chatMessageOutgoingBgColor",fallback:e.previewTheme.colors.bg,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.chatMessageOutgoingTextColorLocal,"onUpdate:modelValue":t[101]||(t[101]=function(t){return e.chatMessageOutgoingTextColorLocal=t}),name:"chatMessageOutgoingTextColor",fallback:e.previewTheme.colors.text,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.chatMessageOutgoingLinkColorLocal,"onUpdate:modelValue":t[102]||(t[102]=function(t){return e.chatMessageOutgoingLinkColorLocal=t}),name:"chatMessageOutgoingLinkColor",fallback:e.previewTheme.colors.link,label:e.$t("settings.links")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.chatMessageOutgoingBorderColorLocal,"onUpdate:modelValue":t[103]||(t[103]=function(t){return e.chatMessageOutgoingBorderColorLocal=t}),name:"chatMessageOutgoingBorderLinkColor",fallback:e.previewTheme.colors.bg,label:e.$t("settings.style.advanced_colors.chat.border")},null,8,["modelValue","fallback","label"])])],8,Uo),(0,l._)("div",{label:e.$t("settings.style.radii._tab_label"),class:"radius-container"},[(0,l._)("div",Go,[(0,l._)("p",null,(0,h.zw)(e.$t("settings.radii_help")),1),(0,l._)("button",{class:"btn button-default",onClick:t[104]||(t[104]=function(){return e.clearRoundness&&e.clearRoundness.apply(e,arguments)})},(0,h.zw)(e.$t("settings.style.switcher.clear_all")),1)]),(0,l.Wm)(m,{modelValue:e.btnRadiusLocal,"onUpdate:modelValue":t[105]||(t[105]=function(t){return e.btnRadiusLocal=t}),name:"btnRadius",label:e.$t("settings.btnRadius"),fallback:e.previewTheme.radii.btn,max:"16","hard-min":"0"},null,8,["modelValue","label","fallback"]),(0,l.Wm)(m,{modelValue:e.inputRadiusLocal,"onUpdate:modelValue":t[106]||(t[106]=function(t){return e.inputRadiusLocal=t}),name:"inputRadius",label:e.$t("settings.inputRadius"),fallback:e.previewTheme.radii.input,max:"9","hard-min":"0"},null,8,["modelValue","label","fallback"]),(0,l.Wm)(m,{modelValue:e.checkboxRadiusLocal,"onUpdate:modelValue":t[107]||(t[107]=function(t){return e.checkboxRadiusLocal=t}),name:"checkboxRadius",label:e.$t("settings.checkboxRadius"),fallback:e.previewTheme.radii.checkbox,max:"16","hard-min":"0"},null,8,["modelValue","label","fallback"]),(0,l.Wm)(m,{modelValue:e.panelRadiusLocal,"onUpdate:modelValue":t[108]||(t[108]=function(t){return e.panelRadiusLocal=t}),name:"panelRadius",label:e.$t("settings.panelRadius"),fallback:e.previewTheme.radii.panel,max:"50","hard-min":"0"},null,8,["modelValue","label","fallback"]),(0,l.Wm)(m,{modelValue:e.avatarRadiusLocal,"onUpdate:modelValue":t[109]||(t[109]=function(t){return e.avatarRadiusLocal=t}),name:"avatarRadius",label:e.$t("settings.avatarRadius"),fallback:e.previewTheme.radii.avatar,max:"28","hard-min":"0"},null,8,["modelValue","label","fallback"]),(0,l.Wm)(m,{modelValue:e.avatarAltRadiusLocal,"onUpdate:modelValue":t[110]||(t[110]=function(t){return e.avatarAltRadiusLocal=t}),name:"avatarAltRadius",label:e.$t("settings.avatarAltRadius"),fallback:e.previewTheme.radii.avatarAlt,max:"28","hard-min":"0"},null,8,["modelValue","label","fallback"]),(0,l.Wm)(m,{modelValue:e.attachmentRadiusLocal,"onUpdate:modelValue":t[111]||(t[111]=function(t){return e.attachmentRadiusLocal=t}),name:"attachmentRadius",label:e.$t("settings.attachmentRadius"),fallback:e.previewTheme.radii.attachment,max:"50","hard-min":"0"},null,8,["modelValue","label","fallback"]),(0,l.Wm)(m,{modelValue:e.tooltipRadiusLocal,"onUpdate:modelValue":t[112]||(t[112]=function(t){return e.tooltipRadiusLocal=t}),name:"tooltipRadius",label:e.$t("settings.tooltipRadius"),fallback:e.previewTheme.radii.tooltip,max:"50","hard-min":"0"},null,8,["modelValue","label","fallback"]),(0,l.Wm)(m,{modelValue:e.chatMessageRadiusLocal,"onUpdate:modelValue":t[113]||(t[113]=function(t){return e.chatMessageRadiusLocal=t}),name:"chatMessageRadius",label:e.$t("settings.chatMessageRadius"),fallback:e.previewTheme.radii.chatMessage||2,max:"50","hard-min":"0"},null,8,["modelValue","label","fallback"])],8,Ko),(0,l._)("div",{label:e.$t("settings.style.shadows._tab_label"),class:"shadow-container"},[(0,l._)("div",Qo,[(0,l._)("div",Xo,[(0,l.Uk)((0,h.zw)(e.$t("settings.style.shadows.component"))+" "+(0,h.zw)(" ")+" ",1),(0,l.Wm)(r,{id:"shadow-switcher",modelValue:e.shadowSelected,"onUpdate:modelValue":t[114]||(t[114]=function(t){return e.shadowSelected=t}),class:"shadow-switcher"},{default:(0,l.w5)((function(){return[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.shadowsAvailable,(function(t){return(0,l.wg)(),(0,l.iD)("option",{key:t,value:t},(0,h.zw)(e.$t("settings.style.shadows.components."+t)),9,es)})),128))]})),_:1},8,["modelValue"])]),(0,l._)("div",ts,[(0,l._)("label",ns,(0,h.zw)(e.$t("settings.style.shadows.override")),1),(0,l.Uk)(" "+(0,h.zw)(" ")+" "),(0,l.wy)((0,l._)("input",{id:"override","onUpdate:modelValue":t[115]||(t[115]=function(t){return e.currentShadowOverriden=t}),name:"override",class:"input-override",type:"checkbox"},null,512),[[de.e8,e.currentShadowOverriden]]),ls]),(0,l._)("button",{class:"btn button-default",onClick:t[116]||(t[116]=function(){return e.clearShadows&&e.clearShadows.apply(e,arguments)})},(0,h.zw)(e.$t("settings.style.switcher.clear_all")),1)]),(0,l.Wm)(f,{modelValue:e.currentShadow,"onUpdate:modelValue":t[117]||(t[117]=function(t){return e.currentShadow=t}),ready:!!e.currentShadowFallback,fallback:e.currentShadowFallback},null,8,["modelValue","ready","fallback"]),"avatar"===e.shadowSelected||"avatarStatus"===e.shadowSelected?((0,l.wg)(),(0,l.iD)("div",as,[(0,l.Wm)(g,{scope:"global",keypath:"settings.style.shadows.filter_hint.always_drop_shadow",tag:"p"},{default:(0,l.w5)((function(){return[os]})),_:1}),(0,l._)("p",null,(0,h.zw)(e.$t("settings.style.shadows.filter_hint.avatar_inset")),1),(0,l.Wm)(g,{scope:"global",keypath:"settings.style.shadows.filter_hint.drop_shadow_syntax",tag:"p"},{default:(0,l.w5)((function(){return[ss,rs,is]})),_:1}),(0,l.Wm)(g,{scope:"global",keypath:"settings.style.shadows.filter_hint.inset_classic",tag:"p"},{default:(0,l.w5)((function(){return[us]})),_:1}),(0,l._)("p",null,(0,h.zw)(e.$t("settings.style.shadows.filter_hint.spread_zero")),1)])):(0,l.kq)("",!0)],8,Jo),(0,l._)("div",{label:e.$t("settings.style.fonts._tab_label"),class:"fonts-container"},[(0,l._)("div",ds,[(0,l._)("p",null,(0,h.zw)(e.$t("settings.style.fonts.help")),1),(0,l._)("button",{class:"btn button-default",onClick:t[118]||(t[118]=function(){return e.clearFonts&&e.clearFonts.apply(e,arguments)})},(0,h.zw)(e.$t("settings.style.switcher.clear_all")),1)]),(0,l.Wm)(b,{modelValue:e.fontsLocal.interface,"onUpdate:modelValue":t[119]||(t[119]=function(t){return e.fontsLocal.interface=t}),name:"ui",label:e.$t("settings.style.fonts.components.interface"),fallback:e.previewTheme.fonts.interface,"no-inherit":"1"},null,8,["modelValue","label","fallback"]),(0,l.Wm)(b,{modelValue:e.fontsLocal.input,"onUpdate:modelValue":t[120]||(t[120]=function(t){return e.fontsLocal.input=t}),name:"input",label:e.$t("settings.style.fonts.components.input"),fallback:e.previewTheme.fonts.input},null,8,["modelValue","label","fallback"]),(0,l.Wm)(b,{modelValue:e.fontsLocal.post,"onUpdate:modelValue":t[121]||(t[121]=function(t){return e.fontsLocal.post=t}),name:"post",label:e.$t("settings.style.fonts.components.post"),fallback:e.previewTheme.fonts.post},null,8,["modelValue","label","fallback"]),(0,l.Wm)(b,{modelValue:e.fontsLocal.postCode,"onUpdate:modelValue":t[122]||(t[122]=function(t){return e.fontsLocal.postCode=t}),name:"postCode",label:e.$t("settings.style.fonts.components.postCode"),fallback:e.previewTheme.fonts.postCode},null,8,["modelValue","label","fallback"])],8,cs)]})),_:1})],1024)),e.isActive?((0,l.wg)(),(0,l.j4)(l.lR,{key:0,to:"#unscrolled-content"},[(0,l._)("div",ps,[(0,l._)("button",{class:"btn button-default submit",disabled:!e.themeValid,onClick:t[123]||(t[123]=function(){return e.setCustomTheme&&e.setCustomTheme.apply(e,arguments)})},(0,h.zw)(e.$t("general.apply")),9,ms),(0,l._)("button",{class:"btn button-default",onClick:t[124]||(t[124]=function(){return e.clearAll&&e.clearAll.apply(e,arguments)})},(0,h.zw)(e.$t("settings.style.switcher.reset")),1)])])):(0,l.kq)("",!0)])}]]);D.vI.add(I.klh,I.ILF,I.G_j,I.XsY,I.qmU,I.q7m,I.Aq,I.YHc);const bi={components:{TabSwitcher:m.Z,DataImportExportTab:Y,MutesAndBlocksTab:Qe,NotificationsTab:zt,FilteringTab:nn,SecurityTab:wl,ProfileTab:ba,GeneralTab:Ya,VersionTab:lo,ThemeTab:gi},computed:{isLoggedIn:function(){return!!this.$store.state.users.currentUser},open:function(){return"hidden"!==this.$store.state.interface.settingsModalState},bodyLock:function(){return"visible"===this.$store.state.interface.settingsModalState}},methods:{onOpen:function(){var e=this.$store.state.interface.settingsModalTargetTab;if(e){var t=this.$refs.tabSwitcher.$slots.default().findIndex((function(t){return t.props&&t.props["data-tab-name"]===e}));t>=0&&this.$refs.tabSwitcher.setTab(t)}this.$store.dispatch("clearSettingsModalTargetTab")}},mounted:function(){this.onOpen()},watch:{open:function(e){e&&this.onOpen()}}},wi=(0,B.Z)(bi,[["render",function(e,t,n,m,h,f){var g=(0,l.up)("GeneralTab"),b=(0,l.up)("ProfileTab"),w=(0,l.up)("SecurityTab"),_=(0,l.up)("FilteringTab"),k=(0,l.up)("ThemeTab"),v=(0,l.up)("NotificationsTab"),y=(0,l.up)("DataImportExportTab"),$=(0,l.up)("MutesAndBlocksTab"),C=(0,l.up)("VersionTab"),V=(0,l.up)("tab-switcher");return(0,l.wg)(),(0,l.j4)(V,{ref:"tabSwitcher",class:"settings_tab-switcher","side-tab-bar":!0,"scrollable-tabs":!0,"body-scroll-lock":e.bodyLock},{default:(0,l.w5)((function(){return[(0,l._)("div",{label:e.$t("settings.general"),icon:"wrench","data-tab-name":"general"},[(0,l.Wm)(g)],8,a),e.isLoggedIn?((0,l.wg)(),(0,l.iD)("div",{key:0,label:e.$t("settings.profile_tab"),icon:"user","data-tab-name":"profile"},[(0,l.Wm)(b)],8,o)):(0,l.kq)("",!0),e.isLoggedIn?((0,l.wg)(),(0,l.iD)("div",{key:1,label:e.$t("settings.security_tab"),icon:"lock","data-tab-name":"security"},[(0,l.Wm)(w)],8,s)):(0,l.kq)("",!0),(0,l._)("div",{label:e.$t("settings.filtering"),icon:"filter","data-tab-name":"filtering"},[(0,l.Wm)(_)],8,r),(0,l._)("div",{label:e.$t("settings.theme"),icon:"paint-brush","data-tab-name":"theme"},[(0,l.Wm)(k)],8,i),e.isLoggedIn?((0,l.wg)(),(0,l.iD)("div",{key:2,label:e.$t("settings.notifications"),icon:"bell","data-tab-name":"notifications"},[(0,l.Wm)(v)],8,u)):(0,l.kq)("",!0),e.isLoggedIn?((0,l.wg)(),(0,l.iD)("div",{key:3,label:e.$t("settings.data_import_export_tab"),icon:"download","data-tab-name":"dataImportExport"},[(0,l.Wm)(y)],8,c)):(0,l.kq)("",!0),e.isLoggedIn?((0,l.wg)(),(0,l.iD)("div",{key:4,label:e.$t("settings.mutes_and_blocks"),fullHeight:!0,icon:"eye-slash","data-tab-name":"mutesAndBlocks"},[(0,l.Wm)($)],8,d)):(0,l.kq)("",!0),(0,l._)("div",{label:e.$t("settings.version.title"),icon:"info","data-tab-name":"version"},[(0,l.Wm)(C)],8,p)]})),_:1},8,["body-scroll-lock"])}]])}}]);
-//# sourceMappingURL=1264.1e16af28a0b44d4d17d0.js.map \ No newline at end of file