2FAuth/public/build/assets/Accounts-BErdy-fg.js
2024-11-27 12:03:02 +01:00

8 lines
55 KiB
JavaScript
Vendored
Raw Blame History

This file contains invisible Unicode characters

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

import{u as Rt,l as re,m as w,d as k,e as g,F as Qe,D as ft,j as T,k as R,n as q,t as I,f as p,U as Ze,g as Re,I as vn,r as ne,J as rt,K as bn,y as _n,p as Bt,h as ge,i as Y,L as Jt,M as yn,N as wn,C as Ye,O as Yt,P as st,Q as En,a as Sn,R as Dn,S as kn,b as Cn,T as $n,s as yt,x as Tn,o as On,H as wt,G as $e,V as In,z as Et,W as An,w as St,X as Xe,A as zt,Y as Mn}from"./app-CzxRjCVM.js";import{_ as xn,a as Pn,b as Nn}from"./OtpDisplay-ytUtG8ZN.js";import{_ as Fn}from"./SearchBox-CH3IEr_n.js";import{u as Rn}from"./bus-BNAtGMCo.js";import"./Spinner-C-V0HKYn.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const Bn={id:"groupSwitch",class:"container groups"},Gn={class:"columns is-centered"},Ln={class:"column is-one-third-tablet is-one-quarter-desktop is-one-quarter-widescreen is-one-quarter-fullhd"},Xn={class:"columns is-multiline"},Yn=["onClick"],zn={class:"columns is-centered"},Un={class:"column has-text-centered"},Hn={__name:"GroupSwitch",props:{showGroupSwitch:Boolean,groups:Array},emits:["update:showGroupSwitch"],setup(o,{emit:e}){const n=Rt(),t=e;function i(r){n.preferences.activeGroup=r,n.preferences.rememberActiveGroup&&vn.updatePreference("activeGroup",r),t("update:showGroupSwitch",!1)}return(r,s)=>{const l=re("RouterLink"),u=re("ButtonBackCloseCancel"),a=re("VueFooter");return w(),k("div",Bn,[g("div",Gn,[g("div",Ln,[g("div",Xn,[(w(!0),k(Qe,null,ft(o.groups,f=>(w(),k("div",{class:"column is-full",key:f.id},[T(p(Ze),null,{default:R(({mode:c})=>[g("button",{type:"button",class:q(["button is-fullwidth",{"is-dark has-text-light is-outlined":c=="dark"}]),onClick:E=>i(f.id)},I(f.name),11,Yn)]),_:2},1024)]))),128))]),g("div",zn,[g("div",Un,[T(l,{to:{name:"groups"}},{default:R(()=>[Re(I(r.$t("groups.manage_groups")),1)]),_:1})])])])]),T(a,{showButtons:!0},{default:R(()=>[T(u,{action:"close",useLinkTag:!1,onClosed:s[0]||(s[0]=f=>r.$emit("update:showGroupSwitch",!1))})]),_:1})])}}},qn={class:"container group-selector"},Wn={class:"columns is-centered is-multiline"},Vn={class:"column is-full has-text-centered"},jn={class:"column is-one-third-tablet is-one-quarter-desktop is-one-quarter-widescreen is-one-quarter-fullhd"},Kn={class:"columns is-multiline"},Qn=["onClick"],Zn={key:0,class:"is-italic"},Jn={key:1},eo={class:"columns is-centered"},to={class:"column has-text-centered"},no={class:"control"},oo={__name:"DestinationGroupSelector",props:{showDestinationGroupSelector:Boolean,selectedAccountsIds:Array,groups:Array},emits:["update:showDestinationGroupSelector","accounts-moved"],setup(o,{emit:e}){const n=o,t=ne(null),i=e;async function r(){t.value===0?await rt.withdraw(n.selectedAccountsIds):await bn.assign(n.selectedAccountsIds,t.value),i("accounts-moved")}return(s,l)=>{const u=re("RouterLink"),a=re("ButtonBackCloseCancel"),f=re("VueFooter");return w(),k("div",qn,[g("div",Wn,[g("div",Vn,I(s.$t("groups.move_selected_to")),1),g("div",jn,[g("div",Kn,[(w(!0),k(Qe,null,ft(o.groups,c=>(w(),k("div",{class:"column is-full",key:c.id},[T(p(Ze),null,{default:R(({mode:E})=>[g("button",{type:"button",class:q(["button is-fullwidth",{"is-link":p(t)===c.id,"is-dark has-text-light is-outlined":E=="dark"}]),onClick:D=>t.value=c.id},[c.id===0?(w(),k("span",Zn,I(s.$t("groups.no_group")),1)):(w(),k("span",Jn,I(c.name),1))],10,Qn)]),_:2},1024)]))),128))]),g("div",eo,[g("div",to,[T(u,{to:{name:"groups"}},{default:R(()=>[Re(I(s.$t("groups.manage_groups")),1)]),_:1})])])])]),T(f,{showButtons:!0},{default:R(()=>[g("p",no,[g("button",{type:"button",class:"button is-link is-rounded",onClick:r},I(s.$t("commons.move")),1)]),T(a,{action:"cancel",useLinkTag:!1,onCanceled:l[0]||(l[0]=c=>s.$emit("update:showDestinationGroupSelector",!1))})]),_:1})])}}},io={class:"toolbar has-text-centered"},ro={class:"columns"},so={class:"column has-nowrap px-0"},ao={class:"has-text-grey mr-1"},lo=["title"],uo=["title"],co=["title"],fo=["title"],po={__name:"Toolbar",props:{selectedCount:Number},setup(o){return(e,n)=>{const t=re("FontAwesomeIcon");return w(),k("div",io,[g("div",ro,[g("div",so,[g("span",ao,I(e.$t("commons.x_selected",{count:o.selectedCount})),1),g("button",{type:"button",id:"btnUnselectAll",onClick:n[0]||(n[0]=i=>e.$emit("clear-selected")),class:"clear-selection delete mr-4",style:_n({visibility:o.selectedCount>0?"visible":"hidden"}),title:e.$t("commons.clear_selection")},null,12,lo),g("button",{type:"button",id:"btnSelectAll",onClick:n[1]||(n[1]=i=>e.$emit("select-all")),class:"button mr-5 has-line-height p-1 is-ghost has-text-grey",title:e.$t("commons.select_all")},[g("span",null,I(e.$t("commons.check_all")),1),T(t,{class:"ml-1",icon:["fas","check-square"]})],8,uo),g("button",{type:"button",id:"btnSortAscending",onClick:n[2]||(n[2]=i=>e.$emit("sort-asc")),class:"button has-line-height p-1 is-ghost has-text-grey",title:e.$t("commons.sort_ascending")},[T(t,{icon:["fas","sort-alpha-down"]})],8,co),g("button",{type:"button",id:"btnSortDescending",onClick:n[3]||(n[3]=i=>e.$emit("sort-desc")),class:"button has-line-height p-1 is-ghost has-text-grey",title:e.$t("commons.sort_descending")},[T(t,{icon:["fas","sort-alpha-up"]})],8,fo)])])])}}},ho={key:0,class:"control"},mo={class:"icon is-small"},go={key:1,class:"control"},vo={key:2,class:"control"},bo=["disabled","title"],_o={key:3,class:"control"},yo=["disabled"],wo={key:4,class:"control"},Eo=["disabled","title"],So={__name:"ActionButtons",props:{inManagementMode:Boolean,areDisabled:Boolean},emits:["update:inManagementMode","move-button-clicked","delete-button-clicked","export-button-clicked"],setup(o,{emit:e}){const n=Bt(),t=Rt();function i(){t.preferences.useDirectCapture&&t.preferences.defaultCaptureMode==="advancedForm"?n.push({name:"createAccount"}):t.preferences.useDirectCapture&&t.preferences.defaultCaptureMode==="livescan"?n.push({name:"capture"}):n.push({name:"start"})}return(r,s)=>{const l=re("FontAwesomeIcon");return w(),ge(p(Ze),null,{default:R(({mode:u})=>[o.inManagementMode?Y("",!0):(w(),k("p",ho,[g("button",{type:"button",class:"button is-link is-rounded is-focus",onClick:i},[g("span",null,I(r.$t("commons.new")),1),g("span",mo,[T(l,{icon:["fas","qrcode"]})])])])),o.inManagementMode?Y("",!0):(w(),k("p",go,[g("button",{type:"button",id:"btnManage",class:q(["button is-rounded",{"is-dark":u=="dark"}]),onClick:s[0]||(s[0]=a=>r.$emit("update:inManagementMode",!0))},I(r.$t("commons.manage")),3)])),o.inManagementMode?(w(),k("p",vo,[g("button",{id:"btnMove",disabled:o.areDisabled,class:q(["button is-rounded",[{"is-outlined":u=="dark"||o.areDisabled},o.areDisabled?"is-dark":"is-link"]]),onClick:s[1]||(s[1]=a=>r.$emit("move-button-clicked")),title:r.$t("groups.move_selected_to_group")},I(r.$t("commons.move")),11,bo)])):Y("",!0),o.inManagementMode?(w(),k("p",_o,[g("button",{id:"btnDelete",disabled:o.areDisabled,class:q(["button is-rounded",[{"is-outlined":u=="dark"||o.areDisabled},o.areDisabled?"is-dark":"is-link"]]),onClick:s[2]||(s[2]=a=>r.$emit("delete-button-clicked"))},I(r.$t("commons.delete")),11,yo)])):Y("",!0),o.inManagementMode?(w(),k("p",wo,[g("button",{id:"btnExport",disabled:o.areDisabled,class:q(["button is-rounded",[{"is-outlined":u=="dark"||o.areDisabled},o.areDisabled?"is-dark":"is-link"]]),onClick:s[3]||(s[3]=a=>r.$emit("export-button-clicked")),title:r.$t("twofaccounts.export_selected_accounts")},I(r.$t("commons.export")),11,Eo)])):Y("",!0)]),_:1})}}},Do={class:"block"},ko={class:"has-text-weight-bold has-text-grey"},Co={class:"is-size-7-mobile"},$o=["href"],To=["title"],Oo={class:"block"},Io={class:"has-text-weight-bold has-text-grey"},Ao={class:"is-size-7-mobile"},Mo=["title"],xo={__name:"ExportButtons",emits:["export-twofauth-format","export-otpauth-format"],setup(o,{emit:e}){Bt();const n=Jt("2fauth");return(t,i)=>(w(),k(Qe,null,[g("div",Do,[T(p(Ze),null,{default:R(({mode:r})=>[g("p",ko,I(t.$t("twofaccounts.twofauth_export_format_sub")),1)]),_:1}),g("p",Co,[Re(I(t.$t("twofaccounts.twofauth_export_format_desc"))+" "+I(t.$t("twofaccounts.twofauth_export_format_url"))+" ",1),g("a",{id:"lnkExportSchemaUrl",class:"is-link",tabindex:"0",href:p(n).urls.exportSchemaUrl,target:"_blank"},I(t.$t("twofaccounts.twofauth_export_schema")),9,$o)]),g("button",{type:"button",id:"btnExport2FAuth",class:"button is-link is-rounded is-focus my-3",onClick:i[0]||(i[0]=r=>t.$emit("export-twofauth-format")),title:t.$t("twofaccounts.twofauth_export_format_sub")},I(t.$t("twofaccounts.twofauth_export_format")),9,To)]),g("div",Oo,[g("p",Io,I(t.$t("twofaccounts.otpauth_export_format_sub")),1),g("p",Ao,I(t.$t("twofaccounts.otpauth_export_format_desc")),1),g("button",{type:"button",id:"btnExportOtpauth",class:"button is-link is-rounded is-focus my-3",onClick:i[1]||(i[1]=r=>t.$emit("export-otpauth-format")),title:t.$t("twofaccounts.otpauth_export_format_sub")},I(t.$t("twofaccounts.otpauth_export_format")),9,Mo)])],64))}};/**!
* Sortable 1.15.3
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/function Ut(o,e){var n=Object.keys(o);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(o);e&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(o,i).enumerable})),n.push.apply(n,t)}return n}function he(o){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ut(Object(n),!0).forEach(function(t){Po(o,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(n)):Ut(Object(n)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(n,t))})}return o}function at(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?at=function(e){return typeof e}:at=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},at(o)}function Po(o,e,n){return e in o?Object.defineProperty(o,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):o[e]=n,o}function be(){return be=Object.assign||function(o){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(o[t]=n[t])}return o},be.apply(this,arguments)}function No(o,e){if(o==null)return{};var n={},t=Object.keys(o),i,r;for(r=0;r<t.length;r++)i=t[r],!(e.indexOf(i)>=0)&&(n[i]=o[i]);return n}function Fo(o,e){if(o==null)return{};var n=No(o,e),t,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);for(i=0;i<r.length;i++)t=r[i],!(e.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(o,t)&&(n[t]=o[t])}return n}var Ro="1.15.3";function ve(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var _e=ve(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Je=ve(/Edge/i),Ht=ve(/firefox/i),qe=ve(/safari/i)&&!ve(/chrome/i)&&!ve(/android/i),en=ve(/iP(ad|od|hone)/i),tn=ve(/chrome/i)&&ve(/android/i),nn={capture:!1,passive:!1};function O(o,e,n){o.addEventListener(e,n,!_e&&nn)}function $(o,e,n){o.removeEventListener(e,n,!_e&&nn)}function pt(o,e){if(e){if(e[0]===">"&&(e=e.substring(1)),o)try{if(o.matches)return o.matches(e);if(o.msMatchesSelector)return o.msMatchesSelector(e);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(e)}catch{return!1}return!1}}function on(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function de(o,e,n,t){if(o){n=n||document;do{if(e!=null&&(e[0]===">"?o.parentNode===n&&pt(o,e):pt(o,e))||t&&o===n)return o;if(o===n)break}while(o=on(o))}return null}var qt=/\s+/g;function oe(o,e,n){if(o&&e)if(o.classList)o.classList[n?"add":"remove"](e);else{var t=(" "+o.className+" ").replace(qt," ").replace(" "+e+" "," ");o.className=(t+(n?" "+e:"")).replace(qt," ")}}function b(o,e,n){var t=o&&o.style;if(t){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(n=o.currentStyle),e===void 0?n:n[e];!(e in t)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),t[e]=n+(typeof n=="string"?"":"px")}}function Be(o,e){var n="";if(typeof o=="string")n=o;else do{var t=b(o,"transform");t&&t!=="none"&&(n=t+" "+n)}while(!e&&(o=o.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function rn(o,e,n){if(o){var t=o.getElementsByTagName(e),i=0,r=t.length;if(n)for(;i<r;i++)n(t[i],i);return t}return[]}function pe(){var o=document.scrollingElement;return o||document.documentElement}function N(o,e,n,t,i){if(!(!o.getBoundingClientRect&&o!==window)){var r,s,l,u,a,f,c;if(o!==window&&o.parentNode&&o!==pe()?(r=o.getBoundingClientRect(),s=r.top,l=r.left,u=r.bottom,a=r.right,f=r.height,c=r.width):(s=0,l=0,u=window.innerHeight,a=window.innerWidth,f=window.innerHeight,c=window.innerWidth),(e||n)&&o!==window&&(i=i||o.parentNode,!_e))do if(i&&i.getBoundingClientRect&&(b(i,"transform")!=="none"||n&&b(i,"position")!=="static")){var E=i.getBoundingClientRect();s-=E.top+parseInt(b(i,"border-top-width")),l-=E.left+parseInt(b(i,"border-left-width")),u=s+r.height,a=l+r.width;break}while(i=i.parentNode);if(t&&o!==window){var D=Be(i||o),S=D&&D.a,C=D&&D.d;D&&(s/=C,l/=S,c/=S,f/=C,u=s+f,a=l+c)}return{top:s,left:l,bottom:u,right:a,width:c,height:f}}}function Wt(o,e,n){for(var t=De(o,!0),i=N(o)[e];t;){var r=N(t)[n],s=void 0;if(s=i>=r,!s)return t;if(t===pe())break;t=De(t,!1)}return!1}function Ge(o,e,n,t){for(var i=0,r=0,s=o.children;r<s.length;){if(s[r].style.display!=="none"&&s[r]!==_.ghost&&(t||s[r]!==_.dragged)&&de(s[r],n.draggable,o,!1)){if(i===e)return s[r];i++}r++}return null}function Gt(o,e){for(var n=o.lastElementChild;n&&(n===_.ghost||b(n,"display")==="none"||e&&!pt(n,e));)n=n.previousElementSibling;return n||null}function ae(o,e){var n=0;if(!o||!o.parentNode)return-1;for(;o=o.previousElementSibling;)o.nodeName.toUpperCase()!=="TEMPLATE"&&o!==_.clone&&(!e||pt(o,e))&&n++;return n}function Vt(o){var e=0,n=0,t=pe();if(o)do{var i=Be(o),r=i.a,s=i.d;e+=o.scrollLeft*r,n+=o.scrollTop*s}while(o!==t&&(o=o.parentNode));return[e,n]}function Bo(o,e){for(var n in o)if(o.hasOwnProperty(n)){for(var t in e)if(e.hasOwnProperty(t)&&e[t]===o[n][t])return Number(n)}return-1}function De(o,e){if(!o||!o.getBoundingClientRect)return pe();var n=o,t=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=b(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return pe();if(t||e)return n;t=!0}}while(n=n.parentNode);return pe()}function Go(o,e){if(o&&e)for(var n in e)e.hasOwnProperty(n)&&(o[n]=e[n]);return o}function Dt(o,e){return Math.round(o.top)===Math.round(e.top)&&Math.round(o.left)===Math.round(e.left)&&Math.round(o.height)===Math.round(e.height)&&Math.round(o.width)===Math.round(e.width)}var We;function sn(o,e){return function(){if(!We){var n=arguments,t=this;n.length===1?o.call(t,n[0]):o.apply(t,n),We=setTimeout(function(){We=void 0},e)}}}function Lo(){clearTimeout(We),We=void 0}function an(o,e,n){o.scrollLeft+=e,o.scrollTop+=n}function ln(o){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(o).cloneNode(!0):n?n(o).clone(!0)[0]:o.cloneNode(!0)}function un(o,e,n){var t={};return Array.from(o.children).forEach(function(i){var r,s,l,u;if(!(!de(i,e.draggable,o,!1)||i.animated||i===n)){var a=N(i);t.left=Math.min((r=t.left)!==null&&r!==void 0?r:1/0,a.left),t.top=Math.min((s=t.top)!==null&&s!==void 0?s:1/0,a.top),t.right=Math.max((l=t.right)!==null&&l!==void 0?l:-1/0,a.right),t.bottom=Math.max((u=t.bottom)!==null&&u!==void 0?u:-1/0,a.bottom)}}),t.width=t.right-t.left,t.height=t.bottom-t.top,t.x=t.left,t.y=t.top,t}var Z="Sortable"+new Date().getTime();function Xo(){var o=[],e;return{captureAnimationState:function(){if(o=[],!!this.options.animation){var t=[].slice.call(this.el.children);t.forEach(function(i){if(!(b(i,"display")==="none"||i===_.ghost)){o.push({target:i,rect:N(i)});var r=he({},o[o.length-1].rect);if(i.thisAnimationDuration){var s=Be(i,!0);s&&(r.top-=s.f,r.left-=s.e)}i.fromRect=r}})}},addAnimationState:function(t){o.push(t)},removeAnimationState:function(t){o.splice(Bo(o,{target:t}),1)},animateAll:function(t){var i=this;if(!this.options.animation){clearTimeout(e),typeof t=="function"&&t();return}var r=!1,s=0;o.forEach(function(l){var u=0,a=l.target,f=a.fromRect,c=N(a),E=a.prevFromRect,D=a.prevToRect,S=l.rect,C=Be(a,!0);C&&(c.top-=C.f,c.left-=C.e),a.toRect=c,a.thisAnimationDuration&&Dt(E,c)&&!Dt(f,c)&&(S.top-c.top)/(S.left-c.left)===(f.top-c.top)/(f.left-c.left)&&(u=zo(S,E,D,i.options)),Dt(c,f)||(a.prevFromRect=f,a.prevToRect=c,u||(u=i.options.animation),i.animate(a,S,c,u)),u&&(r=!0,s=Math.max(s,u),clearTimeout(a.animationResetTimer),a.animationResetTimer=setTimeout(function(){a.animationTime=0,a.prevFromRect=null,a.fromRect=null,a.prevToRect=null,a.thisAnimationDuration=null},u),a.thisAnimationDuration=u)}),clearTimeout(e),r?e=setTimeout(function(){typeof t=="function"&&t()},s):typeof t=="function"&&t(),o=[]},animate:function(t,i,r,s){if(s){b(t,"transition",""),b(t,"transform","");var l=Be(this.el),u=l&&l.a,a=l&&l.d,f=(i.left-r.left)/(u||1),c=(i.top-r.top)/(a||1);t.animatingX=!!f,t.animatingY=!!c,b(t,"transform","translate3d("+f+"px,"+c+"px,0)"),this.forRepaintDummy=Yo(t),b(t,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),b(t,"transform","translate3d(0,0,0)"),typeof t.animated=="number"&&clearTimeout(t.animated),t.animated=setTimeout(function(){b(t,"transition",""),b(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},s)}}}}function Yo(o){return o.offsetWidth}function zo(o,e,n,t){return Math.sqrt(Math.pow(e.top-o.top,2)+Math.pow(e.left-o.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*t.animation}var xe=[],kt={initializeByDefault:!0},et={mount:function(e){for(var n in kt)kt.hasOwnProperty(n)&&!(n in e)&&(e[n]=kt[n]);xe.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),xe.push(e)},pluginEvent:function(e,n,t){var i=this;this.eventCanceled=!1,t.cancel=function(){i.eventCanceled=!0};var r=e+"Global";xe.forEach(function(s){n[s.pluginName]&&(n[s.pluginName][r]&&n[s.pluginName][r](he({sortable:n},t)),n.options[s.pluginName]&&n[s.pluginName][e]&&n[s.pluginName][e](he({sortable:n},t)))})},initializePlugins:function(e,n,t,i){xe.forEach(function(l){var u=l.pluginName;if(!(!e.options[u]&&!l.initializeByDefault)){var a=new l(e,n,e.options);a.sortable=e,a.options=e.options,e[u]=a,be(t,a.defaults)}});for(var r in e.options)if(e.options.hasOwnProperty(r)){var s=this.modifyOption(e,r,e.options[r]);typeof s<"u"&&(e.options[r]=s)}},getEventProperties:function(e,n){var t={};return xe.forEach(function(i){typeof i.eventProperties=="function"&&be(t,i.eventProperties.call(n[i.pluginName],e))}),t},modifyOption:function(e,n,t){var i;return xe.forEach(function(r){e[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[n]=="function"&&(i=r.optionListeners[n].call(e[r.pluginName],t))}),i}};function Uo(o){var e=o.sortable,n=o.rootEl,t=o.name,i=o.targetEl,r=o.cloneEl,s=o.toEl,l=o.fromEl,u=o.oldIndex,a=o.newIndex,f=o.oldDraggableIndex,c=o.newDraggableIndex,E=o.originalEvent,D=o.putSortable,S=o.extraEventProperties;if(e=e||n&&n[Z],!!e){var C,G=e.options,K="on"+t.charAt(0).toUpperCase()+t.substr(1);window.CustomEvent&&!_e&&!Je?C=new CustomEvent(t,{bubbles:!0,cancelable:!0}):(C=document.createEvent("Event"),C.initEvent(t,!0,!0)),C.to=s||n,C.from=l||n,C.item=i||n,C.clone=r,C.oldIndex=u,C.newIndex=a,C.oldDraggableIndex=f,C.newDraggableIndex=c,C.originalEvent=E,C.pullMode=D?D.lastPutMode:void 0;var F=he(he({},S),et.getEventProperties(t,e));for(var L in F)C[L]=F[L];n&&n.dispatchEvent(C),G[K]&&G[K].call(e,C)}}var Ho=["evt"],Q=function(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=t.evt,r=Fo(t,Ho);et.pluginEvent.bind(_)(e,n,he({dragEl:d,parentEl:x,ghostEl:y,rootEl:A,nextEl:Ie,lastDownEl:lt,cloneEl:M,cloneHidden:Se,dragStarted:ze,putSortable:X,activeSortable:_.active,originalEvent:i,oldIndex:Fe,oldDraggableIndex:Ve,newIndex:ie,newDraggableIndex:Ee,hideGhostForTarget:pn,unhideGhostForTarget:hn,cloneNowHidden:function(){Se=!0},cloneNowShown:function(){Se=!1},dispatchSortableEvent:function(l){j({sortable:n,name:l,originalEvent:i})}},r))};function j(o){Uo(he({putSortable:X,cloneEl:M,targetEl:d,rootEl:A,oldIndex:Fe,oldDraggableIndex:Ve,newIndex:ie,newDraggableIndex:Ee},o))}var d,x,y,A,Ie,lt,M,Se,Fe,ie,Ve,Ee,tt,X,Ne=!1,ht=!1,mt=[],Te,ue,Ct,$t,jt,Kt,ze,Pe,je,Ke=!1,nt=!1,ut,H,Tt=[],xt=!1,gt=[],bt=typeof document<"u",ot=en,Qt=Je||_e?"cssFloat":"float",qo=bt&&!tn&&!en&&"draggable"in document.createElement("div"),dn=function(){if(bt){if(_e)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),cn=function(e,n){var t=b(e),i=parseInt(t.width)-parseInt(t.paddingLeft)-parseInt(t.paddingRight)-parseInt(t.borderLeftWidth)-parseInt(t.borderRightWidth),r=Ge(e,0,n),s=Ge(e,1,n),l=r&&b(r),u=s&&b(s),a=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+N(r).width,f=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+N(s).width;if(t.display==="flex")return t.flexDirection==="column"||t.flexDirection==="column-reverse"?"vertical":"horizontal";if(t.display==="grid")return t.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var c=l.float==="left"?"left":"right";return s&&(u.clear==="both"||u.clear===c)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||a>=i&&t[Qt]==="none"||s&&t[Qt]==="none"&&a+f>i)?"vertical":"horizontal"},Wo=function(e,n,t){var i=t?e.left:e.top,r=t?e.right:e.bottom,s=t?e.width:e.height,l=t?n.left:n.top,u=t?n.right:n.bottom,a=t?n.width:n.height;return i===l||r===u||i+s/2===l+a/2},Vo=function(e,n){var t;return mt.some(function(i){var r=i[Z].options.emptyInsertThreshold;if(!(!r||Gt(i))){var s=N(i),l=e>=s.left-r&&e<=s.right+r,u=n>=s.top-r&&n<=s.bottom+r;if(l&&u)return t=i}}),t},fn=function(e){function n(r,s){return function(l,u,a,f){var c=l.options.group.name&&u.options.group.name&&l.options.group.name===u.options.group.name;if(r==null&&(s||c))return!0;if(r==null||r===!1)return!1;if(s&&r==="clone")return r;if(typeof r=="function")return n(r(l,u,a,f),s)(l,u,a,f);var E=(s?l:u).options.group.name;return r===!0||typeof r=="string"&&r===E||r.join&&r.indexOf(E)>-1}}var t={},i=e.group;(!i||at(i)!="object")&&(i={name:i}),t.name=i.name,t.checkPull=n(i.pull,!0),t.checkPut=n(i.put),t.revertClone=i.revertClone,e.group=t},pn=function(){!dn&&y&&b(y,"display","none")},hn=function(){!dn&&y&&b(y,"display","")};bt&&!tn&&document.addEventListener("click",function(o){if(ht)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),ht=!1,!1},!0);var Oe=function(e){if(d){e=e.touches?e.touches[0]:e;var n=Vo(e.clientX,e.clientY);if(n){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);t.target=t.rootEl=n,t.preventDefault=void 0,t.stopPropagation=void 0,n[Z]._onDragOver(t)}}},jo=function(e){d&&d.parentNode[Z]._isOutsideThisEl(e.target)};function _(o,e){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=e=be({},e),o[Z]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return cn(o,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,l){s.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:_.supportPointer!==!1&&"PointerEvent"in window&&!qe,emptyInsertThreshold:5};et.initializePlugins(this,o,n);for(var t in n)!(t in e)&&(e[t]=n[t]);fn(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:qo,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?O(o,"pointerdown",this._onTapStart):(O(o,"mousedown",this._onTapStart),O(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(O(o,"dragover",this),O(o,"dragenter",this)),mt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),be(this,Xo())}_.prototype={constructor:_,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Pe=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,d):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,t=this.el,i=this.options,r=i.preventOnFilter,s=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,u=(l||e).target,a=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||u,f=i.filter;if(oi(t),!d&&!(/mousedown|pointerdown/.test(s)&&e.button!==0||i.disabled)&&!a.isContentEditable&&!(!this.nativeDraggable&&qe&&u&&u.tagName.toUpperCase()==="SELECT")&&(u=de(u,i.draggable,t,!1),!(u&&u.animated)&&lt!==u)){if(Fe=ae(u),Ve=ae(u,i.draggable),typeof f=="function"){if(f.call(this,e,u,this)){j({sortable:n,rootEl:a,name:"filter",targetEl:u,toEl:t,fromEl:t}),Q("filter",n,{evt:e}),r&&e.cancelable&&e.preventDefault();return}}else if(f&&(f=f.split(",").some(function(c){if(c=de(a,c.trim(),t,!1),c)return j({sortable:n,rootEl:c,name:"filter",targetEl:u,fromEl:t,toEl:t}),Q("filter",n,{evt:e}),!0}),f)){r&&e.cancelable&&e.preventDefault();return}i.handle&&!de(a,i.handle,t,!1)||this._prepareDragStart(e,l,u)}}},_prepareDragStart:function(e,n,t){var i=this,r=i.el,s=i.options,l=r.ownerDocument,u;if(t&&!d&&t.parentNode===r){var a=N(t);if(A=r,d=t,x=d.parentNode,Ie=d.nextSibling,lt=t,tt=s.group,_.dragged=d,Te={target:d,clientX:(n||e).clientX,clientY:(n||e).clientY},jt=Te.clientX-a.left,Kt=Te.clientY-a.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,d.style["will-change"]="all",u=function(){if(Q("delayEnded",i,{evt:e}),_.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Ht&&i.nativeDraggable&&(d.draggable=!0),i._triggerDragStart(e,n),j({sortable:i,name:"choose",originalEvent:e}),oe(d,s.chosenClass,!0)},s.ignore.split(",").forEach(function(f){rn(d,f.trim(),Ot)}),O(l,"dragover",Oe),O(l,"mousemove",Oe),O(l,"touchmove",Oe),O(l,"mouseup",i._onDrop),O(l,"touchend",i._onDrop),O(l,"touchcancel",i._onDrop),Ht&&this.nativeDraggable&&(this.options.touchStartThreshold=4,d.draggable=!0),Q("delayStart",this,{evt:e}),s.delay&&(!s.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Je||_e))){if(_.eventCanceled){this._onDrop();return}O(l,"mouseup",i._disableDelayedDrag),O(l,"touchend",i._disableDelayedDrag),O(l,"touchcancel",i._disableDelayedDrag),O(l,"mousemove",i._delayedDragTouchMoveHandler),O(l,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&O(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(u,s.delay)}else u()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){d&&Ot(d),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;$(e,"mouseup",this._disableDelayedDrag),$(e,"touchend",this._disableDelayedDrag),$(e,"touchcancel",this._disableDelayedDrag),$(e,"mousemove",this._delayedDragTouchMoveHandler),$(e,"touchmove",this._delayedDragTouchMoveHandler),$(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?O(document,"pointermove",this._onTouchMove):n?O(document,"touchmove",this._onTouchMove):O(document,"mousemove",this._onTouchMove):(O(d,"dragend",this),O(A,"dragstart",this._onDragStart));try{document.selection?dt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(Ne=!1,A&&d){Q("dragStarted",this,{evt:n}),this.nativeDraggable&&O(document,"dragover",jo);var t=this.options;!e&&oe(d,t.dragClass,!1),oe(d,t.ghostClass,!0),_.active=this,e&&this._appendGhost(),j({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(ue){this._lastX=ue.clientX,this._lastY=ue.clientY,pn();for(var e=document.elementFromPoint(ue.clientX,ue.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ue.clientX,ue.clientY),e!==n);)n=e;if(d.parentNode[Z]._isOutsideThisEl(e),n)do{if(n[Z]){var t=void 0;if(t=n[Z]._onDragOver({clientX:ue.clientX,clientY:ue.clientY,target:e,rootEl:n}),t&&!this.options.dragoverBubble)break}e=n}while(n=on(n));hn()}},_onTouchMove:function(e){if(Te){var n=this.options,t=n.fallbackTolerance,i=n.fallbackOffset,r=e.touches?e.touches[0]:e,s=y&&Be(y,!0),l=y&&s&&s.a,u=y&&s&&s.d,a=ot&&H&&Vt(H),f=(r.clientX-Te.clientX+i.x)/(l||1)+(a?a[0]-Tt[0]:0)/(l||1),c=(r.clientY-Te.clientY+i.y)/(u||1)+(a?a[1]-Tt[1]:0)/(u||1);if(!_.active&&!Ne){if(t&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<t)return;this._onDragStart(e,!0)}if(y){s?(s.e+=f-(Ct||0),s.f+=c-($t||0)):s={a:1,b:0,c:0,d:1,e:f,f:c};var E="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");b(y,"webkitTransform",E),b(y,"mozTransform",E),b(y,"msTransform",E),b(y,"transform",E),Ct=f,$t=c,ue=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!y){var e=this.options.fallbackOnBody?document.body:A,n=N(d,!0,ot,!0,e),t=this.options;if(ot){for(H=e;b(H,"position")==="static"&&b(H,"transform")==="none"&&H!==document;)H=H.parentNode;H!==document.body&&H!==document.documentElement?(H===document&&(H=pe()),n.top+=H.scrollTop,n.left+=H.scrollLeft):H=pe(),Tt=Vt(H)}y=d.cloneNode(!0),oe(y,t.ghostClass,!1),oe(y,t.fallbackClass,!0),oe(y,t.dragClass,!0),b(y,"transition",""),b(y,"transform",""),b(y,"box-sizing","border-box"),b(y,"margin",0),b(y,"top",n.top),b(y,"left",n.left),b(y,"width",n.width),b(y,"height",n.height),b(y,"opacity","0.8"),b(y,"position",ot?"absolute":"fixed"),b(y,"zIndex","100000"),b(y,"pointerEvents","none"),_.ghost=y,e.appendChild(y),b(y,"transform-origin",jt/parseInt(y.style.width)*100+"% "+Kt/parseInt(y.style.height)*100+"%")}},_onDragStart:function(e,n){var t=this,i=e.dataTransfer,r=t.options;if(Q("dragStart",this,{evt:e}),_.eventCanceled){this._onDrop();return}Q("setupClone",this),_.eventCanceled||(M=ln(d),M.removeAttribute("id"),M.draggable=!1,M.style["will-change"]="",this._hideClone(),oe(M,this.options.chosenClass,!1),_.clone=M),t.cloneId=dt(function(){Q("clone",t),!_.eventCanceled&&(t.options.removeCloneOnHide||A.insertBefore(M,d),t._hideClone(),j({sortable:t,name:"clone"}))}),!n&&oe(d,r.dragClass,!0),n?(ht=!0,t._loopId=setInterval(t._emulateDragOver,50)):($(document,"mouseup",t._onDrop),$(document,"touchend",t._onDrop),$(document,"touchcancel",t._onDrop),i&&(i.effectAllowed="move",r.setData&&r.setData.call(t,i,d)),O(document,"drop",t),b(d,"transform","translateZ(0)")),Ne=!0,t._dragStartId=dt(t._dragStarted.bind(t,n,e)),O(document,"selectstart",t),ze=!0,qe&&b(document.body,"user-select","none")},_onDragOver:function(e){var n=this.el,t=e.target,i,r,s,l=this.options,u=l.group,a=_.active,f=tt===u,c=l.sort,E=X||a,D,S=this,C=!1;if(xt)return;function G(v,m){Q(v,S,he({evt:e,isOwner:f,axis:D?"vertical":"horizontal",revert:s,dragRect:i,targetRect:r,canSort:c,fromSortable:E,target:t,completed:F,onMove:function(te,W){return it(A,n,d,i,te,N(te),e,W)},changed:L},m))}function K(){G("dragOverAnimationCapture"),S.captureAnimationState(),S!==E&&E.captureAnimationState()}function F(v){return G("dragOverCompleted",{insertion:v}),v&&(f?a._hideClone():a._showClone(S),S!==E&&(oe(d,X?X.options.ghostClass:a.options.ghostClass,!1),oe(d,l.ghostClass,!0)),X!==S&&S!==_.active?X=S:S===_.active&&X&&(X=null),E===S&&(S._ignoreWhileAnimating=t),S.animateAll(function(){G("dragOverAnimationComplete"),S._ignoreWhileAnimating=null}),S!==E&&(E.animateAll(),E._ignoreWhileAnimating=null)),(t===d&&!d.animated||t===n&&!t.animated)&&(Pe=null),!l.dragoverBubble&&!e.rootEl&&t!==document&&(d.parentNode[Z]._isOutsideThisEl(e.target),!v&&Oe(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),C=!0}function L(){ie=ae(d),Ee=ae(d,l.draggable),j({sortable:S,name:"change",toEl:n,newIndex:ie,newDraggableIndex:Ee,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),t=de(t,l.draggable,n,!0),G("dragOver"),_.eventCanceled)return C;if(d.contains(e.target)||t.animated&&t.animatingX&&t.animatingY||S._ignoreWhileAnimating===t)return F(!1);if(ht=!1,a&&!l.disabled&&(f?c||(s=x!==A):X===this||(this.lastPutMode=tt.checkPull(this,a,d,e))&&u.checkPut(this,a,d,e))){if(D=this._getDirection(e,t)==="vertical",i=N(d),G("dragOverValid"),_.eventCanceled)return C;if(s)return x=A,K(),this._hideClone(),G("revert"),_.eventCanceled||(Ie?A.insertBefore(d,Ie):A.appendChild(d)),F(!0);var z=Gt(n,l.draggable);if(!z||Jo(e,D,this)&&!z.animated){if(z===d)return F(!1);if(z&&n===e.target&&(t=z),t&&(r=N(t)),it(A,n,d,i,t,r,e,!!t)!==!1)return K(),z&&z.nextSibling?n.insertBefore(d,z.nextSibling):n.appendChild(d),x=n,L(),F(!0)}else if(z&&Zo(e,D,this)){var le=Ge(n,0,l,!0);if(le===d)return F(!1);if(t=le,r=N(t),it(A,n,d,i,t,r,e,!1)!==!1)return K(),n.insertBefore(d,le),x=n,L(),F(!0)}else if(t.parentNode===n){r=N(t);var J=0,ce,ke=d.parentNode!==n,U=!Wo(d.animated&&d.toRect||i,t.animated&&t.toRect||r,D),ye=D?"top":"left",ee=Wt(t,"top","top")||Wt(d,"top","top"),Ce=ee?ee.scrollTop:void 0;Pe!==t&&(ce=r[ye],Ke=!1,nt=!U&&l.invertSwap||ke),J=ei(e,t,r,D,U?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,nt,Pe===t);var se;if(J!==0){var me=ae(d);do me-=J,se=x.children[me];while(se&&(b(se,"display")==="none"||se===y))}if(J===0||se===t)return F(!1);Pe=t,je=J;var we=t.nextElementSibling,fe=!1;fe=J===1;var Ae=it(A,n,d,i,t,r,e,fe);if(Ae!==!1)return(Ae===1||Ae===-1)&&(fe=Ae===1),xt=!0,setTimeout(Qo,30),K(),fe&&!we?n.appendChild(d):t.parentNode.insertBefore(d,fe?we:t),ee&&an(ee,0,Ce-ee.scrollTop),x=d.parentNode,ce!==void 0&&!nt&&(ut=Math.abs(ce-N(t)[ye])),L(),F(!0)}if(n.contains(d))return F(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){$(document,"mousemove",this._onTouchMove),$(document,"touchmove",this._onTouchMove),$(document,"pointermove",this._onTouchMove),$(document,"dragover",Oe),$(document,"mousemove",Oe),$(document,"touchmove",Oe)},_offUpEvents:function(){var e=this.el.ownerDocument;$(e,"mouseup",this._onDrop),$(e,"touchend",this._onDrop),$(e,"pointerup",this._onDrop),$(e,"touchcancel",this._onDrop),$(document,"selectstart",this)},_onDrop:function(e){var n=this.el,t=this.options;if(ie=ae(d),Ee=ae(d,t.draggable),Q("drop",this,{evt:e}),x=d&&d.parentNode,ie=ae(d),Ee=ae(d,t.draggable),_.eventCanceled){this._nulling();return}Ne=!1,nt=!1,Ke=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Pt(this.cloneId),Pt(this._dragStartId),this.nativeDraggable&&($(document,"drop",this),$(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),qe&&b(document.body,"user-select",""),b(d,"transform",""),e&&(ze&&(e.cancelable&&e.preventDefault(),!t.dropBubble&&e.stopPropagation()),y&&y.parentNode&&y.parentNode.removeChild(y),(A===x||X&&X.lastPutMode!=="clone")&&M&&M.parentNode&&M.parentNode.removeChild(M),d&&(this.nativeDraggable&&$(d,"dragend",this),Ot(d),d.style["will-change"]="",ze&&!Ne&&oe(d,X?X.options.ghostClass:this.options.ghostClass,!1),oe(d,this.options.chosenClass,!1),j({sortable:this,name:"unchoose",toEl:x,newIndex:null,newDraggableIndex:null,originalEvent:e}),A!==x?(ie>=0&&(j({rootEl:x,name:"add",toEl:x,fromEl:A,originalEvent:e}),j({sortable:this,name:"remove",toEl:x,originalEvent:e}),j({rootEl:x,name:"sort",toEl:x,fromEl:A,originalEvent:e}),j({sortable:this,name:"sort",toEl:x,originalEvent:e})),X&&X.save()):ie!==Fe&&ie>=0&&(j({sortable:this,name:"update",toEl:x,originalEvent:e}),j({sortable:this,name:"sort",toEl:x,originalEvent:e})),_.active&&((ie==null||ie===-1)&&(ie=Fe,Ee=Ve),j({sortable:this,name:"end",toEl:x,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Q("nulling",this),A=d=x=y=Ie=M=lt=Se=Te=ue=ze=ie=Ee=Fe=Ve=Pe=je=X=tt=_.dragged=_.ghost=_.clone=_.active=null,gt.forEach(function(e){e.checked=!0}),gt.length=Ct=$t=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":d&&(this._onDragOver(e),Ko(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,t=this.el.children,i=0,r=t.length,s=this.options;i<r;i++)n=t[i],de(n,s.draggable,this.el,!1)&&e.push(n.getAttribute(s.dataIdAttr)||ni(n));return e},sort:function(e,n){var t={},i=this.el;this.toArray().forEach(function(r,s){var l=i.children[s];de(l,this.options.draggable,i,!1)&&(t[r]=l)},this),n&&this.captureAnimationState(),e.forEach(function(r){t[r]&&(i.removeChild(t[r]),i.appendChild(t[r]))}),n&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,n){return de(e,n||this.options.draggable,this.el,!1)},option:function(e,n){var t=this.options;if(n===void 0)return t[e];var i=et.modifyOption(this,e,n);typeof i<"u"?t[e]=i:t[e]=n,e==="group"&&fn(t)},destroy:function(){Q("destroy",this);var e=this.el;e[Z]=null,$(e,"mousedown",this._onTapStart),$(e,"touchstart",this._onTapStart),$(e,"pointerdown",this._onTapStart),this.nativeDraggable&&($(e,"dragover",this),$(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),mt.splice(mt.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Se){if(Q("hideClone",this),_.eventCanceled)return;b(M,"display","none"),this.options.removeCloneOnHide&&M.parentNode&&M.parentNode.removeChild(M),Se=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Se){if(Q("showClone",this),_.eventCanceled)return;d.parentNode==A&&!this.options.group.revertClone?A.insertBefore(M,d):Ie?A.insertBefore(M,Ie):A.appendChild(M),this.options.group.revertClone&&this.animate(d,M),b(M,"display",""),Se=!1}}};function Ko(o){o.dataTransfer&&(o.dataTransfer.dropEffect="move"),o.cancelable&&o.preventDefault()}function it(o,e,n,t,i,r,s,l){var u,a=o[Z],f=a.options.onMove,c;return window.CustomEvent&&!_e&&!Je?u=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent("move",!0,!0)),u.to=e,u.from=o,u.dragged=n,u.draggedRect=t,u.related=i||e,u.relatedRect=r||N(e),u.willInsertAfter=l,u.originalEvent=s,o.dispatchEvent(u),f&&(c=f.call(a,u,s)),c}function Ot(o){o.draggable=!1}function Qo(){xt=!1}function Zo(o,e,n){var t=N(Ge(n.el,0,n.options,!0)),i=un(n.el,n.options,y),r=10;return e?o.clientX<i.left-r||o.clientY<t.top&&o.clientX<t.right:o.clientY<i.top-r||o.clientY<t.bottom&&o.clientX<t.left}function Jo(o,e,n){var t=N(Gt(n.el,n.options.draggable)),i=un(n.el,n.options,y),r=10;return e?o.clientX>i.right+r||o.clientY>t.bottom&&o.clientX>t.left:o.clientY>i.bottom+r||o.clientX>t.right&&o.clientY>t.top}function ei(o,e,n,t,i,r,s,l){var u=t?o.clientY:o.clientX,a=t?n.height:n.width,f=t?n.top:n.left,c=t?n.bottom:n.right,E=!1;if(!s){if(l&&ut<a*i){if(!Ke&&(je===1?u>f+a*r/2:u<c-a*r/2)&&(Ke=!0),Ke)E=!0;else if(je===1?u<f+ut:u>c-ut)return-je}else if(u>f+a*(1-i)/2&&u<c-a*(1-i)/2)return ti(e)}return E=E||s,E&&(u<f+a*r/2||u>c-a*r/2)?u>f+a/2?1:-1:0}function ti(o){return ae(d)<ae(o)?1:-1}function ni(o){for(var e=o.tagName+o.className+o.src+o.href+o.textContent,n=e.length,t=0;n--;)t+=e.charCodeAt(n);return t.toString(36)}function oi(o){gt.length=0;for(var e=o.getElementsByTagName("input"),n=e.length;n--;){var t=e[n];t.checked&&gt.push(t)}}function dt(o){return setTimeout(o,0)}function Pt(o){return clearTimeout(o)}bt&&O(document,"touchmove",function(o){(_.active||Ne)&&o.cancelable&&o.preventDefault()});_.utils={on:O,off:$,css:b,find:rn,is:function(e,n){return!!de(e,n,e,!1)},extend:Go,throttle:sn,closest:de,toggleClass:oe,clone:ln,index:ae,nextTick:dt,cancelNextTick:Pt,detectDirection:cn,getChild:Ge,expando:Z};_.get=function(o){return o[Z]};_.mount=function(){for(var o=arguments.length,e=new Array(o),n=0;n<o;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(_.utils=he(he({},_.utils),t.utils)),et.mount(t)})};_.create=function(o,e){return new _(o,e)};_.version=Ro;var P=[],Ue,Nt,Ft=!1,It,At,vt,He;function ii(){function o(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return o.prototype={dragStarted:function(n){var t=n.originalEvent;this.sortable.nativeDraggable?O(document,"dragover",this._handleAutoScroll):this.options.supportPointer?O(document,"pointermove",this._handleFallbackAutoScroll):t.touches?O(document,"touchmove",this._handleFallbackAutoScroll):O(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var t=n.originalEvent;!this.options.dragOverBubble&&!t.rootEl&&this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?$(document,"dragover",this._handleAutoScroll):($(document,"pointermove",this._handleFallbackAutoScroll),$(document,"touchmove",this._handleFallbackAutoScroll),$(document,"mousemove",this._handleFallbackAutoScroll)),Zt(),ct(),Lo()},nulling:function(){vt=Nt=Ue=Ft=He=It=At=null,P.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,t){var i=this,r=(n.touches?n.touches[0]:n).clientX,s=(n.touches?n.touches[0]:n).clientY,l=document.elementFromPoint(r,s);if(vt=n,t||this.options.forceAutoScrollFallback||Je||_e||qe){Mt(n,this.options,l,t);var u=De(l,!0);Ft&&(!He||r!==It||s!==At)&&(He&&Zt(),He=setInterval(function(){var a=De(document.elementFromPoint(r,s),!0);a!==u&&(u=a,ct()),Mt(n,i.options,a,t)},10),It=r,At=s)}else{if(!this.options.bubbleScroll||De(l,!0)===pe()){ct();return}Mt(n,this.options,De(l,!1),!1)}}},be(o,{pluginName:"scroll",initializeByDefault:!0})}function ct(){P.forEach(function(o){clearInterval(o.pid)}),P=[]}function Zt(){clearInterval(He)}var Mt=sn(function(o,e,n,t){if(e.scroll){var i=(o.touches?o.touches[0]:o).clientX,r=(o.touches?o.touches[0]:o).clientY,s=e.scrollSensitivity,l=e.scrollSpeed,u=pe(),a=!1,f;Nt!==n&&(Nt=n,ct(),Ue=e.scroll,f=e.scrollFn,Ue===!0&&(Ue=De(n,!0)));var c=0,E=Ue;do{var D=E,S=N(D),C=S.top,G=S.bottom,K=S.left,F=S.right,L=S.width,z=S.height,le=void 0,J=void 0,ce=D.scrollWidth,ke=D.scrollHeight,U=b(D),ye=D.scrollLeft,ee=D.scrollTop;D===u?(le=L<ce&&(U.overflowX==="auto"||U.overflowX==="scroll"||U.overflowX==="visible"),J=z<ke&&(U.overflowY==="auto"||U.overflowY==="scroll"||U.overflowY==="visible")):(le=L<ce&&(U.overflowX==="auto"||U.overflowX==="scroll"),J=z<ke&&(U.overflowY==="auto"||U.overflowY==="scroll"));var Ce=le&&(Math.abs(F-i)<=s&&ye+L<ce)-(Math.abs(K-i)<=s&&!!ye),se=J&&(Math.abs(G-r)<=s&&ee+z<ke)-(Math.abs(C-r)<=s&&!!ee);if(!P[c])for(var me=0;me<=c;me++)P[me]||(P[me]={});(P[c].vx!=Ce||P[c].vy!=se||P[c].el!==D)&&(P[c].el=D,P[c].vx=Ce,P[c].vy=se,clearInterval(P[c].pid),(Ce!=0||se!=0)&&(a=!0,P[c].pid=setInterval((function(){t&&this.layer===0&&_.active._onTouchMove(vt);var we=P[this.layer].vy?P[this.layer].vy*l:0,fe=P[this.layer].vx?P[this.layer].vx*l:0;typeof f=="function"&&f.call(_.dragged.parentNode[Z],fe,we,o,vt,P[this.layer].el)!=="continue"||an(P[this.layer].el,fe,we)}).bind({layer:c}),24))),c++}while(e.bubbleScroll&&E!==u&&(E=De(E,!1)));Ft=a}},30),mn=function(e){var n=e.originalEvent,t=e.putSortable,i=e.dragEl,r=e.activeSortable,s=e.dispatchSortableEvent,l=e.hideGhostForTarget,u=e.unhideGhostForTarget;if(n){var a=t||r;l();var f=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,c=document.elementFromPoint(f.clientX,f.clientY);u(),a&&!a.el.contains(c)&&(s("spill"),this.onSpill({dragEl:i,putSortable:t}))}};function Lt(){}Lt.prototype={startIndex:null,dragStart:function(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function(e){var n=e.dragEl,t=e.putSortable;this.sortable.captureAnimationState(),t&&t.captureAnimationState();var i=Ge(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(n,i):this.sortable.el.appendChild(n),this.sortable.animateAll(),t&&t.animateAll()},drop:mn};be(Lt,{pluginName:"revertOnSpill"});function Xt(){}Xt.prototype={onSpill:function(e){var n=e.dragEl,t=e.putSortable,i=t||this.sortable;i.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),i.animateAll()},drop:mn};be(Xt,{pluginName:"removeOnSpill"});_.mount(new ii);_.mount(Xt,Lt);function ri(o,e,n={}){let t;const{document:i=En,...r}=n,s={onUpdate:f=>{gn(e,f.oldIndex,f.newIndex)}},l=()=>{const f=i==null?void 0:i.querySelector(o);!f||t!==void 0||(t=new _(f,{...s,...r}))},u=()=>{t==null||t.destroy(),t=void 0},a=(f,c)=>{if(c!==void 0)t==null||t.option(f,c);else return t==null?void 0:t.option(f)};return yn(l),wn(u),{stop:u,start:l,option:a}}function gn(o,e,n){const t=Ye(o),i=t?[...Yt(o)]:Yt(o);if(n>=0&&n<i.length){const r=i.splice(e,1)[0];st(()=>{i.splice(n,0,r),t&&(o.value=i)})}}const si={key:2,class:"header"},ai={class:"columns is-gapless is-mobile is-centered"},li={class:"column is-three-quarters-mobile is-one-third-tablet is-one-quarter-desktop is-one-quarter-widescreen is-one-quarter-fullhd"},ui={key:1,class:"has-text-centered"},di={class:"columns"},ci={key:0,class:"column"},fi=["title"],pi={key:1,class:"column"},hi=["title"],mi={key:3},gi={class:"accounts"},vi={class:"tfa-container"},bi={key:0,class:"tfa-cell tfa-checkbox"},_i={class:"field"},yi=["id","value","name"],wi=["for","onKeypress"],Ei=["onClick","onKeyup"],Si={class:"tfa-text has-ellipsis"},Di=["src"],ki=["src"],Ci={class:"has-ellipsis is-family-primary is-size-6 is-size-7-mobile has-text-grey"},$i={class:"has-text-right"},Ti={key:0},Oi={key:0,class:"has-nowrap has-text-grey has-text-centered is-size-5"},Ii=["onClick","onKeyup","title"],Ai={key:1},Mi=["onClick","title"],xi={class:"has-text-right"},Pi=["onClick"],Ni={key:0,class:"tfa-cell tfa-edit has-text-grey"},Fi={key:0,class:"drag-handle tfa-cell tfa-dots has-text-grey"},Yi={__name:"Accounts",setup(o){const e=Jt("2fauth"),n=Bt(),t=Sn(),i=Rt(),r=Rn(),s=Dn(),{copy:l,copied:u}=kn({legacy:!0}),a=Cn(),f=$n(),c=ne(!1),E=ne(!1),D=ne(!1),S=ne(!1);ne(!1);const C=ne(!1),G=ne(null),K=ne(null),F=ne(null),L=ne({otp_type:"",account:"",service:"",icon:""}),z=ne([]),le=ne([]);yt(c,v=>{var m;v==!1&&((m=F.value)==null||m.clearOTP())}),yt(()=>a.items,v=>{r.inManagementMode&&ce()}),yt(()=>r.inManagementMode,v=>{v&&ce()});const J=Tn(()=>!a.isEmpty&&!D.value&&!S.value);On(async()=>{i.preferences.getOtpOnRequest?a.fetch().then(()=>{a.backendWasNewer&&t.info({text:wt("commons.data_refreshed_to_reflect_server_changes"),duration:1e4})}):we(),f.fetch()});function ce(){ri("#dv",a.filtered,{animation:200,handle:".drag-handle",onUpdate:v=>{const m=a.filtered[v.oldIndex].id,B=a.items.findIndex(te=>te.id==m);gn(a.items,B,v.newIndex),st(()=>{a.saveOrder()})}})}function ke(){a.fetch(),a.selectNone(),S.value=!1,t.success({text:wt("twofaccounts.accounts_moved")})}function U(v){L.value.otp_type=v.otp_type,L.value.service=v.service,L.value.account=v.account,L.value.icon=v.icon,st().then(()=>{c.value=!0,F.value.show(v.id)})}function ye(v){r.inManagementMode?a.select(v.id):!i.preferences.getOtpOnRequest&&v.otp_type.includes("totp")?ee(v.otp.password):U(v)}function ee(v){l(v),u&&(i.preferences.kickUserAfter==-1&&i.logout({kicked:!0}),i.preferences.clearSearchOnCopy&&(a.filter=""),i.preferences.viewDefaultGroupOnCopy&&(i.preferences.activeGroup=i.preferences.defaultGroup==-1?i.preferences.activeGroup:i.preferences.defaultGroup),t.success({text:wt("commons.copied_to_clipboard")}))}async function Ce(v){rt.getOtpById(v.id).then(m=>{let B=m.data;if(ee(B.password),B.otp_type=="hotp"){let te=accounts.value.find(W=>W.id==v.id);te!=null&&(te.counter=B.counter)}})}function se(v,m){le.value.filter(B=>B.props.period==v||v==null).forEach(B=>{B.turnOn(m)})}function me(v){le.value.filter(m=>m.props.period==v||v==null).forEach(m=>{m.turnOff()})}async function we(v){C.value=!0,me(v);let m;v==null?(G.value=-1,m=rt.getAll(!0)):(G.value=v,m=rt.getByIds(a.accountIdsWithPeriod(v).join(","),!0)),m.then(B=>{let te=0;B.data.forEach(W=>{if(W.otp_type==="totp"){const Le=a.items.findIndex(_t=>_t.id===W.id);a.items[Le]==null?a.items.push(W):a.items[Le].otp=W.otp,te=W.otp.generated_at}}),z.value.forEach(W=>{(W.props.period==v||v==null)&&st().then(()=>{W.startLoop(te)})})}).finally(()=>{C.value=!1,G.value=null})}async function fe(){await a.deleteSelected(),a.isEmpty&&(r.inManagementMode=!1,n.push({name:"start"}))}function Ae(){r.inManagementMode=!1,a.selectNone()}return(v,m)=>{const B=re("FontAwesomeIcon"),te=re("Modal"),W=re("font-awesome-icon"),Le=re("RouterLink"),_t=re("VueFooter");return w(),ge(p(Ze),null,{default:R(({mode:Me})=>[g("div",null,[p(D)?(w(),ge(Hn,{key:0,showGroupSwitch:p(D),"onUpdate:showGroupSwitch":m[0]||(m[0]=h=>Ye(D)?D.value=h:null),groups:p(f).items,"onUpdate:groups":m[1]||(m[1]=h=>p(f).items=h)},null,8,["showGroupSwitch","groups"])):Y("",!0),p(S)?(w(),ge(oo,{key:1,showDestinationGroupSelector:p(S),"onUpdate:showDestinationGroupSelector":m[2]||(m[2]=h=>Ye(S)?S.value=h:null),selectedAccountsIds:p(a).selectedIds,"onUpdate:selectedAccountsIds":m[3]||(m[3]=h=>p(a).selectedIds=h),groups:p(f).items,onAccountsMoved:ke},null,8,["showDestinationGroupSelector","selectedAccountsIds","groups"])):Y("",!0),p(J)||p(D)?(w(),k("div",si,[g("div",ai,[g("div",li,[T(Fn,{keyword:p(a).filter,"onUpdate:keyword":m[4]||(m[4]=h=>p(a).filter=h)},null,8,["keyword"]),p(r).inManagementMode?(w(),ge(po,{key:0,selectedCount:p(a).selectedCount,onClearSelected:m[5]||(m[5]=h=>p(a).selectNone()),onSelectAll:m[6]||(m[6]=h=>p(a).selectAll()),onSortAsc:m[7]||(m[7]=h=>p(a).sortAsc()),onSortDesc:m[8]||(m[8]=h=>p(a).sortDesc())},null,8,["selectedCount"])):(w(),k("div",ui,[g("div",di,[p(D)?(w(),k("div",ci,[g("button",{type:"button",id:"btnHideGroupSwitch",title:v.$t("groups.hide_group_selector"),tabindex:"1",class:q(["button is-text is-like-text",{"has-text-grey":Me!="dark"}]),onClick:m[9]||(m[9]=$e(h=>D.value=!p(D),["stop"]))},I(v.$t("groups.select_accounts_to_show")),11,fi)])):(w(),k("div",pi,[g("button",{type:"button",id:"btnShowGroupSwitch",title:v.$t("groups.show_group_selector"),tabindex:"1",class:q(["button is-text is-like-text",{"has-text-grey":Me!="dark"}]),onClick:m[10]||(m[10]=$e(h=>D.value=!p(D),["stop"]))},[Re(I(p(f).current)+" ("+I(p(a).filteredCount)+")  ",1),T(B,{icon:["fas","caret-down"]})],10,hi)]))])]))])])])):Y("",!0),T(te,{modelValue:p(E),"onUpdate:modelValue":m[13]||(m[13]=h=>Ye(E)?E.value=h:null),isFullHeight:!0},{default:R(()=>[T(xo,{onExportTwofauthFormat:m[11]||(m[11]=h=>p(a).export()),onExportOtpauthFormat:m[12]||(m[12]=h=>p(a).export("otpauth"))})]),_:1},8,["modelValue"]),T(te,{modelValue:p(c),"onUpdate:modelValue":m[16]||(m[16]=h=>Ye(c)?c.value=h:null)},{default:R(()=>[T(xn,In({ref_key:"otpDisplay",ref:F},p(L),{onPleaseCloseMe:m[14]||(m[14]=h=>c.value=!1),onPleaseClearSearch:m[15]||(m[15]=h=>p(a).filter="")}),null,16)]),_:1},8,["modelValue"]),p(i).preferences.getOtpOnRequest?Y("",!0):(w(),k("span",mi,[(w(!0),k(Qe,null,ft(p(a).periods,h=>(w(),ge(Pn,{key:h.period,autostart:!1,period:h.period,generated_at:h.generated_at,onLoopEnded:V=>we(h.period),onLoopStarted:V=>se(h.period,V),onSteppedUp:V=>se(h.period,V),ref_for:!0,ref_key:"looperRefs",ref:z},null,8,["period","generated_at","onLoopEnded","onLoopStarted","onSteppedUp"]))),128))])),p(J)?(w(),k("div",{key:4,class:q(["container",p(r).inManagementMode?"is-edit-mode":""])},[g("div",gi,[g("span",{id:"dv",class:q(["columns is-multiline",{"is-centered":p(i).preferences.displayMode==="grid"}])},[(w(!0),k(Qe,null,ft(p(a).filtered,h=>(w(),k("div",{class:q([[p(i).preferences.displayMode==="grid"?"tfa-grid":"tfa-list"],"column is-narrow"]),key:h.id},[g("div",vi,[T(Xe,{name:"slideCheckbox"},{default:R(()=>[p(r).inManagementMode?(w(),k("div",bi,[g("div",_i,[Et(g("input",{class:q(["is-checkradio is-small",Me=="dark"?"is-white":"is-info"]),id:"ckb_"+h.id,value:h.id,type:"checkbox",name:"ckb_"+h.id,"onUpdate:modelValue":m[17]||(m[17]=V=>p(a).selectedIds=V)},null,10,yi),[[An,p(a).selectedIds]]),g("label",{tabindex:"0",for:"ckb_"+h.id,onKeypress:St($e(V=>p(a).select(h.id),["prevent"]),["space"])},null,40,wi)])])):Y("",!0)]),_:2},1024),g("div",{tabindex:"0",class:"tfa-cell tfa-content is-size-3 is-size-4-mobile",onClick:[$e(V=>ye(h),["exact"]),$e(V=>Ce(h),["ctrl"])],onKeyup:St(V=>ye(h),["enter"]),role:"button"},[g("div",Si,[h.icon&&p(i).preferences.showAccountsIcons?(w(),k("img",{key:0,role:"presentation",class:"tfa-icon",src:p(e).config.subdirectory+"/storage/icons/"+h.icon,alt:""},null,8,Di)):h.icon==null&&p(i).preferences.showAccountsIcons?(w(),k("img",{key:1,role:"presentation",class:"tfa-icon",src:p(e).config.subdirectory+"/storage/noicon.svg",alt:""},null,8,ki)):Y("",!0),Re(" "+I(h.service?h.service:v.$t("twofaccounts.no_service")),1),p(s).useEncryption&&h.account===v.$t("errors.indecipherable")?(w(),ge(B,{key:2,class:"has-text-danger is-size-5 ml-2",icon:["fas","exclamation-circle"]})):Y("",!0),g("span",Ci,I(h.account),1)])],40,Ei),T(Xe,{name:"popLater"},{default:R(()=>[Et(g("div",$i,[h.otp!=null?(w(),k("span",Ti,[p(C)==!0&&(p(G)==-1||p(G)==h.period)?(w(),k("span",Oi,[T(B,{icon:["fas","circle-notch"],spin:""})])):(w(),k("span",{key:1,class:"always-on-otp is-clickable has-nowrap has-text-grey is-size-5 ml-4",onClick:V=>ee(h.otp.password),onKeyup:St(V=>ee(h.otp.password),["enter"]),title:v.$t("commons.copy_to_clipboard")},I(p(Mn)(h.otp.password,p(i).preferences.showOtpAsDot&&p(i).preferences.revealDottedOTP&&p(K)==h.id)),41,Ii)),h.otp_type.includes("totp")?(w(),ge(Nn,{key:2,class:q("condensed"),ref_for:!0,ref_key:"dotsRefs",ref:le,period:h.period},null,8,["period"])):Y("",!0)])):(w(),k("span",Ai,[g("button",{type:"button",class:q(["button tag",Me=="dark"?"is-dark":"is-white"]),onClick:V=>U(h),title:v.$t("twofaccounts.import.import_this_account")},I(v.$t("commons.generate")),11,Mi)]))],512),[[zt,p(i).preferences.getOtpOnRequest==!1&&!p(r).inManagementMode]])]),_:2},1024),p(i).preferences.showOtpAsDot&&p(i).preferences.revealDottedOTP?(w(),ge(Xe,{key:0,name:"popLater"},{default:R(()=>[Et(g("div",xi,[p(K)==h.id?(w(),k("button",{key:0,type:"button",class:"pr-0 button is-ghost has-text-grey-dark",onClick:m[18]||(m[18]=$e(V=>K.value=null,["stop"]))},[T(W,{icon:["fas","eye"]})])):(w(),k("button",{key:1,type:"button",class:"pr-0 button is-ghost has-text-grey-dark",onClick:$e(V=>K.value=h.id,["stop"])},[T(W,{icon:["fas","eye-slash"]})],8,Pi))],512),[[zt,p(i).preferences.getOtpOnRequest==!1&&!p(r).inManagementMode]])]),_:2},1024)):Y("",!0),T(Xe,{name:"fadeInOut"},{default:R(()=>[p(r).inManagementMode?(w(),k("div",Ni,[T(Le,{to:{name:"editAccount",params:{twofaccountId:h.id}},class:q(["tag is-rounded mr-1",Me=="dark"?"is-dark":"is-white"])},{default:R(()=>[Re(I(v.$t("commons.edit")),1)]),_:2},1032,["to","class"]),T(Le,{to:{name:"showQRcode",params:{twofaccountId:h.id}},class:q(["tag is-rounded",Me=="dark"?"is-dark":"is-white"]),title:v.$t("twofaccounts.show_qrcode")},{default:R(()=>[T(B,{icon:["fas","qrcode"]})]),_:2},1032,["to","class","title"])])):Y("",!0)]),_:2},1024),T(Xe,{name:"fadeInOut"},{default:R(()=>[p(r).inManagementMode?(w(),k("div",Fi,[T(B,{icon:["fas","bars"]})])):Y("",!0)]),_:1})])],2))),128))],2)]),T(_t,{showButtons:!0,internalFooterType:p(r).inManagementMode&&!p(S)?"doneButton":"navLinks",onDoneButtonClicked:Ae},{default:R(()=>[T(So,{inManagementMode:p(r).inManagementMode,"onUpdate:inManagementMode":m[19]||(m[19]=h=>p(r).inManagementMode=h),areDisabled:p(a).hasNoneSelected,onMoveButtonClicked:m[20]||(m[20]=h=>S.value=!0),onDeleteButtonClicked:fe,onExportButtonClicked:m[21]||(m[21]=h=>E.value=!0)},null,8,["inManagementMode","areDisabled"])]),_:1},8,["internalFooterType"])],2)):Y("",!0)])]),_:1})}}};export{Yi as default};
//# sourceMappingURL=Accounts-BErdy-fg.js.map