���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
.trash
/
.output.2
/
server
/
chunks
/
build
/
Viewing: _id_-CJ3ez0cp.mjs
import { _ as __nuxt_component_3 } from './Input-A71d90Ub.mjs'; import { _ as __nuxt_component_1 } from './Select-C4TN3hok.mjs'; import { _ as _export_sfc, b as useI18n, c as useLocalePath, i as useNuxtApp, j as useToast, q as useRoute, x as useAsyncData, s as useRuntimeConfig, n as navigateTo, k as __nuxt_component_4$1, p as __nuxt_component_2$1 } from './server.mjs'; import { _ as __nuxt_component_3$1 } from './snipper-CoWDSzCA.mjs'; import { useSSRContext, defineComponent, ref, reactive, withAsyncContext, mergeProps, unref, withCtx, createVNode, toDisplayString } from 'vue'; import { u as useAPI } from './useAPI-dGPJZ6yO.mjs'; import { ssrRenderAttrs, ssrRenderAttr, ssrInterpolate, ssrRenderComponent, ssrRenderList } from 'vue/server-renderer'; import { u as useMainStore } from './index-DviQ8Cgo.mjs'; import 'tailwind-merge'; import '../runtime.mjs'; import 'node:http'; import 'node:https'; import 'fs'; import 'path'; import 'node:fs'; import 'node:url'; import '@iconify/utils'; import 'consola/core'; import '@vueuse/core'; import '../routes/renderer.mjs'; import 'vue-bundle-renderer/runtime'; import 'devalue'; import '@unhead/ssr'; import 'unhead'; import '@unhead/shared'; import 'vue-router'; import '@iconify/vue'; import '@iconify/utils/lib/css/icon'; import './fetch-5zL7LryB.mjs'; import 'js-cookie'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "[id]", __ssrInlineRender: true, async setup(__props) { let __temp, __restore; const { t } = useI18n(); const localePath = useLocalePath(); useI18n(); const config = useRuntimeConfig(); const { $api } = useNuxtApp(); const MainStore = useMainStore(); const toast = useToast(); const { id } = useRoute().params; const loading = ref(false); const state = reactive({ y: void 0, x: void 0, z: void 0, s: void 0, c: 1, count: 1 }); const computingUnit = ref(null); const colors = ref([]); useRoute(); const { data } = ([__temp, __restore] = withAsyncContext(async () => useAsyncData(`user:${id}`, async () => { const [fields, result] = await Promise.all([ $api(config.public.API_URL + "/analyze/materials"), $api(config.public.API_URL + "/analyze/unit", { query: { unit_id: id } }) ]); const fieldsOptions = JSON.parse(fields).data.materials; const unit_res = JSON.parse(result).data.unit; return { fields: fieldsOptions, unit: unit_res }; }, { server: true })), __temp = await __temp, __restore(), __temp); async function computing(type, title, url) { if (!state.y) { return toast.add({ title: t("Length field Alert"), color: "orange" }); } if (!state.x) { return toast.add({ title: t("Width field Alert"), color: "orange" }); } if (!state.z) { return toast.add({ title: t("Height field Alert"), color: "orange" }); } let state_d = 1; if (state.s) { state_d = state.x - state.s; } loading.value = true; const { data: data2, refresh } = await useAPI("/analyze/computing-unit", { method: "POST", immediate: true, server: true, body: { y: state.y, x: state.x, z: state.z, s: state.s, c: state.c, d: state_d, count: state.count, type, unit_id: id, unit_title: title } }); computingUnit.value = JSON.parse(data2.value).data.result; loading.value = false; if (url) { navigateTo(localePath(url)); } } let validateKeys = (keyName) => { return [ "ArrowUp", "ArrowLeft", "ArrowRight", "ArrowDown" ].includes(keyName); }; let checkKeyIsArrowUpOrArrowDown = (keyCode) => { return [ 38, 40 ].includes(keyCode); }; const handleSkipNextInput = (event) => { var _a; if (event.target.tagName == "SELECT" && validateKeys(event.code) || checkKeyIsArrowUpOrArrowDown(event.which)) { event.preventDefault(); } if (validateKeys(event.code)) { let id2 = parseInt(event.target.id); let target; switch (event.code) { case "ArrowUp": case "ArrowRight": if (id2 > 1) target = id2 - 1; else return; break; case "ArrowDown": case "ArrowLeft": if (id2 < 7) target = id2 + 1; else return; break; } (_a = (void 0).getElementById(`${target}`)) == null ? void 0 : _a.focus(); } }; return (_ctx, _push, _parent, _attrs) => { const _component_UInput = __nuxt_component_3; const _component_USelect = __nuxt_component_1; const _component_UButton = __nuxt_component_4$1; const _component_Snipper = __nuxt_component_3$1; const _component_UIcon = __nuxt_component_2$1; _push(`<div${ssrRenderAttrs(mergeProps({ class: "mb-2 pt-3 px-2 mt-1" }, _attrs))} data-v-a2376527><section${ssrRenderAttr("dir", _ctx.$i18n.locale == "en" ? "ltr" : "rtl")} data-v-a2376527><div class="flex justify-between items-start" data-v-a2376527><div class="w-full flex justify-between items-start mb-3" data-v-a2376527><div class="w-5/12" data-v-a2376527><div class="flex justify-between items-center w-full mb-3" data-v-a2376527><label class="block w-5/12 text-gray-500 bg-white text-sm" data-v-a2376527>${ssrInterpolate(unref(t)("Depth"))}</label><div class="w-7/12" data-v-a2376527>`); _push(ssrRenderComponent(_component_UInput, { loading: false, variant: "outline", onKeydown: handleSkipNextInput, id: "1", type: "number", inputClass: " w-10/12 sm:w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 py-0 text-xs", onKeypress: unref(MainStore).NumbersOnly, modelValue: unref(state).y, "onUpdate:modelValue": ($event) => unref(state).y = $event }, null, _parent)); _push(`</div></div><div class="flex justify-between items-center w-full mb-3" data-v-a2376527><label class="block w-5/12 text-gray-500 bg-white text-sm" data-v-a2376527>${ssrInterpolate(unref(t)("Width"))}</label><div class="w-7/12" data-v-a2376527>`); _push(ssrRenderComponent(_component_UInput, { loading: false, variant: "outline", onKeydown: handleSkipNextInput, id: "2", type: "number", inputClass: " w-10/12 sm:w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 py-0 text-xs", onKeypress: unref(MainStore).NumbersOnly, modelValue: unref(state).x, "onUpdate:modelValue": ($event) => unref(state).x = $event }, null, _parent)); _push(`</div></div><div class="flex justify-between items-center w-full mb-3" data-v-a2376527><label class="block w-5/12 text-gray-500 bg-white text-sm" data-v-a2376527>${ssrInterpolate(unref(t)("Height"))}</label><div class="w-7/12" data-v-a2376527>`); _push(ssrRenderComponent(_component_UInput, { loading: false, variant: "outline", type: "number", inputClass: "w-10/12 sm:w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 py-0 text-xs", onKeypress: unref(MainStore).NumbersOnly, onKeydown: handleSkipNextInput, id: "3", modelValue: unref(state).z, "onUpdate:modelValue": ($event) => unref(state).z = $event }, null, _parent)); _push(`</div></div>`); if (unref(data).unit.sabet_status == "true") { _push(`<div class="flex justify-between items-center w-full mb-3" data-v-a2376527><label class="block w-5/12 text-gray-500 bg-white text-sm" data-v-a2376527>${ssrInterpolate(unref(t)("Fixed Width"))}</label><div class="w-7/12" data-v-a2376527>`); _push(ssrRenderComponent(_component_UInput, { loading: false, variant: "outline", type: "number", inputClass: "w-10/12 sm:w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 py-0 text-xs", onKeypress: unref(MainStore).NumbersOnly, modelValue: unref(state).s, "onUpdate:modelValue": ($event) => unref(state).s = $event }, null, _parent)); _push(`</div></div>`); } else { _push(`<!---->`); } _push(`<div class="flex justify-between items-center w-full mb-3" data-v-a2376527><label class="block w-5/12 text-gray-500 bg-white text-sm" data-v-a2376527>${ssrInterpolate(unref(t)("Door Color"))}</label><div class="w-7/12" data-v-a2376527>`); _push(ssrRenderComponent(_component_USelect, { options: unref(colors), "option-attribute": "name", id: "4", onKeydown: handleSkipNextInput, class: "w-full", selectClass: " w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 pl-2 py-0 text-xs", modelValue: unref(state).c, "onUpdate:modelValue": ($event) => unref(state).c = $event }, null, _parent)); _push(`</div></div></div><div class="h-32 w-[13rem] mb-3" data-v-a2376527>`); if (unref(data).unit.image_2_d) { _push(`<img${ssrRenderAttr("src", unref(config).public.FILE_URL + unref(data).unit.image_2_d.address)} class="w-full h-full"${ssrRenderAttr("alt", unref(t)("Add Unit"))} data-v-a2376527>`); } else { _push(`<!---->`); } _push(ssrRenderComponent(_component_UButton, { loading: false, square: "", onKeydown: handleSkipNextInput, id: "5", onClick: ($event) => computing("computing", unref(data).unit.title, null), class: "w-full flex text-main-700 rounded-sm border border-red-600 h-7 bg-white items-center justify-center" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { var _a, _b; if (_push2) { _push2(`<span class="block px-2 text-sm truncate" data-v-a2376527${_scopeId}>${ssrInterpolate(((_a = unref(computingUnit)) == null ? void 0 : _a.length) ? unref(t)("Recalculate") : unref(t)("Computing"))}</span>`); } else { return [ createVNode("span", { textContent: toDisplayString(((_b = unref(computingUnit)) == null ? void 0 : _b.length) ? unref(t)("Recalculate") : unref(t)("Computing")), class: "block px-2 text-sm truncate" }, null, 8, ["textContent"]) ]; } }), _: 1 }, _parent)); _push(`</div></div></div></section><section class="mb-2" data-v-a2376527>`); if (unref(loading)) { _push(`<div data-v-a2376527>`); _push(ssrRenderComponent(_component_Snipper, null, null, _parent)); _push(`</div>`); } else { _push(`<!---->`); } if (unref(computingUnit)) { _push(`<table class="w-full p-0"${ssrRenderAttr("dir", _ctx.$i18n.locale == "en" ? "ltr" : "rtl")} data-v-a2376527><thead data-v-a2376527><tr class="bg-gray-300" data-v-a2376527><th data-v-a2376527>${ssrInterpolate(unref(t)("length"))}</th><th data-v-a2376527></th><th data-v-a2376527>${ssrInterpolate(unref(t)("width"))}</th><th data-v-a2376527></th><th data-v-a2376527>${ssrInterpolate(unref(t)("count"))}</th><th data-v-a2376527>${ssrInterpolate(unref(t)("unit_title"))}</th></tr></thead><tbody data-v-a2376527><!--[-->`); ssrRenderList(unref(computingUnit), (res, key) => { _push(`<tr class="even:bg-gray-100" data-v-a2376527><td data-v-a2376527>${ssrInterpolate(res.length)}</td><td data-v-a2376527>`); _push(ssrRenderComponent(_component_UIcon, { name: "i-heroicons-x-mark", class: "text-[11px]" }, null, _parent)); _push(`</td><td data-v-a2376527>${ssrInterpolate(res.width)}</td><td data-v-a2376527> = </td><td data-v-a2376527>${ssrInterpolate(res.count)}</td><td data-v-a2376527>${ssrInterpolate(_ctx.$i18n.locale == "en" ? res.label_en : res.label)}</td></tr>`); }); _push(`<!--]--></tbody></table>`); } else { _push(`<!---->`); } _push(`</section><footer${ssrRenderAttr("dir", _ctx.$i18n.locale == "en" ? "ltr" : "rtl")} class="px-3 bg-white flex justify-between items-center pb-2 pt-2 sm:border-r sm:border-l w-full sm:w-9/12 md:w-7/12 lg:w-6/12 2xl:w-5/12 mx-auto fixed bottom-0 right-0 left-0 border-t" data-v-a2376527><div class="px-1 w-3/12" data-v-a2376527><label class="block text-gray-500 bg-white text-base" data-v-a2376527>${ssrInterpolate(unref(t)("Number_Units"))} : </label></div><div class="px-1 w-4/12" data-v-a2376527>`); _push(ssrRenderComponent(_component_UInput, { loading: false, variant: "outline", inputClass: "w-full text-center text-main-700 rounded-sm ring-gray-400 !shadow-none focus:ring-1 focus:ring-orange-600 h-7 text-base ", modelValue: unref(state).count, "onUpdate:modelValue": ($event) => unref(state).count = $event, type: "number", onKeypress: unref(MainStore).NumbersOnly, onKeydown: handleSkipNextInput, id: "6" }, null, _parent)); _push(`</div><div class="px-1 w-4/12" data-v-a2376527>`); _push(ssrRenderComponent(_component_UButton, { loading: false, square: "", onKeydown: handleSkipNextInput, id: "7", onClick: ($event) => computing("set", unref(data).unit.title, "/analyze/list"), class: "w-full flex text-main-700 border-red-700 rounded-sm border h-7 bg-white items-center justify-center" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`<span class="block px-2 text-base truncate" data-v-a2376527${_scopeId}>${ssrInterpolate(unref(t)("registration"))}</span>`); } else { return [ createVNode("span", { class: "block px-2 text-base truncate" }, toDisplayString(unref(t)("registration")), 1) ]; } }), _: 1 }, _parent)); _push(`</div></footer></div>`); }; } }); const _sfc_setup = _sfc_main.setup; _sfc_main.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/unit/edit/[id].vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; const _id_ = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a2376527"]]); export { _id_ as default }; //# sourceMappingURL=_id_-CJ3ez0cp.mjs.map
Coded With 💗 by
0x6ick Mod By V1rus_Alfa