⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
makarnacimmix.xyz
/
public
/
dist
/
js
/
View File Name :
130.a78580.js
/*! For license information please see 130.a78580.js.LICENSE.txt */ (window.webpackJsonp=window.webpackJsonp||[]).push([[130],{4:function(t,e,r){"use strict";var n=r(7),s=r.n(n),o=Object.defineProperty,i=Object.prototype.hasOwnProperty,a=Object.getOwnPropertySymbols,c=Object.prototype.propertyIsEnumerable,u=(t,e,r)=>e in t?o(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,l=(t,e)=>{for(var r in e||(e={}))i.call(e,r)&&u(t,r,e[r]);if(a)for(var r of a(e))c.call(e,r)&&u(t,r,e[r]);return t};const f=t=>void 0===t,h=t=>Array.isArray(t),d=t=>t&&"number"==typeof t.size&&"string"==typeof t.type&&"function"==typeof t.slice,p=(t,e,r,n)=>((e=e||{}).indices=!f(e.indices)&&e.indices,e.nullsAsUndefineds=!f(e.nullsAsUndefineds)&&e.nullsAsUndefineds,e.booleansAsIntegers=!f(e.booleansAsIntegers)&&e.booleansAsIntegers,e.allowEmptyArrays=!f(e.allowEmptyArrays)&&e.allowEmptyArrays,r=r||new FormData,f(t)||(null===t?e.nullsAsUndefineds||r.append(n,""):(t=>"boolean"==typeof t)(t)?e.booleansAsIntegers?r.append(n,t?1:0):r.append(n,t):h(t)?t.length?t.forEach((t,s)=>{const o=n+"["+(e.indices?s:"")+"]";p(t,e,r,o)}):e.allowEmptyArrays&&r.append(n+"[]",""):(t=>t instanceof Date)(t)?r.append(n,t.toISOString()):!(t=>t===Object(t))(t)||(t=>d(t)&&"string"==typeof t.name&&("object"==typeof t.lastModifiedDate||"number"==typeof t.lastModified))(t)||d(t)?r.append(n,t):Object.keys(t).forEach(s=>{const o=t[s];if(h(o))for(;s.length>2&&s.lastIndexOf("[]")===s.length-2;)s=s.substring(0,s.length-2);p(o,e,r,n?n+"["+s+"]":s)})),r);var m={serialize:p};function y(t){if(null===t||"object"!=typeof t)return t;const e=Array.isArray(t)?[]:{};return Object.keys(t).forEach(r=>{e[r]=y(t[r])}),e}function v(t){return Array.isArray(t)?t:[t]}class g{constructor(){this.errors={},this.errors={}}set(t,e){"object"==typeof t?this.errors=t:this.set(l(l({},this.errors),{[t]:v(e)}))}all(){return this.errors}has(t){return Object.prototype.hasOwnProperty.call(this.errors,t)}hasAny(...t){return t.some(t=>this.has(t))}any(){return Object.keys(this.errors).length>0}get(t){if(this.has(t))return this.getAll(t)[0]}getAll(t){return v(this.errors[t]||[])}only(...t){const e=[];return t.forEach(t=>{const r=this.get(t);r&&e.push(r)}),e}flatten(){return Object.values(this.errors).reduce((t,e)=>t.concat(e),[])}clear(t){const e={};t&&Object.keys(this.errors).forEach(r=>{r!==t&&(e[r]=this.errors[r])}),this.set(e)}}class b{constructor(t={}){this.originalData={},this.busy=!1,this.successful=!1,this.recentlySuccessful=!1,this.recentlySuccessfulTimeoutId=void 0,this.errors=new g,this.progress=void 0,this.update(t)}static make(t){return new this(t)}update(t){this.originalData=Object.assign({},this.originalData,y(t)),Object.assign(this,t)}fill(t={}){this.keys().forEach(e=>{this[e]=t[e]})}data(){return this.keys().reduce((t,e)=>l(l({},t),{[e]:this[e]}),{})}keys(){return Object.keys(this).filter(t=>!b.ignore.includes(t))}startProcessing(){this.errors.clear(),this.busy=!0,this.successful=!1,this.progress=void 0,this.recentlySuccessful=!1,clearTimeout(this.recentlySuccessfulTimeoutId)}finishProcessing(){this.busy=!1,this.successful=!0,this.progress=void 0,this.recentlySuccessful=!0,this.recentlySuccessfulTimeoutId=setTimeout(()=>{this.recentlySuccessful=!1},b.recentlySuccessfulTimeout)}clear(){this.errors.clear(),this.successful=!1,this.recentlySuccessful=!1,this.progress=void 0,clearTimeout(this.recentlySuccessfulTimeoutId)}reset(){Object.keys(this).filter(t=>!b.ignore.includes(t)).forEach(t=>{this[t]=y(this.originalData[t])})}get(t,e={}){return this.submit("get",t,e)}post(t,e={}){return this.submit("post",t,e)}patch(t,e={}){return this.submit("patch",t,e)}put(t,e={}){return this.submit("put",t,e)}delete(t,e={}){return this.submit("delete",t,e)}submit(t,e,r={}){return this.startProcessing(),r=l({data:{},params:{},url:this.route(e),method:t,onUploadProgress:this.handleUploadProgress.bind(this)},r),"get"===t.toLowerCase()?r.params=l(l({},this.data()),r.params):(r.data=l(l({},this.data()),r.data),function t(e){return e instanceof File||e instanceof Blob||e instanceof FileList||"object"==typeof e&&null!==e&&void 0!==Object.values(e).find(e=>t(e))}(r.data)&&!r.transformRequest&&(r.transformRequest=[t=>m.serialize(t)])),new Promise((t,e)=>{(b.axios||s.a).request(r).then(e=>{this.finishProcessing(),t(e)}).catch(t=>{this.handleErrors(t),e(t)})})}handleErrors(t){this.busy=!1,this.progress=void 0,t.response&&this.errors.set(this.extractErrors(t.response))}extractErrors(t){return t.data&&"object"==typeof t.data?t.data.errors?l({},t.data.errors):t.data.message?{error:t.data.message}:l({},t.data):{error:b.errorMessage}}handleUploadProgress(t){this.progress={total:t.total,loaded:t.loaded,percentage:Math.round(100*t.loaded/t.total)}}route(t,e={}){let r=t;return Object.prototype.hasOwnProperty.call(b.routes,t)&&(r=decodeURI(b.routes[t])),"object"!=typeof e&&(e={id:e}),Object.keys(e).forEach(t=>{r=r.replace(`{${t}}`,e[t])}),r}onKeydown(t){const e=t.target;e.name&&this.errors.clear(e.name)}}b.routes={},b.errorMessage="Something went wrong. Please try again.",b.recentlySuccessfulTimeout=2e3,b.ignore=["busy","successful","errors","progress","originalData","recentlySuccessful","recentlySuccessfulTimeoutId"],e.a=b},471:function(t,e,r){"use strict";r.r(e);var n=r(3),s=r(4);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(){i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,s){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new C(s||[]);return n(i,"_invoke",{value:E(t,r,a)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function m(){}function y(){}var v={};l(v,a,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(L([])));b&&b!==e&&r.call(b,a)&&(v=b);var w=y.prototype=p.prototype=Object.create(v);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var s;n(this,"_invoke",{value:function(n,i){function a(){return new e((function(s,a){!function n(s,i,a,c){var u=h(t[s],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==o(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}(n,i,s,a)}))}return s=s?s.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(s,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===s)throw o;return S()}for(r.method=s,r.arg=o;;){var i=r.delegate;if(i){var a=O(i,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function O(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var s=h(n,t.iterator,e.arg);if("throw"===s.type)return e.method="throw",e.arg=s.arg,e.delegate=null,d;var o=s.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function L(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,s=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return s.next=s}}return{next:S}}function S(){return{value:void 0,done:!0}}return m.prototype=y,n(w,"constructor",{value:y,configurable:!0}),n(y,"constructor",{value:m,configurable:!0}),m.displayName=l(y,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,l(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},_(x.prototype),l(x.prototype,c,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,s,o){void 0===o&&(o=Promise);var i=new x(f(e,r,n,s),o);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},_(w),l(w,u,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=L,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var s=this.tryEntries.length-1;s>=0;--s){var o=this.tryEntries[s],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var s=this.tryEntries[n];if(s.tryLoc<=this.prev&&r.call(s,"finallyLoc")&&this.prev<s.finallyLoc){var o=s;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var s=n.arg;k(r)}return s}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function a(t,e,r,n,s,o,i){try{var a=t[o](i),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,s)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,s){var o=t.apply(e,r);function i(t){a(o,n,s,i,c,"next",t)}function c(t){a(o,n,s,i,c,"throw",t)}i(void 0)}))}}var u={middleware:["auth","check-permissions"],metaInfo:function(){return{title:this.$t("setup.role_and_permission.create.page_title")}},data:function(){return{breadcrumbsCurrent:"setup.role_and_permission.create.breadcrumbs_current",breadcrumbs:[{name:"setup.role_and_permission.create.breadcrumbs_first",url:"home"},{name:"setup.role_and_permission.create.breadcrumbs_second",url:"setup.index"},{name:"setup.role_and_permission.create.breadcrumbs_third",url:"roles.index"},{name:"setup.role_and_permission.create.breadcrumbs_active",url:""}],form:new s.a({name:"",permission:[]}),loading:!0}},computed:Object(n.b)({items:"operations/items"}),created:function(){this.getData()},methods:{saveRole:function(){var t=this;return c(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.form.post(window.location.origin+"/api/roles").then((function(){toast.fire({type:"success",title:t.$t("setup.role_and_permission.create.success_msg")}),t.$router.push({name:"roles.index"})})).catch((function(){toast.fire({type:"error",title:t.$t("common.error_msg")})}));case 2:case"end":return e.stop()}}),e)})))()},getData:function(){var t=this;return c(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading=!0,e.next=3,t.$store.dispatch("operations/allData",{path:"/api/all-permissions"});case 3:t.setPermission(t.items),t.loading=!1;case 5:case"end":return e.stop()}}),e)})))()},setPermission:function(t){var e=this;return c(i().mark((function r(){var n,s;return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:for(n in t)for(s in t[n])e.form.permission.push(t[n][s].slug);case 1:case"end":return r.stop()}}),r)})))()},onChangeEventHandler:function(t,e){if(e.includes("view")||e.includes("edit")||e.includes("delete")){var r=e.includes("delete")?e.substring(0,e.length-6):e.substring(0,e.length-4);this.form.permission.includes(e)&&!this.form.permission.includes(r+"list")&&this.form.permission.push(r+"list")}if(e.includes("list")&&!this.form.permission.includes(e)){var n=e.substring(0,e.length-4);this.form.permission=this.form.permission.filter((function(t){return n+"edit"!==t})),this.form.permission=this.form.permission.filter((function(t){return n+"delete"!==t})),this.form.permission=this.form.permission.filter((function(t){return n+"view"!==t}))}}}},l=r(1),f=Object(l.a)(u,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("breadcrumbs",{attrs:{items:t.breadcrumbs,current:t.breadcrumbsCurrent}}),t._v(" "),r("div",{staticClass:"row"},[r("div",{staticClass:"col-lg-12"},[r("form",{on:{submit:function(e){return e.preventDefault(),t.saveRole.apply(null,arguments)},keydown:function(e){return t.form.onKeydown(e)}}},[r("div",{staticClass:"card"},[r("div",{staticClass:"card-header"},[r("h3",{staticClass:"card-title mt-2"},[t._v("\n "+t._s(t.$t("setup.role_and_permission.create.form_title"))+"\n ")]),t._v(" "),r("router-link",{staticClass:"btn btn-dark float-right",attrs:{to:{name:"roles.index"}}},[r("i",{staticClass:"fas fa-long-arrow-alt-left"}),t._v(" "+t._s(t.$t("common.back"))+"\n ")])],1),t._v(" "),r("div",{staticClass:"card-body"},[r("div",{staticClass:"form-group mb-4"},[r("label",{attrs:{for:"name"}},[t._v(t._s(t.$t("common.name"))+"\n "),r("span",{staticClass:"required"},[t._v("*")])]),t._v(" "),r("input",{directives:[{name:"model",rawName:"v-model",value:t.form.name,expression:"form.name"}],staticClass:"form-control",class:{"is-invalid":t.form.errors.has("name")},attrs:{placeholder:t.$t("common.name_placeholder")},domProps:{value:t.form.name},on:{input:function(e){e.target.composing||t.$set(t.form,"name",e.target.value)}}}),t._v(" "),r("has-error",{attrs:{form:t.form,field:"name"}})],1),t._v(" "),r("h5",{staticClass:"mb-3 mt-4"},[t._v("\n "+t._s(t.$t("setup.role_and_permission.create.select_permission"))+"\n ")]),t._v(" "),r("masonry",{attrs:{cols:{default:3,1e3:2,700:1,400:1},gutter:{default:"30px",700:"15px"}}},t._l(t.items,(function(e,n){return r("div",{key:n,class:{"is-invalid":t.form.errors.has("permission")}},[r("has-error",{staticClass:"permission",attrs:{form:t.form,field:"permission"}}),t._v(" "),r("div",{staticClass:"card permission-card"},[r("div",{staticClass:"card-header"},[e[0]?r("h3",{staticClass:"card-title text-bold text-capitalize"},[t._v("\n "+t._s(e[0].guard_name)+"\n ")]):t._e(),t._v(" "),r("div",{staticClass:"card-tools"},[r("button",{staticClass:"btn btn-tool",attrs:{type:"button",loading:t.form.busy,"data-card-widget":"collapse"}},[r("i",{staticClass:"fas fa-minus"})])])]),t._v(" "),r("div",{staticClass:"card-body permisson-card"},[r("ul",t._l(e,(function(e,n){return r("li",{key:n},[r("label",{staticClass:"text-capitalize",attrs:{for:e.slug}},[t._v(t._s(e.name))]),t._v(" "),r("div",{staticClass:"custom-control custom-checkbox mb-1"},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.form.permission,expression:"form.permission"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:e.slug,name:"permission"},domProps:{value:e.slug,checked:Array.isArray(t.form.permission)?t._i(t.form.permission,e.slug)>-1:t.form.permission},on:{change:[function(r){var n=t.form.permission,s=r.target,o=!!s.checked;if(Array.isArray(n)){var i=e.slug,a=t._i(n,i);s.checked?a<0&&t.$set(t.form,"permission",n.concat([i])):a>-1&&t.$set(t.form,"permission",n.slice(0,a).concat(n.slice(a+1)))}else t.$set(t.form,"permission",o)},function(r){return t.onChangeEventHandler(r,e.slug)}]}}),t._v(" "),r("label",{staticClass:"custom-control-label",attrs:{for:e.slug}})])])})),0)])])],1)})),0)],1),t._v(" "),r("div",{staticClass:"card-footer"},[r("v-button",{staticClass:"btn btn-primary",attrs:{loading:t.form.busy}},[r("i",{staticClass:"fas fa-save"}),t._v(" "+t._s(t.$t("common.save"))+"\n ")]),t._v(" "),r("button",{staticClass:"btn btn-secondary float-right",attrs:{type:"reset"},on:{click:function(e){return t.form.reset()}}},[r("i",{staticClass:"fas fa-power-off"}),t._v(" "+t._s(t.$t("common.reset"))+"\n ")])],1)])])])])],1)}),[],!1,null,null,null);e.default=f.exports}}]);