1 line
16 KiB
JavaScript
Vendored
1 line
16 KiB
JavaScript
Vendored
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{13:function(t,e,s){"use strict";var a=s(65),i=s(64),n=s(66),l=s(74),r=s(0),o=Object(r.a)({},(function(){var t=this.$createElement,e=this._self._c||t;return e("svg",{staticClass:"bi bi-clipboard",attrs:{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"}}),this._v(" "),e("path",{attrs:{"fill-rule":"evenodd",d:"M9.5 1h-3a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"}})])}),[],!1,null,null,null).exports,u=Object(r.a)({},(function(){var t=this.$createElement,e=this._self._c||t;return e("svg",{staticClass:"bi bi-key",attrs:{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M0 8a4 4 0 0 1 7.465-2H14a.5.5 0 0 1 .354.146l1.5 1.5a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0L13 9.207l-.646.647a.5.5 0 0 1-.708 0L11 9.207l-.646.647a.5.5 0 0 1-.708 0L9 9.207l-.646.647A.5.5 0 0 1 8 10h-.535A4 4 0 0 1 0 8zm4-3a3 3 0 1 0 2.712 4.285A.5.5 0 0 1 7.163 9h.63l.853-.854a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .708 0l.646.647.793-.793-1-1h-6.63a.5.5 0 0 1-.451-.285A3 3 0 0 0 4 5z"}}),this._v(" "),e("path",{attrs:{d:"M4 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"}})])}),[],!1,null,null,null).exports,c={props:{id:{type:String,required:!1},label:{type:String,required:!0},type:{type:String,default:function(){return"text"}},required:{type:Boolean,default:function(){return!1}},errors:{type:Array},helperText:{type:String},placeholder:{type:String},value:{required:!1,default:""},allowCopy:{required:!1,default:!1,type:Boolean},allowRandomString:{required:!1,default:!1,type:Boolean},loading:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1}},components:{FormGroup:a.a,Label:i.a,ErrorText:n.a,HelperText:l.a,IconClipboard:o,IconKey:u},data:function(){return{defaultClasses:"w-full border-medium-emphasis text-body h-10 px-2 border rounded bg-surface-1 focus:outline-none focus:border-primary",copied:!1}},watch:{copied:function(){var t=this;this.copied&&setTimeout((function(){t.copied=!1}),1250)}},methods:{updateValue:function(t){this.$emit("input",t)},copy:function(){this.copied=!0,this.$copyText(this.value)},generateString:function(){this.$emit("input",this.randomString())}},computed:{copyText:function(){return this.copied?this.__("Copied to clipboard"):this.__("Copy")}}},d=Object(r.a)(c,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("FormGroup",{staticClass:"relative max-w-lg"},[s("Label",{attrs:{errors:t.errors,forId:t.id}},[t._v(t._s(t.label))]),t._v(" "),t.allowCopy?s("button",{staticClass:"flex items-center right-0 absolute text-xs text-medium-emphasis",attrs:{type:"button"},on:{click:t.copy}},[s("IconClipboard",{staticClass:"mr-2"}),t._v("\n "+t._s(t.copyText)+"\n ")],1):t._e(),t._v(" "),t.allowRandomString?s("button",{staticClass:"flex items-center right-0 absolute text-xs text-medium-emphasis",attrs:{type:"button"},on:{click:t.generateString}},[s("IconKey",{staticClass:"mr-2"}),t._v("\n "+t._s(t.__("Generate"))+"\n ")],1):t._e(),t._v(" "),s("input",{class:[t.defaultClasses,t.disabled||t.loading?"opacity-50":"",t.loading?"cursor-wait":""],attrs:{id:t.id,type:t.type,required:t.required,disabled:t.loading||t.disabled,placeholder:t.placeholder},domProps:{value:t.value},on:{input:function(e){return t.updateValue(e.target.value)}}}),t._v(" "),t.errors?s("ErrorText",[t._v(t._s(t.errors[0]))]):t._e(),t._v(" "),t.helperText&&!t.errors?s("HelperText",[t._v(t._s(t.helperText))]):t._e()],1)}),[],!1,null,null,null);e.a=d.exports},14:function(t,e,s){"use strict";var a={props:{justify:{type:String,default:"justify-start"}}},i=s(0),n=Object(i.a)(a,(function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"flex items-center space-x-2",class:[this.justify]},[this._t("default")],2)}),[],!1,null,null,null);e.a=n.exports},18:function(t,e,s){"use strict";var a=s(0),i=Object(a.a)({},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("form",{staticClass:"space-y-4",on:{submit:function(e){return e.preventDefault(),t.$emit("submit")}}},[t._t("default")],2)}),[],!1,null,null,null);e.a=i.exports},39:function(t,e,s){"use strict";var a=s(1),i=s(47),n=s(48),l=s(49),r=s(0),o=Object(r.a)({},(function(){var t=this.$createElement,e=this._self._c||t;return e("svg",{staticClass:"bi bi-moon",attrs:{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M14.53 10.53a7 7 0 0 1-9.058-9.058A7.003 7.003 0 0 0 8 15a7.002 7.002 0 0 0 6.53-4.47z"}})])}),[],!1,null,null,null).exports,u=Object(r.a)({},(function(){var t=this.$createElement,e=this._self._c||t;return e("svg",{staticClass:"bi bi-sun",attrs:{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M3.5 8a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0z"}}),this._v(" "),e("path",{attrs:{"fill-rule":"evenodd",d:"M8.202.28a.25.25 0 0 0-.404 0l-.91 1.255a.25.25 0 0 1-.334.067L5.232.79a.25.25 0 0 0-.374.155l-.36 1.508a.25.25 0 0 1-.282.19l-1.532-.245a.25.25 0 0 0-.286.286l.244 1.532a.25.25 0 0 1-.189.282l-1.509.36a.25.25 0 0 0-.154.374l.812 1.322a.25.25 0 0 1-.067.333l-1.256.91a.25.25 0 0 0 0 .405l1.256.91a.25.25 0 0 1 .067.334L.79 10.768a.25.25 0 0 0 .154.374l1.51.36a.25.25 0 0 1 .188.282l-.244 1.532a.25.25 0 0 0 .286.286l1.532-.244a.25.25 0 0 1 .282.189l.36 1.508a.25.25 0 0 0 .374.155l1.322-.812a.25.25 0 0 1 .333.067l.91 1.256a.25.25 0 0 0 .405 0l.91-1.256a.25.25 0 0 1 .334-.067l1.322.812a.25.25 0 0 0 .374-.155l.36-1.508a.25.25 0 0 1 .282-.19l1.532.245a.25.25 0 0 0 .286-.286l-.244-1.532a.25.25 0 0 1 .189-.282l1.508-.36a.25.25 0 0 0 .155-.374l-.812-1.322a.25.25 0 0 1 .067-.333l1.256-.91a.25.25 0 0 0 0-.405l-1.256-.91a.25.25 0 0 1-.067-.334l.812-1.322a.25.25 0 0 0-.155-.374l-1.508-.36a.25.25 0 0 1-.19-.282l.245-1.532a.25.25 0 0 0-.286-.286l-1.532.244a.25.25 0 0 1-.282-.189l-.36-1.508a.25.25 0 0 0-.374-.155l-1.322.812a.25.25 0 0 1-.333-.067L8.203.28zM8 2.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11z"}})])}),[],!1,null,null,null).exports,c=Object(r.a)({},(function(){var t=this.$createElement,e=this._self._c||t;return e("svg",{staticClass:"bi bi-search",attrs:{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M10.442 10.442a1 1 0 0 1 1.415 0l3.85 3.85a1 1 0 0 1-1.414 1.415l-3.85-3.85a1 1 0 0 1 0-1.415z"}}),this._v(" "),e("path",{attrs:{"fill-rule":"evenodd",d:"M6.5 12a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11zM13 6.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0z"}})])}),[],!1,null,null,null).exports,d=s(50),p={components:{Container:a.a,Dropdown:i.a,DropdownList:n.a,DropdownListItem:l.a,IconMoon:o,IconSearch:c,IconSun:u,IconButton:d.a},data:function(){return{themeMode:this.$page.props.auth.user.theme}},mounted:function(){this.setDarkMode()},methods:{toggleTheme:function(){var t=this;window.axios.post("/profile/toggle-theme").then((function(e){t.themeMode=e.data,t.setDarkMode()}))},setDarkMode:function(){"auto"===this.themeMode?this.checkDarkMode()?document.documentElement.classList.add("theme--dark"):document.documentElement.classList.remove("theme--dark"):"dark"===this.themeMode?document.documentElement.classList.add("theme--dark"):document.documentElement.classList.remove("theme--dark")},checkDarkMode:function(){return window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches},triggerSearch:function(){window.eventBus.$emit("openSearch")}}},h=Object(r.a)(p,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("header",{staticClass:"sticky top-0 border-b border-low-emphasis bg-surface-1 z-30"},[s("Container",[s("div",{staticClass:"flex flex-col"},[s("nav",{staticClass:"flex flex-col items-center justify-between py-4 space-y-4 md:space-y-0 md:flex-row"},[t._t("breadcrumbs"),t._v(" "),s("ul",{staticClass:"flex items-center space-x-4"},[s("li",{attrs:{"aria-label":t.__("Search"),"data-balloon-blunt":"","data-balloon-pos":"down"}},[s("IconButton",{on:{click:t.triggerSearch}},[s("IconSearch")],1)],1),t._v(" "),s("li",{attrs:{"aria-label":"light"===t.themeMode?t.__("Enable dark mode"):t.__("Enable light mode"),"data-balloon-blunt":"","data-balloon-pos":"down"}},[s("IconButton",{on:{click:t.toggleTheme}},["light"===t.themeMode?s("IconMoon"):t._e(),t._v(" "),"dark"===t.themeMode?s("IconSun"):t._e()],1)],1),t._v(" "),s("li",[s("Dropdown",{scopedSlots:t._u([{key:"default",fn:function(e){var a=e.toggle,i=e.isOpen;return[s("button",{staticClass:"flex h-auto m-0 appearance-none items-center",on:{click:a}},[s("span",[t._v(t._s(t.$page.props.auth.user.name))]),t._v(" "),s("img",{staticClass:"ml-2 inline w-8 h-8 rounded-avatar bg-surface-2",attrs:{src:t.$page.props.auth.user.avatar,alt:t.$page.props.auth.user.name}})]),t._v(" "),i?s("DropdownList",[t.$page.props.settings.support?s("DropdownListItem",{attrs:{to:"/support"}},[t._v(t._s(t.__("Support"))+"\n ")]):t._e(),t._v(" "),t.$page.props.settings.documentation?s("DropdownListItem",{attrs:{to:"/documentation"}},[t._v(t._s(t.__("Documentation")))]):t._e(),t._v(" "),s("DropdownListItem",{attrs:{to:t.route("profile.index")}},[t._v(t._s(t.__("Profile"))+"\n ")]),t._v(" "),t.$page.props.settings.billing?s("DropdownListItem",{attrs:{to:t.route("profile.billing.index")}},[t._v(t._s(t.__("Billing"))+"\n ")]):t._e(),t._v(" "),"admin"===t.$page.props.auth.user.role?s("DropdownListItem",{staticClass:"text-danger",attrs:{to:t.route("admin.dashboard")}},[t._v(t._s(t.__("Administration"))+"\n ")]):t._e(),t._v(" "),s("DropdownListItem",{attrs:{to:t.route("logout"),method:"post"}},[t._v(t._s(t.__("Sign out"))+"\n ")])],1):t._e()]}}])})],1)])],2),t._v(" "),t._t("tab-bar")],2)])],1)}),[],!1,null,null,null);e.a=h.exports},40:function(t,e,s){"use strict";var a={props:{to:{type:String,required:!0}}},i=s(0),n={components:{BreadcrumbsItem:Object(i.a)(a,(function(){var t=this.$createElement;return(this._self._c||t)("inertia-link",{staticClass:"font-medium text-body text-medium-emphasis",attrs:{href:this.to}},[this._t("default")],2)}),[],!1,null,null,null).exports},props:{items:{type:Array,required:!0}}},l=Object(i.a)(n,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",{staticClass:"flex items-center space-x-2"},t._l(t.items,(function(e,a){return s("li",{key:e.title},[s("BreadcrumbsItem",{attrs:{to:e.to}},[t._v(t._s(e.title))]),t._v(" "),a<t.items.length-1?s("span",{staticClass:"ml-2 text-low-emphasis"},[t._v("/")]):t._e()],1)})),0)}),[],!1,null,null,null);e.a=l.exports},41:function(t,e,s){"use strict";var a={props:{to:{type:String,required:!0},active:{type:Boolean,default:!1}},data:function(){return{baseClasses:"inline-flex items-center justify-center h-10 px-6 font-medium rounded text-small text-medium-emphasis",activeClasses:"shadow text-high-emphasis bg-surface-1",transitionClasses:"transition duration-fast hover:text-high-emphasis focus:text-high-emphasis"}}},i=s(0),n={components:{TabBarItem:Object(i.a)(a,(function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("inertia-link",{class:[this.baseClasses,this.transitionClasses,this.active?this.activeClasses:null],attrs:{href:this.to}},[this._t("default")],2)],1)}),[],!1,null,null,null).exports},props:{items:{type:Array,required:!0}}},l=Object(i.a)(n,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",{staticClass:"inline-flex flex-row p-1 overflow-hidden overflow-x-auto whitespace-no-wrap rounded bg-surface-2"},t._l(t.items,(function(e){return e?s("TabBarItem",{key:e.title,attrs:{to:e.to,active:e.active}},[t._v("\n "+t._s(e.title)+"\n ")]):t._e()})),1)}),[],!1,null,null,null);e.a=l.exports},42:function(t,e,s){"use strict";var a=s(0),i=Object(a.a)({},(function(){var t=this.$createElement;return(this._self._c||t)("nav",{staticClass:"flex items-center justify-center pb-4"},[this._t("default")],2)}),[],!1,null,null,null);e.a=i.exports},47:function(t,e,s){"use strict";var a={data:function(){return{isOpen:!1,position:"top"}},methods:{open:function(){this.isOpen=!0,this.calculatePosition()},close:function(){this.isOpen=!1,this.calculatePosition()},toggle:function(){this.isOpen=!this.isOpen,this.calculatePosition()},outsideClickListener:function(t){this.$refs.dropdown!==t.target.closest(this.$refs.dropdown.tagName)&&this.close()},calculatePosition:function(){this.$refs.dropdown.getBoundingClientRect().top>.75*window.innerHeight?this.position="bottom":this.position="top"}},mounted:function(){window.addEventListener("click",this.outsideClickListener)},beforeDestroy:function(){window.removeEventListener("click",this.outsideClickListener)}},i=s(0),n=Object(i.a)(a,(function(){var t=this.$createElement;return(this._self._c||t)("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:this.close,expression:"close"}],ref:"dropdown",staticClass:"relative"},[this._t("default",null,null,{isOpen:this.isOpen,open:this.open,close:this.close,toggle:this.toggle,position:this.position})],2)}),[],!1,null,null,null);e.a=n.exports},48:function(t,e,s){"use strict";var a={top:"right-0 top-0 mt-8",bottom:"right-0 bottom-0 mb-8"},i={props:{position:{type:String,default:function(){return"top"},validator:function(t){return Object.keys(a).includes(t)}}},computed:{positionClasses:function(){return a[this.position]}}},n=s(0),l=Object(n.a)(i,(function(){var t=this.$createElement;return(this._self._c||t)("div",{class:["absolute flex flex-col py-1 overflow-hidden rounded shadow-2xl bg-overlay md:bf-blur z-20",this.positionClasses]},[this._t("default")],2)}),[],!1,null,null,null);e.a=l.exports},49:function(t,e,s){"use strict";var a={props:{to:{type:String,required:!0},method:{required:!1,default:"get"}}},i=s(0),n=Object(i.a)(a,(function(){var t=this.$createElement;return(this._self._c||t)("inertia-link",{staticClass:"flex items-center w-full h-10 px-6 whitespace-no-wrap text-medium-emphasis text-small focus:bg-primary focus:text-on-primary hover:text-high-emphasis focus:outline-none",attrs:{href:this.to,method:this.method}},[this._t("default")],2)}),[],!1,null,null,null);e.a=n.exports},50:function(t,e,s){"use strict";var a=s(0),i=Object(a.a)({},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("button",{staticClass:"inline-flex items-center justify-center w-10 h-10 text-medium-emphasis rounded-circle focus:outline-none focus:text-high-emphasis",on:{click:function(e){return t.$emit("click")}}},[t._t("default")],2)}),[],!1,null,null,null);e.a=i.exports},64:function(t,e,s){"use strict";var a={props:{forId:{type:String,required:!1},errors:{type:Array}}},i=s(0),n=Object(i.a)(a,(function(){var t=this.$createElement;return(this._self._c||t)("label",{class:["text-small"],attrs:{for:this.forId}},[this._t("default")],2)}),[],!1,null,null,null);e.a=n.exports},65:function(t,e,s){"use strict";var a=s(0),i=Object(a.a)({},(function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"flex flex-col space-y-1"},[this._t("default")],2)}),[],!1,null,null,null);e.a=i.exports},66:function(t,e,s){"use strict";var a=s(0),i=Object(a.a)({},(function(){var t=this.$createElement;return(this._self._c||t)("p",{staticClass:"text-danger"},[this._t("default")],2)}),[],!1,null,null,null);e.a=i.exports},74:function(t,e,s){"use strict";var a=s(0),i=Object(a.a)({},(function(){var t=this.$createElement;return(this._self._c||t)("p",{staticClass:"text-medium-emphasis text-small"},[this._t("default")],2)}),[],!1,null,null,null);e.a=i.exports}}]); |