qumra-engine 1.0.54 → 1.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.cjs.js +1 -1
- package/dist/bundle.esm.js +1 -1
- package/package.json +1 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see bundle.cjs.js.LICENSE.txt */
|
|
2
|
-
(()=>{var t={863:(t,e,r)=>{var n=r(93).getGlobal;r(38),t.exports={upperCase:function(t){return t.toUpperCase()},reverse:function(t){return t.split("").reverse().join("")},capitalize:function(t){return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()},formatCurrency:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$")+parseFloat(t).toFixed(2)},money:function(t){if(t){var e=n("app").currency;return"".concat(t.toFixed(2)," ").concat(e.currencySymbol)}return"يجب ان يكون رقم"},date:function(t){return new Date(t).toISOString().split("T")[0]},applyDiscount:function(t,e){return t-t*(e/100)},addVAT:function(t){return t+t*((arguments.length>1&&void 0!==arguments[1]?arguments[1]:15)/100)},pluralize:function(t,e,r){return 1===t?e:r},truncate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return t.length>e?t.slice(0,e)+"...":t},trimSpaces:function(t){return t.trim()},isEmpty:function(t){return!t||0===t.trim().length},slugify:function(t){return t.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]+/g,"")},formatNumber:function(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},assets:function(t){return n("assets")+t},cdn:function(t){return n("cdn")},seo:function(){return'<title>متجر تجريبي</title>\n<meta name="description" content="متجر تجريبي - Demo Store">\n<meta name="keywords" content="متجر,تجريبي,-,Demo,Store">\n<meta property="store:published_time" content="2024-08-09T06:03:33+03:00">\n<meta property="og:description" content="متجر تجريبي - Demo Store">\n<meta property="og:title" content="متجر تجريبي">\n<meta property="og:type" content="store">\n<meta property="og:locale" content="ar_AR">\n<meta property=":locale:alternate" content="ar_AR">\n<meta property=":locale:alternate" content="en_US">\n<meta property="og:url" content="https://salla.design/dev-ruj4uvkrq9hz389z">\n<meta property="og:image" content="https://salla-dev.s3.eu-central-1.amazonaws.com/logo/logo-fashion.jpg">\n<meta property="og:image:width" content="600">\n<meta property="og:image:height" content="300">\n<meta name="twitter:description" content="متجر تجريبي - Demo Store">\n<meta name="twitter:image" content="https://salla-dev.s3.eu-central-1.amazonaws.com/logo/logo-fashion.jpg">\n<meta name="twitter:card" content="summary_large_image">\n<meta name="twitter:title" content="متجر تجريبي">\n<meta name="twitter:url" content="https://salla.design/dev-ruj4uvkrq9hz389z">\n<meta name="twitter:site" content="@SallaApp">\n<meta name="twitter:creator" content="@SallaApp">\n<script type="application/ld+json">{"@context":"https://schema.org","@type":"Organization","name":"متجر تجريبي","description":"متجر تجريبي - Demo Store","url":"https://salla.design/dev-ruj4uvkrq9hz389z","logo":"https://salla-dev.s3.eu-central-1.amazonaws.com/logo/logo-fashion.jpg"}<\/script>'}}},908:(t,e,r)=>{var n=r(93),o=n.getGlobal,a=n.setGlobal,i=r(985).getLocales,c=r(413);t.exports={set:function(t,e){a(t,e)},get:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return o(t)||e},t:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=o("lang")||"ar",n=i(r);return n&&c(n,t)||e}}},99:(t,e,r)=>{function n(t){return n="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},n(t)}function o(){"use strict";o=function(){return e};var t,e={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,a=Object.create(o.prototype),c=new q(n||[]);return i(a,"_invoke",{value:k(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var m="suspendedStart",g="suspendedYield",y="executing",v="completed",d={};function w(){}function b(){}function x(){}var j={};p(j,u,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(D([])));S&&S!==r&&a.call(S,u)&&(j=S);var _=x.prototype=w.prototype=Object.create(j);function L(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,p=s.value;return p&&"object"==n(p)&&a.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(p).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var o;i(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}})}function k(e,r,n){var o=m;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=z(c,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?v:g,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function z(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,z(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,d;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function A(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 P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(a.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(n(e)+" is not iterable")}return b.prototype=x,i(_,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:b,configurable:!0}),b.displayName=p(x,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,p(t,s,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},L(E.prototype),p(E.prototype,l,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(_),p(_,s,"Generator"),p(_,u,(function(){return this})),p(_,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,q.prototype={constructor:q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),l=a.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;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),P(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 o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){c(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function c(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var l=r(271),s=r(928),p=r(168),f=r(915),h=r(896),m=r(863),g=r(908),y=r(926),v=r(985).setLocales,d=r(93),w=d.setGlobal,b=(d.getGlobal,r(91)),x=r(426),j=r(898);t.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.use(j()),t.use(b),function(){var r,n=(r=o().mark((function r(n,a,c){var u,d,b,j,O,S,_,L,E,k,z,A,P,q,D,G,T,F,U,C,N,I,R,X,$,K,J,W,Y,B,H,M,V,Z,Q,tt,et,rt;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(O=e.viewsDirectory,S=s.join(null!=O?O:null==a||null===(u=a.locals)||void 0===u||null===(u=u.app)||void 0===u?void 0:u.themePath,"views"),_=s.join(null!=O?O:null==a||null===(d=a.locals)||void 0===d||null===(d=d.app)||void 0===d?void 0:d.themePath,"locales"),L=n.originalUrl,E=n.protocol,!f(L)){r.next=7;break}return c(),r.abrupt("return");case 7:for(z in k=l.configure(S,{autoescape:!0,express:t,watch:e.watch||!1,noCache:e.noCache||!1}),m)k.addFilter(z,m[z]);for(A in h.existsSync(_)&&h.statSync(_).isDirectory()?h.readdirSync(_).forEach((function(t){if(t.endsWith(".json")){var e=s.basename(t,".json"),r=s.join(_,t);if(h.existsSync(r)){var n=h.readFileSync(r,"utf-8");v(e,JSON.parse(n))}}})):console.log("المجلد غير موجود أو أنه ليس مجلدًا."),g)k.addGlobal(A,g[A]);return P=y(L),w("lang",P.language),q="".concat(E,"://").concat(n.get("host")).concat(P.path),D=n.headers["x-forwarded-for"]||n.ip,G=n.get("User-Agent")||"",T=n.get("Referer")||"",F=n.get("Accept-Language")||"",U=Intl.DateTimeFormat().resolvedOptions().timeZone||"",C=new x(G),N=C.getDevice(),I=C.getOS(),R=N.type||"desktop",X="".concat(I.name," ").concat(I.version),console.log("🚀 ~ return ~ fullUrl:",q),$="https://api.qumra.cloud/templateEngine/v1/render?path=".concat(encodeURIComponent(q)),K=n.cookies.token,J={Authorization:K,"Content-Type":"application/json",secretKey:null!==(b=null==a||null===(j=a.locals)||void 0===j||null===(j=j.app)||void 0===j?void 0:j.secretKey)&&void 0!==b?b:e.secretKey,fingerprint:n.fingerprint.hash,"User-Agent":G,Referer:T,"X-Forwarded-For":D,"Accept-Language":F,"X-Device-Type":R,"X-OS":X,"X-Timezone":U},W={headers:J},r.next=31,fetch($,W);case 31:return Y=r.sent,(B=Y.headers.getSetCookie())&&B.forEach((function(t){var e=p(t);Object.keys(e).forEach((function(t){var r=e[t],n=r.value,o=r.attributes;a.cookie(t,n,o)}))})),r.next=36,Y.json();case 36:for(Z in H=r.sent,M=H.global,V=H.context,M)Object.hasOwnProperty.call(M,Z)&&(console.log("🚀 ~ return ~ key:",Z),console.log("🚀 ~ return ~ global[key]:",M[Z]),w(Z,M[Z]));V.page?(Q=function(t,e){return{content:t,priority:e}},tt=function(t){return t.replace(/<script.*?>.*?<\/script>/gi,"")},et=i({},M),rt={head_scripts:[Q("<script>window.__qumra__ = window.__qumra__ || {}; window.__qumra__.data = ".concat(tt(JSON.stringify(et)),";<\/script>"),15)],seo:[Q("<title>".concat(M.app.name,"</title>")),Q('<meta name="description" content="'.concat(M.app.description,'">')),Q('<meta name="keywords" content="متجر,تجريبي,-,Demo,Store">'),Q('<meta property="store:published_time" content="2024-08-09T06:03:33+03:00">'),Q('<meta property="og:description" content="'.concat(M.app.description,'">')),Q('<meta property="og:title" content="'.concat(M.app.name,'">')),Q('<meta property="og:type" content="store">'),Q('<meta property="og:locale" content="ar_AR">'),Q('<meta property=":locale:alternate" content="ar_AR">'),Q('<meta property=":locale:alternate" content="en_US">'),Q('<meta property="og:url" content="https://salla.design/dev-ruj4uvkrq9hz389z">'),Q('<meta property="og:image" content="'.concat(M.app.logoUrl,'">')),Q('<meta property="og:image:width" content="600">'),Q('<meta property="og:image:height" content="300">'),Q('<meta name="twitter:description" content="'.concat(M.app.description,'">')),Q('<meta name="twitter:image" content="'.concat(M.app.logoUrl,'">')),Q('<meta name="twitter:card" content="summary_large_image">'),Q('<meta name="twitter:title" content="'.concat(M.app.name,'">')),Q('<meta name="twitter:url" content="https://salla.design/dev-ruj4uvkrq9hz389z">'),Q('<meta name="twitter:site" content="@SallaApp">'),Q('<meta name="twitter:creator" content="@SallaApp">'),Q('<script type="application/ld+json">{"@context":"https://schema.org","@type":"Organization","name":"'.concat(M.app.name,'","description":"').concat(M.app.description,'","url":"https://salla.design/dev-ruj4uvkrq9hz389z","logo":"').concat(M.app.logoUrl,'"}<\/script>'))]},Object.keys(rt).forEach((function(t){rt[t]=rt[t].sort((function(t,e){return e.priority-t.priority})).map((function(t){return k.renderString(t.content)})).join("")})),console.log("🚀 ~ Object.keys ~ hooks:",rt),a.render(V.page.fileName,{global:M,context:V,hooks:rt})):a.render("404",{global:M,context:V});case 40:case"end":return r.stop()}}),r)})),function(){var t=this,e=arguments;return new Promise((function(n,o){var a=r.apply(t,e);function i(t){u(a,n,o,i,c,"next",t)}function c(t){u(a,n,o,i,c,"throw",t)}i(void 0)}))});return function(t,e,r){return n.apply(this,arguments)}}()}},91:(t,e,r)=>{var n=r(757),o=n({parameters:[n.useragent,n.acceptHeaders,n.geoip]});t.exports=function(t,e,r){o(t,e,(function(){r()}))}},93:t=>{var e={};t.exports={getGlobal:function(t,r){var n;return null!==(n=e[t])&&void 0!==n?n:r},setGlobal:function(t,r){e[t]=r}}},985:t=>{var e={};t.exports={getLocales:function(t){return e[t]},setLocales:function(t,r){e[t]=r}}},168:t=>{function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}t.exports=function(t){var r={};return t.split(/,(?![^\(\)]+\))/).forEach((function(t){var n=t.split(";"),o=e(n,1),a=e(o[0].split("="),2),i=a[0],c=a[1];if(i&&c){var u=i.trim(),l=c.trim();r[u]||(r[u]={value:l,attributes:{}});for(var s=1;s<n.length;s++){var p=e(n[s].split("="),2),f=p[0],h=p[1];f&&(r[u].attributes[f.trim()]=!h||h.trim())}}})),r}},926:t=>{t.exports=function(t){var e={language:"ar",path:null},r=t.match(/^\/([a-z]{2})\/(.*)$/);return r?(e.language=r[1],e.path="/".concat(r[2])):(r=t.match(/^\/([a-z]{2})$/))?(e.language=r[1],e.path="/"):e.path=t,e}},413:t=>{t.exports=function(t,e){return e.split(".").reduce((function(t,e){return t&&t[e]}),t)}},915:t=>{t.exports=function(t){return[".jpg",".jpeg",".png",".webp",".gif",".svg",".js",".css",".woff",".woff2",".ttf",".ico"].some((function(e){return t.endsWith(e)}))}},898:t=>{"use strict";t.exports=require("cookie-parser")},38:t=>{"use strict";t.exports=require("dinero.js")},757:t=>{"use strict";t.exports=require("express-fingerprint")},271:t=>{"use strict";t.exports=require("nunjucks")},426:t=>{"use strict";t.exports=require("ua-parser-js")},896:t=>{"use strict";t.exports=require("fs")},928:t=>{"use strict";t.exports=require("path")}},e={},r=function r(n){var o=e[n];if(void 0!==o)return o.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,r),a.exports}(99);module.exports=r})();
|
|
2
|
+
(()=>{var t={863:(t,e,r)=>{var n=r(93).getGlobal;r(38),t.exports={upperCase:function(t){return t.toUpperCase()},reverse:function(t){return t.split("").reverse().join("")},capitalize:function(t){return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()},formatCurrency:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$")+parseFloat(t).toFixed(2)},money:function(t){if(t){var e=n("app").currency;return"".concat(t.toFixed(2)," ").concat(e.currencySymbol)}return"يجب ان يكون رقم"},date:function(t){return new Date(t).toISOString().split("T")[0]},applyDiscount:function(t,e){return t-t*(e/100)},addVAT:function(t){return t+t*((arguments.length>1&&void 0!==arguments[1]?arguments[1]:15)/100)},pluralize:function(t,e,r){return 1===t?e:r},truncate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return t.length>e?t.slice(0,e)+"...":t},trimSpaces:function(t){return t.trim()},isEmpty:function(t){return!t||0===t.trim().length},slugify:function(t){return t.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]+/g,"")},formatNumber:function(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},assets:function(t){return n("assets")+t},cdn:function(t){return n("cdn")},seo:function(){return'<title>متجر تجريبي</title>\n<meta name="description" content="متجر تجريبي - Demo Store">\n<meta name="keywords" content="متجر,تجريبي,-,Demo,Store">\n<meta property="store:published_time" content="2024-08-09T06:03:33+03:00">\n<meta property="og:description" content="متجر تجريبي - Demo Store">\n<meta property="og:title" content="متجر تجريبي">\n<meta property="og:type" content="store">\n<meta property="og:locale" content="ar_AR">\n<meta property=":locale:alternate" content="ar_AR">\n<meta property=":locale:alternate" content="en_US">\n<meta property="og:url" content="https://salla.design/dev-ruj4uvkrq9hz389z">\n<meta property="og:image" content="https://salla-dev.s3.eu-central-1.amazonaws.com/logo/logo-fashion.jpg">\n<meta property="og:image:width" content="600">\n<meta property="og:image:height" content="300">\n<meta name="twitter:description" content="متجر تجريبي - Demo Store">\n<meta name="twitter:image" content="https://salla-dev.s3.eu-central-1.amazonaws.com/logo/logo-fashion.jpg">\n<meta name="twitter:card" content="summary_large_image">\n<meta name="twitter:title" content="متجر تجريبي">\n<meta name="twitter:url" content="https://salla.design/dev-ruj4uvkrq9hz389z">\n<meta name="twitter:site" content="@SallaApp">\n<meta name="twitter:creator" content="@SallaApp">\n<script type="application/ld+json">{"@context":"https://schema.org","@type":"Organization","name":"متجر تجريبي","description":"متجر تجريبي - Demo Store","url":"https://salla.design/dev-ruj4uvkrq9hz389z","logo":"https://salla-dev.s3.eu-central-1.amazonaws.com/logo/logo-fashion.jpg"}<\/script>'}}},908:(t,e,r)=>{var n=r(93),o=n.getGlobal,a=n.setGlobal,i=r(985).getLocales,c=r(413);t.exports={set:function(t,e){a(t,e)},get:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return o(t)||e},t:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=o("lang")||"ar",n=i(r);return n&&c(n,t)||e}}},99:(t,e,r)=>{function n(t){return n="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},n(t)}function o(){"use strict";o=function(){return e};var t,e={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,a=Object.create(o.prototype),c=new q(n||[]);return i(a,"_invoke",{value:k(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var m="suspendedStart",g="suspendedYield",y="executing",d="completed",v={};function w(){}function b(){}function x(){}var j={};p(j,u,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(D([])));S&&S!==r&&a.call(S,u)&&(j=S);var _=x.prototype=w.prototype=Object.create(j);function L(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,p=s.value;return p&&"object"==n(p)&&a.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(p).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var o;i(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}})}function k(e,r,n){var o=m;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=z(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?d:g,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function z(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,z(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,v;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function A(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 P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(a.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(n(e)+" is not iterable")}return b.prototype=x,i(_,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:b,configurable:!0}),b.displayName=p(x,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,p(t,s,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},L(E.prototype),p(E.prototype,l,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(_),p(_,s,"Generator"),p(_,u,(function(){return this})),p(_,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,q.prototype={constructor:q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),l=a.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;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,v):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),v},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),P(r),v}},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 o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){c(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function c(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var l=r(271),s=r(928),p=r(168),f=r(915),h=r(896),m=r(863),g=r(908),y=r(926),d=r(985).setLocales,v=r(93),w=v.setGlobal,b=(v.getGlobal,r(91)),x=r(426),j=r(898);t.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"production";return t.use(j()),t.use(b),function(){var n,a=(n=o().mark((function n(a,c,u){var v,b,j,O,S,_,L,E,k,z,A,P,q,D,G,T,F,U,C,N,I,R,X,$,K,J,W,Y,B,H,M,V,Z,Q,tt,et,rt,nt;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(S=e.viewsDirectory,_=s.join(null!=S?S:null==c||null===(v=c.locals)||void 0===v||null===(v=v.app)||void 0===v?void 0:v.themePath,"views"),L=s.join(null!=S?S:null==c||null===(b=c.locals)||void 0===b||null===(b=b.app)||void 0===b?void 0:b.themePath,"locales"),E=a.originalUrl,k=a.protocol,!f(E)){n.next=7;break}return u(),n.abrupt("return");case 7:for(A in z=l.configure(_,{autoescape:!0,express:t,watch:e.watch||!1,noCache:e.noCache||!1}),m)z.addFilter(A,m[A]);for(P in h.existsSync(L)&&h.statSync(L).isDirectory()?h.readdirSync(L).forEach((function(t){if(t.endsWith(".json")){var e=s.basename(t,".json"),r=s.join(L,t);if(h.existsSync(r)){var n=h.readFileSync(r,"utf-8");d(e,JSON.parse(n))}}})):console.log("المجلد غير موجود أو أنه ليس مجلدًا."),g)z.addGlobal(P,g[P]);return q=y(E),w("lang",q.language),D="".concat(k,"://").concat(a.get("host")).concat(q.path),G=a.headers["x-forwarded-for"]||a.ip,T=a.get("User-Agent")||"",F=a.get("Referer")||"",U=a.get("Accept-Language")||"",C=Intl.DateTimeFormat().resolvedOptions().timeZone||"",N=new x(T),I=N.getDevice(),R=N.getOS(),X=I.type||"desktop",$="".concat(R.name," ").concat(R.version),console.log("🚀 ~ return ~ fullUrl:",D),K="https://api.qumra.cloud/templateEngine/v1/render?path=".concat(encodeURIComponent(D)),J=a.cookies.token,W={Authorization:J,"Content-Type":"application/json",secretKey:null!==(j=null==c||null===(O=c.locals)||void 0===O||null===(O=O.app)||void 0===O?void 0:O.secretKey)&&void 0!==j?j:e.secretKey,fingerprint:a.fingerprint.hash,"User-Agent":T,Referer:F,"X-Forwarded-For":G,"Accept-Language":U,"X-Device-Type":X,"X-OS":$,"X-Timezone":C},Y={headers:W},n.next=31,fetch(K,Y);case 31:return B=n.sent,(H=B.headers.getSetCookie())&&H.forEach((function(t){var e=p(t);Object.keys(e).forEach((function(t){var r=e[t],n=r.value,o=r.attributes;c.cookie(t,n,o)}))})),n.next=36,B.json();case 36:for(Q in M=n.sent,V=M.global,Z=M.context,V)Object.hasOwnProperty.call(V,Q)&&(console.log("🚀 ~ return ~ key:",Q),console.log("🚀 ~ return ~ global[key]:",V[Q]),w(Q,V[Q]));Z.page?(tt=function(t,e){return{content:t,priority:e}},et=function(t){return t.replace(/<script.*?>.*?<\/script>/gi,"")},rt=i({},V),nt={head_scripts:[tt("<script>window.__qumra__ = window.__qumra__ || {}; window.__qumra__.data = ".concat(et(JSON.stringify(i(i({},rt),{},{mode:r}))),";<\/script>"),15)],seo:[tt("<title>".concat(V.app.name,"</title>")),tt('<meta name="description" content="'.concat(V.app.description,'">')),tt('<meta name="keywords" content="متجر,تجريبي,-,Demo,Store">'),tt('<meta property="store:published_time" content="2024-08-09T06:03:33+03:00">'),tt('<meta property="og:description" content="'.concat(V.app.description,'">')),tt('<meta property="og:title" content="'.concat(V.app.name,'">')),tt('<meta property="og:type" content="store">'),tt('<meta property="og:locale" content="ar_AR">'),tt('<meta property=":locale:alternate" content="ar_AR">'),tt('<meta property=":locale:alternate" content="en_US">'),tt('<meta property="og:url" content="https://salla.design/dev-ruj4uvkrq9hz389z">'),tt('<meta property="og:image" content="'.concat(V.app.logoUrl,'">')),tt('<meta property="og:image:width" content="600">'),tt('<meta property="og:image:height" content="300">'),tt('<meta name="twitter:description" content="'.concat(V.app.description,'">')),tt('<meta name="twitter:image" content="'.concat(V.app.logoUrl,'">')),tt('<meta name="twitter:card" content="summary_large_image">'),tt('<meta name="twitter:title" content="'.concat(V.app.name,'">')),tt('<meta name="twitter:url" content="https://salla.design/dev-ruj4uvkrq9hz389z">'),tt('<meta name="twitter:site" content="@SallaApp">'),tt('<meta name="twitter:creator" content="@SallaApp">'),tt('<script type="application/ld+json">{"@context":"https://schema.org","@type":"Organization","name":"'.concat(V.app.name,'","description":"').concat(V.app.description,'","url":"https://salla.design/dev-ruj4uvkrq9hz389z","logo":"').concat(V.app.logoUrl,'"}<\/script>'))]},Object.keys(nt).forEach((function(t){nt[t]=nt[t].sort((function(t,e){return e.priority-t.priority})).map((function(t){return z.renderString(t.content)})).join("")})),console.log("🚀 ~ Object.keys ~ hooks:",nt),c.render(Z.page.fileName,{global:V,context:Z,hooks:nt})):c.render("404",{global:V,context:Z});case 40:case"end":return n.stop()}}),n)})),function(){var t=this,e=arguments;return new Promise((function(r,o){var a=n.apply(t,e);function i(t){u(a,r,o,i,c,"next",t)}function c(t){u(a,r,o,i,c,"throw",t)}i(void 0)}))});return function(t,e,r){return a.apply(this,arguments)}}()}},91:(t,e,r)=>{var n=r(757),o=n({parameters:[n.useragent,n.acceptHeaders,n.geoip]});t.exports=function(t,e,r){o(t,e,(function(){r()}))}},93:t=>{var e={};t.exports={getGlobal:function(t,r){var n;return null!==(n=e[t])&&void 0!==n?n:r},setGlobal:function(t,r){e[t]=r}}},985:t=>{var e={};t.exports={getLocales:function(t){return e[t]},setLocales:function(t,r){e[t]=r}}},168:t=>{function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}t.exports=function(t){var r={};return t.split(/,(?![^\(\)]+\))/).forEach((function(t){var n=t.split(";"),o=e(n,1),a=e(o[0].split("="),2),i=a[0],c=a[1];if(i&&c){var u=i.trim(),l=c.trim();r[u]||(r[u]={value:l,attributes:{}});for(var s=1;s<n.length;s++){var p=e(n[s].split("="),2),f=p[0],h=p[1];f&&(r[u].attributes[f.trim()]=!h||h.trim())}}})),r}},926:t=>{t.exports=function(t){var e={language:"ar",path:null},r=t.match(/^\/([a-z]{2})\/(.*)$/);return r?(e.language=r[1],e.path="/".concat(r[2])):(r=t.match(/^\/([a-z]{2})$/))?(e.language=r[1],e.path="/"):e.path=t,e}},413:t=>{t.exports=function(t,e){return e.split(".").reduce((function(t,e){return t&&t[e]}),t)}},915:t=>{t.exports=function(t){return[".jpg",".jpeg",".png",".webp",".gif",".svg",".js",".css",".woff",".woff2",".ttf",".ico"].some((function(e){return t.endsWith(e)}))}},898:t=>{"use strict";t.exports=require("cookie-parser")},38:t=>{"use strict";t.exports=require("dinero.js")},757:t=>{"use strict";t.exports=require("express-fingerprint")},271:t=>{"use strict";t.exports=require("nunjucks")},426:t=>{"use strict";t.exports=require("ua-parser-js")},896:t=>{"use strict";t.exports=require("fs")},928:t=>{"use strict";t.exports=require("path")}},e={},r=function r(n){var o=e[n];if(void 0!==o)return o.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,r),a.exports}(99);module.exports=r})();
|
package/dist/bundle.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see bundle.esm.js.LICENSE.txt */
|
|
2
|
-
import{createRequire as t}from"node:module";var e={863:(t,e,r)=>{var n=r(93).getGlobal;r(38),t.exports={upperCase:function(t){return t.toUpperCase()},reverse:function(t){return t.split("").reverse().join("")},capitalize:function(t){return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()},formatCurrency:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$")+parseFloat(t).toFixed(2)},money:function(t){if(t){var e=n("app").currency;return"".concat(t.toFixed(2)," ").concat(e.currencySymbol)}return"يجب ان يكون رقم"},date:function(t){return new Date(t).toISOString().split("T")[0]},applyDiscount:function(t,e){return t-t*(e/100)},addVAT:function(t){return t+t*((arguments.length>1&&void 0!==arguments[1]?arguments[1]:15)/100)},pluralize:function(t,e,r){return 1===t?e:r},truncate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return t.length>e?t.slice(0,e)+"...":t},trimSpaces:function(t){return t.trim()},isEmpty:function(t){return!t||0===t.trim().length},slugify:function(t){return t.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]+/g,"")},formatNumber:function(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},assets:function(t){return n("assets")+t},cdn:function(t){return n("cdn")},seo:function(){return'<title>متجر تجريبي</title>\n<meta name="description" content="متجر تجريبي - Demo Store">\n<meta name="keywords" content="متجر,تجريبي,-,Demo,Store">\n<meta property="store:published_time" content="2024-08-09T06:03:33+03:00">\n<meta property="og:description" content="متجر تجريبي - Demo Store">\n<meta property="og:title" content="متجر تجريبي">\n<meta property="og:type" content="store">\n<meta property="og:locale" content="ar_AR">\n<meta property=":locale:alternate" content="ar_AR">\n<meta property=":locale:alternate" content="en_US">\n<meta property="og:url" content="https://salla.design/dev-ruj4uvkrq9hz389z">\n<meta property="og:image" content="https://salla-dev.s3.eu-central-1.amazonaws.com/logo/logo-fashion.jpg">\n<meta property="og:image:width" content="600">\n<meta property="og:image:height" content="300">\n<meta name="twitter:description" content="متجر تجريبي - Demo Store">\n<meta name="twitter:image" content="https://salla-dev.s3.eu-central-1.amazonaws.com/logo/logo-fashion.jpg">\n<meta name="twitter:card" content="summary_large_image">\n<meta name="twitter:title" content="متجر تجريبي">\n<meta name="twitter:url" content="https://salla.design/dev-ruj4uvkrq9hz389z">\n<meta name="twitter:site" content="@SallaApp">\n<meta name="twitter:creator" content="@SallaApp">\n<script type="application/ld+json">{"@context":"https://schema.org","@type":"Organization","name":"متجر تجريبي","description":"متجر تجريبي - Demo Store","url":"https://salla.design/dev-ruj4uvkrq9hz389z","logo":"https://salla-dev.s3.eu-central-1.amazonaws.com/logo/logo-fashion.jpg"}<\/script>'}}},908:(t,e,r)=>{var n=r(93),o=n.getGlobal,a=n.setGlobal,i=r(985).getLocales,c=r(413);t.exports={set:function(t,e){a(t,e)},get:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return o(t)||e},t:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=o("lang")||"ar",n=i(r);return n&&c(n,t)||e}}},99:(t,e,r)=>{function n(t){return n="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},n(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,a=Object.create(o.prototype),c=new D(n||[]);return i(a,"_invoke",{value:k(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var m="suspendedStart",g="suspendedYield",y="executing",v="completed",d={};function w(){}function b(){}function x(){}var j={};p(j,u,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(q([])));S&&S!==r&&a.call(S,u)&&(j=S);var _=x.prototype=w.prototype=Object.create(j);function L(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,p=s.value;return p&&"object"==n(p)&&a.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(p).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var o;i(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}})}function k(e,r,n){var o=m;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=z(c,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?v:g,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function z(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,z(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,d;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function A(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 P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function q(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(a.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(n(e)+" is not iterable")}return b.prototype=x,i(_,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:b,configurable:!0}),b.displayName=p(x,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,p(t,s,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},L(E.prototype),p(E.prototype,l,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(_),p(_,s,"Generator"),p(_,u,(function(){return this})),p(_,"toString",(function(){return"[object Generator]"})),e.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}},e.values=q,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),l=a.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;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),P(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 o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:q(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){c(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function c(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var l=r(271),s=r(928),p=r(168),f=r(915),h=r(896),m=r(863),g=r(908),y=r(926),v=r(985).setLocales,d=r(93),w=d.setGlobal,b=(d.getGlobal,r(91)),x=r(426),j=r(898);t.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.use(j()),t.use(b),function(){var r,n=(r=o().mark((function r(n,a,c){var u,d,b,j,O,S,_,L,E,k,z,A,P,D,q,G,T,F,U,C,N,I,R,X,$,K,J,W,Y,B,H,M,V,Z,Q,tt,et,rt;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(O=e.viewsDirectory,S=s.join(null!=O?O:null==a||null===(u=a.locals)||void 0===u||null===(u=u.app)||void 0===u?void 0:u.themePath,"views"),_=s.join(null!=O?O:null==a||null===(d=a.locals)||void 0===d||null===(d=d.app)||void 0===d?void 0:d.themePath,"locales"),L=n.originalUrl,E=n.protocol,!f(L)){r.next=7;break}return c(),r.abrupt("return");case 7:for(z in k=l.configure(S,{autoescape:!0,express:t,watch:e.watch||!1,noCache:e.noCache||!1}),m)k.addFilter(z,m[z]);for(A in h.existsSync(_)&&h.statSync(_).isDirectory()?h.readdirSync(_).forEach((function(t){if(t.endsWith(".json")){var e=s.basename(t,".json"),r=s.join(_,t);if(h.existsSync(r)){var n=h.readFileSync(r,"utf-8");v(e,JSON.parse(n))}}})):console.log("المجلد غير موجود أو أنه ليس مجلدًا."),g)k.addGlobal(A,g[A]);return P=y(L),w("lang",P.language),D="".concat(E,"://").concat(n.get("host")).concat(P.path),q=n.headers["x-forwarded-for"]||n.ip,G=n.get("User-Agent")||"",T=n.get("Referer")||"",F=n.get("Accept-Language")||"",U=Intl.DateTimeFormat().resolvedOptions().timeZone||"",C=new x(G),N=C.getDevice(),I=C.getOS(),R=N.type||"desktop",X="".concat(I.name," ").concat(I.version),console.log("🚀 ~ return ~ fullUrl:",D),$="https://api.qumra.cloud/templateEngine/v1/render?path=".concat(encodeURIComponent(D)),K=n.cookies.token,J={Authorization:K,"Content-Type":"application/json",secretKey:null!==(b=null==a||null===(j=a.locals)||void 0===j||null===(j=j.app)||void 0===j?void 0:j.secretKey)&&void 0!==b?b:e.secretKey,fingerprint:n.fingerprint.hash,"User-Agent":G,Referer:T,"X-Forwarded-For":q,"Accept-Language":F,"X-Device-Type":R,"X-OS":X,"X-Timezone":U},W={headers:J},r.next=31,fetch($,W);case 31:return Y=r.sent,(B=Y.headers.getSetCookie())&&B.forEach((function(t){var e=p(t);Object.keys(e).forEach((function(t){var r=e[t],n=r.value,o=r.attributes;a.cookie(t,n,o)}))})),r.next=36,Y.json();case 36:for(Z in H=r.sent,M=H.global,V=H.context,M)Object.hasOwnProperty.call(M,Z)&&(console.log("🚀 ~ return ~ key:",Z),console.log("🚀 ~ return ~ global[key]:",M[Z]),w(Z,M[Z]));V.page?(Q=function(t,e){return{content:t,priority:e}},tt=function(t){return t.replace(/<script.*?>.*?<\/script>/gi,"")},et=i({},M),rt={head_scripts:[Q("<script>window.__qumra__ = window.__qumra__ || {}; window.__qumra__.data = ".concat(tt(JSON.stringify(et)),";<\/script>"),15)],seo:[Q("<title>".concat(M.app.name,"</title>")),Q('<meta name="description" content="'.concat(M.app.description,'">')),Q('<meta name="keywords" content="متجر,تجريبي,-,Demo,Store">'),Q('<meta property="store:published_time" content="2024-08-09T06:03:33+03:00">'),Q('<meta property="og:description" content="'.concat(M.app.description,'">')),Q('<meta property="og:title" content="'.concat(M.app.name,'">')),Q('<meta property="og:type" content="store">'),Q('<meta property="og:locale" content="ar_AR">'),Q('<meta property=":locale:alternate" content="ar_AR">'),Q('<meta property=":locale:alternate" content="en_US">'),Q('<meta property="og:url" content="https://salla.design/dev-ruj4uvkrq9hz389z">'),Q('<meta property="og:image" content="'.concat(M.app.logoUrl,'">')),Q('<meta property="og:image:width" content="600">'),Q('<meta property="og:image:height" content="300">'),Q('<meta name="twitter:description" content="'.concat(M.app.description,'">')),Q('<meta name="twitter:image" content="'.concat(M.app.logoUrl,'">')),Q('<meta name="twitter:card" content="summary_large_image">'),Q('<meta name="twitter:title" content="'.concat(M.app.name,'">')),Q('<meta name="twitter:url" content="https://salla.design/dev-ruj4uvkrq9hz389z">'),Q('<meta name="twitter:site" content="@SallaApp">'),Q('<meta name="twitter:creator" content="@SallaApp">'),Q('<script type="application/ld+json">{"@context":"https://schema.org","@type":"Organization","name":"'.concat(M.app.name,'","description":"').concat(M.app.description,'","url":"https://salla.design/dev-ruj4uvkrq9hz389z","logo":"').concat(M.app.logoUrl,'"}<\/script>'))]},Object.keys(rt).forEach((function(t){rt[t]=rt[t].sort((function(t,e){return e.priority-t.priority})).map((function(t){return k.renderString(t.content)})).join("")})),console.log("🚀 ~ Object.keys ~ hooks:",rt),a.render(V.page.fileName,{global:M,context:V,hooks:rt})):a.render("404",{global:M,context:V});case 40:case"end":return r.stop()}}),r)})),function(){var t=this,e=arguments;return new Promise((function(n,o){var a=r.apply(t,e);function i(t){u(a,n,o,i,c,"next",t)}function c(t){u(a,n,o,i,c,"throw",t)}i(void 0)}))});return function(t,e,r){return n.apply(this,arguments)}}()}},91:(t,e,r)=>{var n=r(757),o=n({parameters:[n.useragent,n.acceptHeaders,n.geoip]});t.exports=function(t,e,r){o(t,e,(function(){r()}))}},93:t=>{var e={};t.exports={getGlobal:function(t,r){var n;return null!==(n=e[t])&&void 0!==n?n:r},setGlobal:function(t,r){e[t]=r}}},985:t=>{var e={};t.exports={getLocales:function(t){return e[t]},setLocales:function(t,r){e[t]=r}}},168:t=>{function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}t.exports=function(t){var r={};return t.split(/,(?![^\(\)]+\))/).forEach((function(t){var n=t.split(";"),o=e(n,1),a=e(o[0].split("="),2),i=a[0],c=a[1];if(i&&c){var u=i.trim(),l=c.trim();r[u]||(r[u]={value:l,attributes:{}});for(var s=1;s<n.length;s++){var p=e(n[s].split("="),2),f=p[0],h=p[1];f&&(r[u].attributes[f.trim()]=!h||h.trim())}}})),r}},926:t=>{t.exports=function(t){var e={language:"ar",path:null},r=t.match(/^\/([a-z]{2})\/(.*)$/);return r?(e.language=r[1],e.path="/".concat(r[2])):(r=t.match(/^\/([a-z]{2})$/))?(e.language=r[1],e.path="/"):e.path=t,e}},413:t=>{t.exports=function(t,e){return e.split(".").reduce((function(t,e){return t&&t[e]}),t)}},915:t=>{t.exports=function(t){return[".jpg",".jpeg",".png",".webp",".gif",".svg",".js",".css",".woff",".woff2",".ttf",".ico"].some((function(e){return t.endsWith(e)}))}},898:t=>{t.exports=require("cookie-parser")},38:t=>{t.exports=require("dinero.js")},757:t=>{t.exports=require("express-fingerprint")},271:t=>{t.exports=require("nunjucks")},426:t=>{t.exports=require("ua-parser-js")},896:e=>{e.exports=t(import.meta.url)("fs")},928:e=>{e.exports=t(import.meta.url)("path")}},r={};!function t(n){var o=r[n];if(void 0!==o)return o.exports;var a=r[n]={exports:{}};return e[n](a,a.exports,t),a.exports}(99);
|
|
2
|
+
import{createRequire as t}from"node:module";var e={863:(t,e,r)=>{var n=r(93).getGlobal;r(38),t.exports={upperCase:function(t){return t.toUpperCase()},reverse:function(t){return t.split("").reverse().join("")},capitalize:function(t){return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()},formatCurrency:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$")+parseFloat(t).toFixed(2)},money:function(t){if(t){var e=n("app").currency;return"".concat(t.toFixed(2)," ").concat(e.currencySymbol)}return"يجب ان يكون رقم"},date:function(t){return new Date(t).toISOString().split("T")[0]},applyDiscount:function(t,e){return t-t*(e/100)},addVAT:function(t){return t+t*((arguments.length>1&&void 0!==arguments[1]?arguments[1]:15)/100)},pluralize:function(t,e,r){return 1===t?e:r},truncate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return t.length>e?t.slice(0,e)+"...":t},trimSpaces:function(t){return t.trim()},isEmpty:function(t){return!t||0===t.trim().length},slugify:function(t){return t.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]+/g,"")},formatNumber:function(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},assets:function(t){return n("assets")+t},cdn:function(t){return n("cdn")},seo:function(){return'<title>متجر تجريبي</title>\n<meta name="description" content="متجر تجريبي - Demo Store">\n<meta name="keywords" content="متجر,تجريبي,-,Demo,Store">\n<meta property="store:published_time" content="2024-08-09T06:03:33+03:00">\n<meta property="og:description" content="متجر تجريبي - Demo Store">\n<meta property="og:title" content="متجر تجريبي">\n<meta property="og:type" content="store">\n<meta property="og:locale" content="ar_AR">\n<meta property=":locale:alternate" content="ar_AR">\n<meta property=":locale:alternate" content="en_US">\n<meta property="og:url" content="https://salla.design/dev-ruj4uvkrq9hz389z">\n<meta property="og:image" content="https://salla-dev.s3.eu-central-1.amazonaws.com/logo/logo-fashion.jpg">\n<meta property="og:image:width" content="600">\n<meta property="og:image:height" content="300">\n<meta name="twitter:description" content="متجر تجريبي - Demo Store">\n<meta name="twitter:image" content="https://salla-dev.s3.eu-central-1.amazonaws.com/logo/logo-fashion.jpg">\n<meta name="twitter:card" content="summary_large_image">\n<meta name="twitter:title" content="متجر تجريبي">\n<meta name="twitter:url" content="https://salla.design/dev-ruj4uvkrq9hz389z">\n<meta name="twitter:site" content="@SallaApp">\n<meta name="twitter:creator" content="@SallaApp">\n<script type="application/ld+json">{"@context":"https://schema.org","@type":"Organization","name":"متجر تجريبي","description":"متجر تجريبي - Demo Store","url":"https://salla.design/dev-ruj4uvkrq9hz389z","logo":"https://salla-dev.s3.eu-central-1.amazonaws.com/logo/logo-fashion.jpg"}<\/script>'}}},908:(t,e,r)=>{var n=r(93),o=n.getGlobal,a=n.setGlobal,i=r(985).getLocales,c=r(413);t.exports={set:function(t,e){a(t,e)},get:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return o(t)||e},t:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=o("lang")||"ar",n=i(r);return n&&c(n,t)||e}}},99:(t,e,r)=>{function n(t){return n="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},n(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,a=Object.create(o.prototype),c=new D(n||[]);return i(a,"_invoke",{value:k(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var m="suspendedStart",g="suspendedYield",y="executing",d="completed",v={};function w(){}function b(){}function x(){}var j={};p(j,u,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(q([])));S&&S!==r&&a.call(S,u)&&(j=S);var _=x.prototype=w.prototype=Object.create(j);function L(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,p=s.value;return p&&"object"==n(p)&&a.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(p).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var o;i(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}})}function k(e,r,n){var o=m;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=z(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?d:g,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function z(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,z(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,v;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function A(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 P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function q(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(a.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(n(e)+" is not iterable")}return b.prototype=x,i(_,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:b,configurable:!0}),b.displayName=p(x,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,p(t,s,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},L(E.prototype),p(E.prototype,l,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(_),p(_,s,"Generator"),p(_,u,(function(){return this})),p(_,"toString",(function(){return"[object Generator]"})),e.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}},e.values=q,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),l=a.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;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,v):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),v},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),P(r),v}},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 o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:q(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){c(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function c(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var l=r(271),s=r(928),p=r(168),f=r(915),h=r(896),m=r(863),g=r(908),y=r(926),d=r(985).setLocales,v=r(93),w=v.setGlobal,b=(v.getGlobal,r(91)),x=r(426),j=r(898);t.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"production";return t.use(j()),t.use(b),function(){var n,a=(n=o().mark((function n(a,c,u){var v,b,j,O,S,_,L,E,k,z,A,P,D,q,G,T,F,U,C,N,I,R,X,$,K,J,W,Y,B,H,M,V,Z,Q,tt,et,rt,nt;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(S=e.viewsDirectory,_=s.join(null!=S?S:null==c||null===(v=c.locals)||void 0===v||null===(v=v.app)||void 0===v?void 0:v.themePath,"views"),L=s.join(null!=S?S:null==c||null===(b=c.locals)||void 0===b||null===(b=b.app)||void 0===b?void 0:b.themePath,"locales"),E=a.originalUrl,k=a.protocol,!f(E)){n.next=7;break}return u(),n.abrupt("return");case 7:for(A in z=l.configure(_,{autoescape:!0,express:t,watch:e.watch||!1,noCache:e.noCache||!1}),m)z.addFilter(A,m[A]);for(P in h.existsSync(L)&&h.statSync(L).isDirectory()?h.readdirSync(L).forEach((function(t){if(t.endsWith(".json")){var e=s.basename(t,".json"),r=s.join(L,t);if(h.existsSync(r)){var n=h.readFileSync(r,"utf-8");d(e,JSON.parse(n))}}})):console.log("المجلد غير موجود أو أنه ليس مجلدًا."),g)z.addGlobal(P,g[P]);return D=y(E),w("lang",D.language),q="".concat(k,"://").concat(a.get("host")).concat(D.path),G=a.headers["x-forwarded-for"]||a.ip,T=a.get("User-Agent")||"",F=a.get("Referer")||"",U=a.get("Accept-Language")||"",C=Intl.DateTimeFormat().resolvedOptions().timeZone||"",N=new x(T),I=N.getDevice(),R=N.getOS(),X=I.type||"desktop",$="".concat(R.name," ").concat(R.version),console.log("🚀 ~ return ~ fullUrl:",q),K="https://api.qumra.cloud/templateEngine/v1/render?path=".concat(encodeURIComponent(q)),J=a.cookies.token,W={Authorization:J,"Content-Type":"application/json",secretKey:null!==(j=null==c||null===(O=c.locals)||void 0===O||null===(O=O.app)||void 0===O?void 0:O.secretKey)&&void 0!==j?j:e.secretKey,fingerprint:a.fingerprint.hash,"User-Agent":T,Referer:F,"X-Forwarded-For":G,"Accept-Language":U,"X-Device-Type":X,"X-OS":$,"X-Timezone":C},Y={headers:W},n.next=31,fetch(K,Y);case 31:return B=n.sent,(H=B.headers.getSetCookie())&&H.forEach((function(t){var e=p(t);Object.keys(e).forEach((function(t){var r=e[t],n=r.value,o=r.attributes;c.cookie(t,n,o)}))})),n.next=36,B.json();case 36:for(Q in M=n.sent,V=M.global,Z=M.context,V)Object.hasOwnProperty.call(V,Q)&&(console.log("🚀 ~ return ~ key:",Q),console.log("🚀 ~ return ~ global[key]:",V[Q]),w(Q,V[Q]));Z.page?(tt=function(t,e){return{content:t,priority:e}},et=function(t){return t.replace(/<script.*?>.*?<\/script>/gi,"")},rt=i({},V),nt={head_scripts:[tt("<script>window.__qumra__ = window.__qumra__ || {}; window.__qumra__.data = ".concat(et(JSON.stringify(i(i({},rt),{},{mode:r}))),";<\/script>"),15)],seo:[tt("<title>".concat(V.app.name,"</title>")),tt('<meta name="description" content="'.concat(V.app.description,'">')),tt('<meta name="keywords" content="متجر,تجريبي,-,Demo,Store">'),tt('<meta property="store:published_time" content="2024-08-09T06:03:33+03:00">'),tt('<meta property="og:description" content="'.concat(V.app.description,'">')),tt('<meta property="og:title" content="'.concat(V.app.name,'">')),tt('<meta property="og:type" content="store">'),tt('<meta property="og:locale" content="ar_AR">'),tt('<meta property=":locale:alternate" content="ar_AR">'),tt('<meta property=":locale:alternate" content="en_US">'),tt('<meta property="og:url" content="https://salla.design/dev-ruj4uvkrq9hz389z">'),tt('<meta property="og:image" content="'.concat(V.app.logoUrl,'">')),tt('<meta property="og:image:width" content="600">'),tt('<meta property="og:image:height" content="300">'),tt('<meta name="twitter:description" content="'.concat(V.app.description,'">')),tt('<meta name="twitter:image" content="'.concat(V.app.logoUrl,'">')),tt('<meta name="twitter:card" content="summary_large_image">'),tt('<meta name="twitter:title" content="'.concat(V.app.name,'">')),tt('<meta name="twitter:url" content="https://salla.design/dev-ruj4uvkrq9hz389z">'),tt('<meta name="twitter:site" content="@SallaApp">'),tt('<meta name="twitter:creator" content="@SallaApp">'),tt('<script type="application/ld+json">{"@context":"https://schema.org","@type":"Organization","name":"'.concat(V.app.name,'","description":"').concat(V.app.description,'","url":"https://salla.design/dev-ruj4uvkrq9hz389z","logo":"').concat(V.app.logoUrl,'"}<\/script>'))]},Object.keys(nt).forEach((function(t){nt[t]=nt[t].sort((function(t,e){return e.priority-t.priority})).map((function(t){return z.renderString(t.content)})).join("")})),console.log("🚀 ~ Object.keys ~ hooks:",nt),c.render(Z.page.fileName,{global:V,context:Z,hooks:nt})):c.render("404",{global:V,context:Z});case 40:case"end":return n.stop()}}),n)})),function(){var t=this,e=arguments;return new Promise((function(r,o){var a=n.apply(t,e);function i(t){u(a,r,o,i,c,"next",t)}function c(t){u(a,r,o,i,c,"throw",t)}i(void 0)}))});return function(t,e,r){return a.apply(this,arguments)}}()}},91:(t,e,r)=>{var n=r(757),o=n({parameters:[n.useragent,n.acceptHeaders,n.geoip]});t.exports=function(t,e,r){o(t,e,(function(){r()}))}},93:t=>{var e={};t.exports={getGlobal:function(t,r){var n;return null!==(n=e[t])&&void 0!==n?n:r},setGlobal:function(t,r){e[t]=r}}},985:t=>{var e={};t.exports={getLocales:function(t){return e[t]},setLocales:function(t,r){e[t]=r}}},168:t=>{function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}t.exports=function(t){var r={};return t.split(/,(?![^\(\)]+\))/).forEach((function(t){var n=t.split(";"),o=e(n,1),a=e(o[0].split("="),2),i=a[0],c=a[1];if(i&&c){var u=i.trim(),l=c.trim();r[u]||(r[u]={value:l,attributes:{}});for(var s=1;s<n.length;s++){var p=e(n[s].split("="),2),f=p[0],h=p[1];f&&(r[u].attributes[f.trim()]=!h||h.trim())}}})),r}},926:t=>{t.exports=function(t){var e={language:"ar",path:null},r=t.match(/^\/([a-z]{2})\/(.*)$/);return r?(e.language=r[1],e.path="/".concat(r[2])):(r=t.match(/^\/([a-z]{2})$/))?(e.language=r[1],e.path="/"):e.path=t,e}},413:t=>{t.exports=function(t,e){return e.split(".").reduce((function(t,e){return t&&t[e]}),t)}},915:t=>{t.exports=function(t){return[".jpg",".jpeg",".png",".webp",".gif",".svg",".js",".css",".woff",".woff2",".ttf",".ico"].some((function(e){return t.endsWith(e)}))}},898:t=>{t.exports=require("cookie-parser")},38:t=>{t.exports=require("dinero.js")},757:t=>{t.exports=require("express-fingerprint")},271:t=>{t.exports=require("nunjucks")},426:t=>{t.exports=require("ua-parser-js")},896:e=>{e.exports=t(import.meta.url)("fs")},928:e=>{e.exports=t(import.meta.url)("path")}},r={};!function t(n){var o=r[n];if(void 0!==o)return o.exports;var a=r[n]={exports:{}};return e[n](a,a.exports,t),a.exports}(99);
|