@nextcss/nextcss
Advanced tools
Comparing version 0.2.7 to 0.2.8
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function n(){n=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},c="function"==typeof Symbol?Symbol:{},a=c.iterator||"@@iterator",i=c.asyncIterator||"@@asyncIterator",u=c.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function f(t,e,n,r){var c=e&&e.prototype instanceof p?e:p,a=Object.create(c.prototype),i=new E(r||[]);return o(a,"_invoke",{value:$(t,n,i)}),a}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function h(){}function v(){}var m={};l(m,a,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(N([])));g&&g!==e&&r.call(g,a)&&(m=g);var b=v.prototype=p.prototype=Object.create(m);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,c,a,i){var u=s(t[o],t,c);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,i)}),(function(t){n("throw",t,a,i)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,i)}))}i(u.arg)}var c;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return c=c?c.then(o,o):o()}})}function $(t,e,n){var r="suspendedStart";return function(o,c){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw c;return L()}for(n.method=o,n.arg=c;;){var a=n.delegate;if(a){var i=k(a,n);if(i){if(i===d)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=s(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function k(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=s(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,d;var o=r.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 S(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function N(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,o=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 o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=v,o(b,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:h,configurable:!0}),h.displayName=l(v,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(x.prototype),l(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,n,r,o,c){void 0===c&&(c=Promise);var a=new x(f(e,n,r,o),c);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),l(b,u,"Generator"),l(b,a,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=N,E.prototype={constructor:E,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(j),!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(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var c=this.tryEntries[o],a=c.completion;if("root"===c.tryLoc)return n("end");if(c.tryLoc<=this.prev){var i=r.call(c,"catchLoc"),u=r.call(c,"finallyLoc");if(i&&u){if(this.prev<c.catchLoc)return n(c.catchLoc,!0);if(this.prev<c.finallyLoc)return n(c.finallyLoc)}else if(i){if(this.prev<c.catchLoc)return n(c.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return n(c.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var c=o;break}}c&&("break"===t||"continue"===t)&&c.tryLoc<=e&&e<=c.finallyLoc&&(c=null);var a=c?c.completion:{};return a.type=t,a.arg=e,c?(this.method="next",this.next=c.finallyLoc,d):this.complete(a)},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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:N(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function r(t){return r="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},r(t)}function o(t,e,n,r,o,c,a){try{var i=t[c](a),u=i.value}catch(t){return void n(t)}i.done?e(u):Promise.resolve(u).then(r,o)}function c(t){return function(){var e=this,n=arguments;return new Promise((function(r,c){var a=t.apply(e,n);function i(t){o(a,r,c,i,u,"next",t)}function u(t){o(a,r,c,i,u,"throw",t)}i(void 0)}))}}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,c=[],a=!0,i=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(c.push(r.value),!e||c.length!==e);a=!0);}catch(t){i=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(i)throw o}}return c}(t,e)||l(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 u(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||l(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){if(t){if("string"==typeof t)return f(t,e);var n=Object.prototype.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)?f(t,e):void 0}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var s=[],d="SAVE",p="CLEAN",h=function(t){return m(t,d)},v=function(t){return m(t,p)},m=function(t,e){t&&e&&("object"===r(t)&&(t="baseVal"in t?t.baseVal:""),t.split(" ").forEach((function(t){if(t){var n=s.find((function(e){return e.className===t}));if(n)e===d&&n.count++,e===p&&n.count--;else if(e===d){var r=_(t),o=r.style,c=r.proc;o&&s.push({className:t,style:o,proc:c,count:1})}}})))},y=function(t){return t.match(/#?([0-9a-f]{1,2})([0-9a-f]{1,2})([0-9a-f]{1,2})/i).slice(1).map((function(t){return parseInt(t.padStart(2,t),16)}))},g=function(t){return Math.min(255,Math.max(0,Math.round(t)))},b=[-90,-80,-60,-40,-20,0,15,30,45,60],w=function(t){var e={black:"#000000",white:"#ffffff"};return Object.keys(t).forEach((function(n){b.forEach((function(r,o){var c=t[n],a=100*o||50,i="".concat(n,"-").concat(a);e[i]=function(t,e){var n=y(t);return(e/=100)<0?(e=Math.abs(e),n.forEach((function(t,n,r){return r[n]=g(t+(255-t)*e)}))):n.forEach((function(t,n,r){return r[n]=g(t-t*e)})),"#"+n.map((function(t){return t.toString(16).padStart(2,"0")})).join("")}(c,r)}))})),e},x={material:w({red:"#f44336",pink:"#e91e63",purple:"#9c27b0","deep-purple":"#673ab7",indigo:"#3f51b5",blue:"#2196f3","light-blue":"#03a9f4",cyan:"#00bcd4",teal:"#009688",green:"#4caf50","light-green":"#8bc34a",lime:"#cddc39",yellow:"#ffeb3b",amber:"#ffc107",orange:"#ff9800","deep-orange":"#ff5722",brown:"#795548","light-grey":"#9e9e9e",grey:"#575757","blue-grey":"#607d8b"}),tailwind:w({slate:"#64748b",grey:"#6b7280",zinc:"#71717a",neutral:"#737373",stone:"#78716c",red:"#ef4444",orange:"#f97316",amber:"#f59e0b",yellow:"#eab308",lime:"#84cc16",green:"#22c55e",emerald:"#10b981",teal:"#14b8a6",cyan:"#06b6d4",sky:"#0ea5e9",blue:"#3b82f6",indigo:"#6366f1",violet:"#8b5cf6",purple:"#a855f7",fuchsia:"#d946ef",pink:"#ec4899",rose:"#f43f5e"})},$={merged:!1,debug:!1,useStyleNode:!1,skipResetStyles:!1,skipRemUnits:!1,palette:"material",breakpoints:{sm:390,md:768,lg:1024,xl:1400},conatiners:{xs:480,sm:640,md:768,lg:1024,xl:1280}},k=e({},$),S=function(){return e({},k)},j=function(t){if(!k.merged&&"object"===r(t)){for(var e in t)e in $&&(r(k[e])===r(t[e])?k[e]=t[e]:console.warn("Config conflict: [".concat(e,"] should be ").concat(r(k[e])," type!")));var n=k.palette,o=k.debug;"object"===r(null==t?void 0:t.colors)&&(o&&console.log("Merge color palette...",{palette:n,colors:t.colors}),function(t,e){var n=w(e);Object.keys(n).forEach((function(e){x[t][e]=n[e]}))}(n,t.colors)),k.merged=!0,o&&console.log("Config merged",k)}return k},E=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}).compare,N=function(t){return Math.round(parseFloat(t)/16*1e3)/1e3+"rem"},L=function(t){return t.replace(/\s+/gm," ").replace(/\s*({|}|:|;|>)\s*/gm,"$1").replace(/\(\s(.*?)\s\)/gm,"($1)").replace(";}","}").replace(/([:\s])(-?0[\w]+)/gm,"$10").trim()},O=function(t){return{w:"width",h:"height",p:"padding",m:"margin",b:"border",r:"border-radius",fg:"color",bg:"background-color"}[t]||""},C=function(t){return{t:"-top",r:"-right",b:"-bottom",l:"-left"}[t]||""},A=[],P={reverseBreakpoint:!1},M=function(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:P;try{t=new RegExp(t)}catch(t){console.error(t)}t&&"function"==typeof n&&o&&"object"===r(o)?A.push({pattern:t,fn:n,options:e(e({},P),o)}):console.error("Declared register is not correct!",{pattern:t,fn:n,options:o})},I=function(t,e){var n=t.pattern,r=t.fn;t.options;var o=e.match(n);return!!o&&r(o)},_=function(t){var e="",n=null;return A.forEach((function(r,o){var c=I(r,t);if(c)return e=L(c),void(n=o)})),{style:e,proc:n}},T=function(){var t,e,n,r=s.sort((function(t,e){return t.proc-e.proc||E(t.className,e.className)})).filter((function(t){return t.count})).map((function(t){return t.style})).join("").match(/(.*?{+.*?}+)/gm)||[];return e=[],n=[],(t=r).forEach((function(r,o){/:hover\{/.test(r)&&(e.push(r),delete t[o]),/:active\{/.test(r)&&(n.push(r),delete t[o])})),e.concat(n).forEach((function(e){return t.push(e)})),function(t){var e={},n=[];t.forEach((function(n,r){var o=n.match(/(@media.*?){(.*?})}/);if(o){var c,a=i(o,3),u=a[1],l=a[2];(c=e)[u]||(c[u]=[]),e[u].push(l),delete t[r]}})),Object.entries(e).forEach((function(t){var e=i(t,2),r=e[0],o=e[1];return n.push("".concat(r,"{").concat(o.join(""),"}"))})),n.sort(E).forEach((function(e){return t.push(e)})),e=n=[]}(r),r.join("")},z=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=S(),r=n.palette,o=x[r][t]||"";if(e&&7===o.length){var c=y(o),a=i(c,3),u=a[0],l=a[1],f=a[2];return"rgba(".concat(u," ").concat(l," ").concat(f," / ").concat(e,"%)")}return o};M(/^(block|flex|inline|inline-block|inline-flex)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { display: ").concat(r," }")})),M(/^(static|relative|absolute|fixed|sticky)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { position: ").concat(r," }")})),M(/^(-)?(top|right|bottom|left)-(\d+)$/,(function(t){var e=i(t,4),n=e[0],r=e[1],o=e[2],c=e[3],a=r?-c:c;return".".concat(n," { ").concat(o,": ").concat(a,"px }")})),M(/^(box)-(border|content)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2];return".".concat(n," { box-sizing: ").concat(o,"-").concat(r," }")})),M(/^(float|clear)-(left|right|both|none)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2];return("float"!==r||"both"!==o)&&".".concat(n," { ").concat(r,": ").concat(o," }")})),M(/^show$/,(function(t){var e=i(t,1)[0];return".".concat(e," { display: none !important }")}),{reverseBreakpoint:!0}),M(/^hide$/,(function(t){var e=i(t,1)[0];return".".concat(e," { display: none !important }")})),M(/^fit$/,(function(t){var e=i(t,1)[0];return".".concat(e," { width: 100%; height: 100% }")})),M(/^fit-([wh])$/,(function(t){var e=i(t,2),n=e[0],r=e[1],o=O(r);return".".concat(n," { ").concat(o,": 100% }")})),M(/^fit-(contain|cover|fill|scale-down|none)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { object-fit: ").concat(r," }")})),M(/^object-(center|top|right|bottom|left)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { object-position: ").concat(r," }")})),M(/^text-(left|center|right|justify)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { text-align: ").concat(r," }")})),M(/^(uppercase|lowercase|capitalize|no-transform)$/,(function(t){var e=i(t,2),n=e[0],r=e[1],o="no-transform"===r?"none":r;return".".concat(n," { text-transform: ").concat(o," }")})),M(/^(underline|line-through|no-decoration)$/,(function(t){var e=i(t,2),n=e[0],r=e[1],o="no-decoration"===r?"none":r;return".".concat(n," { text-decoration: ").concat(o," }")})),M(/^fs-(\d+)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { font-size: ").concat(r,"px }")})),M(/^fw-([1-9]00|bold|bolder|ligher|normal)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { font-weight: ").concat(r," }")})),M(/^lh-([\d.]+)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n.replace(/\./,"\\.")," { line-height: ").concat(r," }")})),M(/^(-)?z-(\d+)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2],c=r?-o:o;return".".concat(n," { z-index: ").concat(c," }")})),M(/^pointer-(none|auto|all)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { pointer-events: ").concat(r," }")})),M(/^cursor-(pointer|default|auto)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { cursor: ").concat(r," }")})),M(/^of(-[xy])?-(auto|hidden|scroll)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2],c=r||"";return".".concat(n," { overflow").concat(c,": ").concat(o," }")})),M(/^of(-[xy])?-(overlay)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2],c=r||"";return".".concat(n," { overflow").concat(c,": auto; overflow").concat(c,": ").concat(o," }")})),M(/^([wh])-(auto|\d+)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2],c=O(r[0]),a=C(r[1]),u=isNaN(o)?o:o+"px";return".".concat(n," { ").concat(c).concat(a,": ").concat(u," }")})),M(/^([wh])-(\d+)\/(\d+)$/,(function(t){var e=i(t,4),n=e[0],r=e[1],o=e[2],c=e[3],a=O(r);return!(parseInt(c)>parseInt(o))&&".".concat(n.replace(/\//,"\\/")," { ").concat(a,": calc( 100%/(").concat(o,"/").concat(c,") )}")})),M(/^(p[trbl]?|r)-(\d+)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2],c=O(r[0]),a=C(r[1]);return".".concat(n," { ").concat(c).concat(a,": ").concat(o,"px }")})),M(/^(-)?(m[trbl]?)-(auto|\d+)$/,(function(t){var e=i(t,4),n=e[0],r=e[1],o=e[2],c=e[3],a=O(o[0]),u=C(o[1]),l=isNaN(c)?c:(r?-c:c)+"px";return(!r||!isNaN(c))&&".".concat(n," { ").concat(a).concat(u,": ").concat(l," }")})),M(/^(b[trbl]?)-(\d+)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2],c=O(r[0]),a=C(r[1]);return".".concat(n," { ").concat(c).concat(a,"-width: ").concat(o,"px; ").concat(c).concat(a,"-style: solid }")})),M(/^(b[trbl]?)-(solid|dashed|dotted|double|groove|inset|none|outset|ridge)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2],c=O(r[0]),a=C(r[1]);return".".concat(n," { ").concat(c).concat(a,"-style: ").concat(o," }")})),M(/^b-(collapse|separate)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { border-collapse: ").concat(r," }")})),M(/^(-)?([pm][xy])-(auto|\d+)$/,(function(t){var e=i(t,4),n=e[0],r=e[1],o=e[2],c=e[3],a=O(o[0]),u=isNaN(c)?c:(r?-c:c)+"px",l="y"===o[1]?"top":"left",f="y"===o[1]?"bottom":"right";return!(r&&"auto"===c||"auto"===c&&"margin"!==a)&&".".concat(n," { ").concat(a,"-").concat(l,": ").concat(u,"; ").concat(a,"-").concat(f,": ").concat(u," }")})),M(/^flex-(wrap|wrap-reverse|nowrap)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { flex-wrap: ").concat(r," }")})),M(/^flex-(row|row-reverse|column|column-reverse)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { flex-direction: ").concat(r," }")})),M(/^flex-(auto|[01])$/,(function(t){var e=i(t,2),n=e[0],r=e[1],o="auto"===r?"1 1 auto":"0"===r?"0 0 auto":"1 1 0%";return".".concat(n," { flex: ").concat(o," }")})),M(/^flex-(grow|shrink)-([01])$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2];return".".concat(n," { flex-").concat(r,": ").concat(o," }")})),M(/^justify-(start|end)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { justify-content: flex-").concat(r," }")})),M(/^justify-(around|between|evenly)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { justify-content: space-").concat(r," }")})),M(/^justify-center$/,(function(t){var e=i(t,1)[0];return".".concat(e," { justify-content: center }")})),M(/^align-(start|end)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { align-items: flex-").concat(r," }")})),M(/^align-(center|stretch)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { align-items: ").concat(r," }")})),M(/^(-)?order-(\d+)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2],c=r?-o:o;return".".concat(n," { order: ").concat(c," }")})),M(/^container-(\w+)$/,(function(t){var e,n,r=i(t,2),o=r[0],c=r[1],a=(e=c,null===(n=S().conatiners)||void 0===n?void 0:n[e]);return!!a&&".".concat(o," { width: 100%; max-width: ").concat(a,"px; margin: auto }")})),M(/^gap-(\d+)$/,(function(t){var e=i(t,2),n=e[0],r=e[1]/2;return".".concat(n," { margin: -").concat(r,"px } .").concat(n," > * { padding: ").concat(r,"px }")})),M(/^(-)?s([xy])-(\d+)(-reverse)?$/,(function(t){var e=i(t,5),n=e[0],r=e[1],o=e[2],c=e[3],a=e[4],u=r?-c:c,l="x"===o?a?"right":"left":a?"bottom":"top";return".".concat(n," > :not(:first-child) { margin-").concat(l,": ").concat(u,"px }")})),M(/^text-trim(-all)?$/,(function(t){var e=i(t,2),n=e[0],r=e[1]?"":">";return".".concat(n,", .").concat(n," ").concat(r," * { min-width: 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden }")})),M(/^([fb]g)-(black|white|([\w-]+\d+))(\/(\d+))?$/,(function(t){var e=i(t,6),n=e[0],r=e[1],o=e[2],c=e[5],a=O(r),u=z(o,c);return!(!a||!u)&&".".concat(n.replace(/\//,"\\/")," { ").concat(a,": ").concat(u," }")})),M(/^b-(black|white|([\w-]+\d+))(\/(\d+))?$/,(function(t){var e=i(t,5),n=e[0],r=e[1],o=e[4],c=z(r,o);return!!c&&".".concat(n.replace(/\//,"\\/")," { border-color: ").concat(c," }")}));var F,D=["hover","active","focus"],G=[].concat(D,["every","odd","even","first","last"],["dark"]);"function"==typeof(F=function(t,e){var n=t.pattern,r=t.fn,o=t.options.reverseBreakpoint,c=e.split(":"),a=c.pop().match(n);if(!a)return!1;var i=Object.keys(S().breakpoints),u=o?"max-width":"min-width",l=!1,f=!1,s="",d="";if(c.forEach((function(t){if(!G.includes(t)&&!i.includes(t))return v(e),f=!0,!1;var n,r;l||(n=t,l=(null===(r=S().breakpoints)||void 0===r?void 0:r[n])||!1),D.includes(t)&&(d+=":"+t)})),f)return!1;if(!(s=r(a,c)))return!1;if(c.length){var p=c.join("\\:");s=s.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,".".concat(p,"\\:$1$2")).replace(/:\s*\./gm,":")}if(c.forEach((function(t){"every"===t&&(s=s.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,"$1 > * $2")),"odd"===t&&(s=s.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,"$1 > :nth-child(odd) $2")),"even"===t&&(s=s.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,"$1 > :nth-child(even) $2")),"first"===t&&(s=s.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,"$1 > :first-child $2")),"last"===t&&(s=s.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,"$1 > :last-child $2"))})),c.includes("dark")&&(s=".dark ".concat(s)),d&&(s=s.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,"$1".concat(d,"$2"))),c.includes("hover")){var h=s.replace(/:hover\{/g,":active{");s="@media (hover: hover) and (pointer: fine) { ".concat(s," }")+h}return l&&(o&&l--,s="@media screen and (".concat(u,": ").concat(l,"px) { ").concat(s," }")),s})&&(I=F);var R="CLEAN",B=function(t){return U(t,"SAVE")},H=function(t){return U(t,R)},U=function(){var t=c(n().mark((function t(e,r){var o,c;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!at(e)&&r){t.next=2;break}return t.abrupt("return");case 2:o=r===R?v:h,"svg"===e.nodeName?o(e.className):(c=V(e),o(c));case 4:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),V=function(t){var e=t.outerHTML.matchAll(/class="(.*?)"/gm),n=[];return Array.from(e).forEach((function(t){return n.push(t[1])})),n.join(" ")},q=document.createDocumentFragment(),Y=document.createDocumentFragment(),J=document.querySelector("head"),K=document.createElement("style"),Q=document.createElement("style"),W=document.createElement("link"),X=document.createElement("link"),Z=function(t){return!!t.isConnected&&J.removeChild(t)},tt=function(t){return t?"data:text/css;base64,"+btoa(t):""};W.rel=X.rel="stylesheet";var et=function(){var t=S(),e=t.useStyleNode,n=t.skipRemUnits,r=t.debug,o=T()||"",c=!1;if(n||(o=o.replace(/(\d*\.?\d+)px/g,(function(t,e){return N(e)}))),e)K.innerHTML!==o&&(K.innerHTML=o,c=!0);else{var a=tt(o);W.href!==a&&(W.href=a,c=!0)}if(c){!function(){var t,e=S(),n=e.useStyleNode,r=e.skipResetStyles,o=e.skipRemUnits,c=e.debug;if(r?(Z(X),Z(Q)):t||(t=L(":root{line-height:1.4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji';-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;}*,:before,:after{box-sizing:border-box;outline:none;-webkit-user-drag:none;touch-action:pan-x pan-y;}body{margin:0;max-width:100vw;overscroll-behavior:none;}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;}h1,h2,h3,h4,h5,h6,p{margin:0;font:inherit;}small{font-size:85%;}a{color:inherit;text-decoration:none;}button{font:inherit;line-height:1;cursor:pointer;background-color:inherit;border:0;color:inherit;padding:0;}img,svg{display:block;max-width:100%;height:auto;border:none;}input,textarea,select{font:inherit;font-size:16px;border:0;border-radius:0;background-clip:padding-box;color:inherit;background-color:transparent;}textarea{resize:none;}::placeholder{font-size:14px;}label{display:block;}fieldset{border:1px solid;}ul,ol{margin:0;padding:0;list-style-type:none;}hr{border:none;border-bottom:1px solid;}table{border-spacing:0;border-collapse:collapse;}th{font-weight:inherit;}iframe{border:0;}menu{margin:0;padding:0;}form,figure,pre,blockquote,dl,dd{margin:0;}address{font:inherit;}"),o&&(t=t.replace(/(\d*\.?\d+)px/g,(function(t,e){return N(e)})))),n){if(Z(q),r||Q.isConnected||(Q.innerHTML!==t&&(Q.innerHTML=t),Y.appendChild(Q),c&&console.log("Append StyleNode (reset)")),K.isConnected||(Y.appendChild(K),c&&console.log("Append StyleNode (main)")),!Y.isConnected){var a=J.querySelector("style");a?J.insertBefore(Y,a):J.appendChild(q)}}else{if(Z(Y),!r&&!X.isConnected){var i=tt(t);(X.href=i)&&(X.href=i),q.appendChild(X),c&&console.log("Append LinkNode (reset)")}if(W.isConnected||(q.appendChild(W),c&&console.log("Append LinkNode (main)")),!q.isConnected){var u=J.querySelector("link[rel=stylesheet]")||J.querySelector("style");u?J.insertBefore(q,u):J.appendChild(q)}}}();var i=performance.measure("mutation","mutation-start","mutation-end").duration;r&&nt(i)}},nt=function(t){var e=s.filter((function(t){return t.count>0})).length,n=Math.round(10*t)/10;console.log("Processed (main)",e,"rules in",n,"ms")},rt=function(t){return new Promise((function(e){var n=t();n&&e(n)}))},ot=function(t,e){return Promise.all(u(t).map(function(){var t=c(n().mark((function t(r){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,rt((function(){return e(r)}));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()))},ct=["head","meta","title","link","script","noscript","style","br","path","g"],at=function(t){return ct.includes(t.nodeName.toLowerCase())||1!==t.nodeType},it=function(t){performance.mark("mutation-start"),j(window.configNextCss),t.forEach((function(t){if(!at(t.target)){var e,n;if("childList"===t.type)null!==(e=t.addedNodes)&&void 0!==e&&e.length&&ot(t.addedNodes,B).then((function(){return et()})),null!==(n=t.removedNodes)&&void 0!==n&&n.length&&ot(t.removedNodes,H);"attributes"===t.type&&"class"===t.attributeName&&t.target.className!==t.oldValue&&rt((function(){return v(t.oldValue),h(t.target.className),!0})).then((function(){return"HTML"!==t.target.nodeName&&et()}))}})),performance.mark("mutation-end")},ut=new MutationObserver(it),lt=function(){var t=document.body;it([{type:"childList",addedNodes:[t],target:t}]),ut.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"],attributeOldValue:!0,characterData:!1})};!function(){if(document&&document.body)lt();else{var t=new MutationObserver((function(e){e.forEach((function(e){var n;null===(n=e.addedNodes)||void 0===n||n.forEach((function(e){"BODY"===e.nodeName&&(lt(),t.disconnect())}))}))}));t.observe(document.documentElement,{childList:!0,characterData:!1})}}()}(); | ||
!function(){"use strict";function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function n(){n=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},c="function"==typeof Symbol?Symbol:{},a=c.iterator||"@@iterator",i=c.asyncIterator||"@@asyncIterator",u=c.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function f(t,e,n,r){var c=e&&e.prototype instanceof p?e:p,a=Object.create(c.prototype),i=new E(r||[]);return o(a,"_invoke",{value:$(t,n,i)}),a}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function h(){}function v(){}var m={};l(m,a,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(N([])));g&&g!==e&&r.call(g,a)&&(m=g);var b=v.prototype=p.prototype=Object.create(m);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,c,a,i){var u=s(t[o],t,c);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,i)}),(function(t){n("throw",t,a,i)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,i)}))}i(u.arg)}var c;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return c=c?c.then(o,o):o()}})}function $(t,e,n){var r="suspendedStart";return function(o,c){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw c;return L()}for(n.method=o,n.arg=c;;){var a=n.delegate;if(a){var i=k(a,n);if(i){if(i===d)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=s(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function k(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=s(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,d;var o=r.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 S(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function N(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,o=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 o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=v,o(b,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:h,configurable:!0}),h.displayName=l(v,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(x.prototype),l(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,n,r,o,c){void 0===c&&(c=Promise);var a=new x(f(e,n,r,o),c);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),l(b,u,"Generator"),l(b,a,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=N,E.prototype={constructor:E,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(j),!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(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var c=this.tryEntries[o],a=c.completion;if("root"===c.tryLoc)return n("end");if(c.tryLoc<=this.prev){var i=r.call(c,"catchLoc"),u=r.call(c,"finallyLoc");if(i&&u){if(this.prev<c.catchLoc)return n(c.catchLoc,!0);if(this.prev<c.finallyLoc)return n(c.finallyLoc)}else if(i){if(this.prev<c.catchLoc)return n(c.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return n(c.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var c=o;break}}c&&("break"===t||"continue"===t)&&c.tryLoc<=e&&e<=c.finallyLoc&&(c=null);var a=c?c.completion:{};return a.type=t,a.arg=e,c?(this.method="next",this.next=c.finallyLoc,d):this.complete(a)},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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:N(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function r(t){return r="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},r(t)}function o(t,e,n,r,o,c,a){try{var i=t[c](a),u=i.value}catch(t){return void n(t)}i.done?e(u):Promise.resolve(u).then(r,o)}function c(t){return function(){var e=this,n=arguments;return new Promise((function(r,c){var a=t.apply(e,n);function i(t){o(a,r,c,i,u,"next",t)}function u(t){o(a,r,c,i,u,"throw",t)}i(void 0)}))}}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,c=[],a=!0,i=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(c.push(r.value),!e||c.length!==e);a=!0);}catch(t){i=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(i)throw o}}return c}(t,e)||l(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 u(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||l(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){if(t){if("string"==typeof t)return f(t,e);var n=Object.prototype.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)?f(t,e):void 0}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var s=[],d="SAVE",p="CLEAN",h=function(t){return m(t,d)},v=function(t){return m(t,p)},m=function(t,e){t&&e&&("object"===r(t)&&(t="baseVal"in t?t.baseVal:""),t.split(" ").forEach((function(t){if(t){var n=s.find((function(e){return e.className===t}));if(n)e===d&&n.count++,e===p&&n.count--;else if(e===d){var r=_(t),o=r.style,c=r.proc;o&&s.push({className:t,style:o,proc:c,count:1})}}})))},y=function(t){return t.match(/#?([0-9a-f]{1,2})([0-9a-f]{1,2})([0-9a-f]{1,2})/i).slice(1).map((function(t){return parseInt(t.padStart(2,t),16)}))},g=function(t){return Math.min(255,Math.max(0,Math.round(t)))},b=[-90,-80,-60,-40,-20,0,15,30,45,60],w=function(t){var e={black:"#000000",white:"#ffffff"};return Object.keys(t).forEach((function(n){b.forEach((function(r,o){var c=t[n],a=100*o||50,i="".concat(n,"-").concat(a);e[i]=function(t,e){var n=y(t),r=e/100;return n.forEach((function(t,e,n){n[e]=g(r<0?t+(255-t)*Math.abs(r):t-t*r)})),"#"+n.map((function(t){return t.toString(16).padStart(2,"0")})).join("")}(c,r)}))})),e},x={material:w({red:"#f44336",pink:"#e91e63",purple:"#9c27b0","deep-purple":"#673ab7",indigo:"#3f51b5",blue:"#2196f3","light-blue":"#03a9f4",cyan:"#00bcd4",teal:"#009688",green:"#4caf50","light-green":"#8bc34a",lime:"#cddc39",yellow:"#ffeb3b",amber:"#ffc107",orange:"#ff9800","deep-orange":"#ff5722",brown:"#795548","light-grey":"#9e9e9e",grey:"#575757","blue-grey":"#607d8b"}),tailwind:w({slate:"#64748b",grey:"#6b7280",zinc:"#71717a",neutral:"#737373",stone:"#78716c",red:"#ef4444",orange:"#f97316",amber:"#f59e0b",yellow:"#eab308",lime:"#84cc16",green:"#22c55e",emerald:"#10b981",teal:"#14b8a6",cyan:"#06b6d4",sky:"#0ea5e9",blue:"#3b82f6",indigo:"#6366f1",violet:"#8b5cf6",purple:"#a855f7",fuchsia:"#d946ef",pink:"#ec4899",rose:"#f43f5e"})},$={merged:!1,debug:!1,useStyleNode:!1,skipResetStyles:!1,skipRemUnits:!1,palette:"material",breakpoints:{sm:390,md:768,lg:1024,xl:1400},conatiners:{xs:480,sm:640,md:768,lg:1024,xl:1280}},k=e({},$),S=function(){return e({},k)},j=function(t){if(!k.merged&&"object"===r(t)){for(var e in t)e in $&&(r(k[e])===r(t[e])?k[e]=t[e]:console.warn("Config conflict: [".concat(e,"] should be ").concat(r(k[e])," type!")));var n=k.palette,o=k.debug;"object"===r(null==t?void 0:t.colors)&&(o&&console.log("Merge color palette...",{palette:n,colors:t.colors}),function(t,e){var n=w(e);Object.keys(n).forEach((function(e){x[t][e]=n[e]}))}(n,t.colors)),k.merged=!0,o&&console.log("Config merged",k)}return k},E=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}).compare,N=function(t){return Math.round(parseFloat(t)/16*1e3)/1e3+"rem"},L=function(t){return t.replace(/\s+/gm," ").replace(/\s*({|}|:|;|>)\s*/gm,"$1").replace(/\(\s(.*?)\s\)/gm,"($1)").replace(";}","}").replace(/([:\s])(-?0[\w]+)/gm,"$10").trim()},O=function(t){return{w:"width",h:"height",p:"padding",m:"margin",b:"border",r:"border-radius",fg:"color",bg:"background-color"}[t]||""},C=function(t){return{t:"-top",r:"-right",b:"-bottom",l:"-left"}[t]||""},A=[],P={reverseBreakpoint:!1},M=function(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:P;try{t=new RegExp(t)}catch(t){console.error(t)}t&&"function"==typeof n&&o&&"object"===r(o)?A.push({pattern:t,fn:n,options:e(e({},P),o)}):console.error("Declared register is not correct!",{pattern:t,fn:n,options:o})},I=function(t,e){var n=t.pattern,r=t.fn;t.options;var o=e.match(n);return!!o&&r(o)},_=function(t){var e="",n=null;return A.forEach((function(r,o){var c=I(r,t);if(c)return e=L(c),void(n=o)})),{style:e,proc:n}},T=function(){var t,e,n,r=s.sort((function(t,e){return t.proc-e.proc||E(t.className,e.className)})).filter((function(t){return t.count})).map((function(t){return t.style})).join("").match(/(.*?{+.*?}+)/gm)||[];return e=[],n=[],(t=r).forEach((function(r,o){/:hover\{/.test(r)&&(e.push(r),delete t[o]),/:active\{/.test(r)&&(n.push(r),delete t[o])})),e.concat(n).forEach((function(e){return t.push(e)})),function(t){var e={},n=[];t.forEach((function(n,r){var o=n.match(/(@media.*?){(.*?})}/);if(o){var c,a=i(o,3),u=a[1],l=a[2];(c=e)[u]||(c[u]=[]),e[u].push(l),delete t[r]}})),Object.entries(e).forEach((function(t){var e=i(t,2),r=e[0],o=e[1];return n.push("".concat(r,"{").concat(o.join(""),"}"))})),n.sort(E).forEach((function(e){return t.push(e)})),e=n=[]}(r),r.join("")},z=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=S(),r=n.palette,o=x[r][t]||"";if(e&&7===o.length){var c=y(o),a=i(c,3),u=a[0],l=a[1],f=a[2];return"rgba(".concat(u," ").concat(l," ").concat(f," / ").concat(e,"%)")}return o};M(/^(block|flex|inline|inline-block|inline-flex)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { display: ").concat(r," }")})),M(/^(static|relative|absolute|fixed|sticky)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { position: ").concat(r," }")})),M(/^(-)?(top|right|bottom|left)-(\d+)$/,(function(t){var e=i(t,4),n=e[0],r=e[1],o=e[2],c=e[3],a=r?-c:c;return".".concat(n," { ").concat(o,": ").concat(a,"px }")})),M(/^(box)-(border|content)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2];return".".concat(n," { box-sizing: ").concat(o,"-").concat(r," }")})),M(/^(float|clear)-(left|right|both|none)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2];return("float"!==r||"both"!==o)&&".".concat(n," { ").concat(r,": ").concat(o," }")})),M(/^show$/,(function(t){var e=i(t,1)[0];return".".concat(e," { display: none !important }")}),{reverseBreakpoint:!0}),M(/^hide$/,(function(t){var e=i(t,1)[0];return".".concat(e," { display: none !important }")})),M(/^fit$/,(function(t){var e=i(t,1)[0];return".".concat(e," { width: 100%; height: 100% }")})),M(/^fit-([wh])$/,(function(t){var e=i(t,2),n=e[0],r=e[1],o=O(r);return".".concat(n," { ").concat(o,": 100% }")})),M(/^fit-(contain|cover|fill|scale-down|none)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { object-fit: ").concat(r," }")})),M(/^object-(center|top|right|bottom|left)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { object-position: ").concat(r," }")})),M(/^text-(left|center|right|justify)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { text-align: ").concat(r," }")})),M(/^(uppercase|lowercase|capitalize|no-transform)$/,(function(t){var e=i(t,2),n=e[0],r=e[1],o="no-transform"===r?"none":r;return".".concat(n," { text-transform: ").concat(o," }")})),M(/^(underline|line-through|no-decoration)$/,(function(t){var e=i(t,2),n=e[0],r=e[1],o="no-decoration"===r?"none":r;return".".concat(n," { text-decoration: ").concat(o," }")})),M(/^fs-(\d+)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { font-size: ").concat(r,"px }")})),M(/^fw-([1-9]00|bold|bolder|ligher|normal)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { font-weight: ").concat(r," }")})),M(/^lh-([\d.]+)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n.replace(/\./,"\\.")," { line-height: ").concat(r," }")})),M(/^(-)?z-(\d+)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2],c=r?-o:o;return".".concat(n," { z-index: ").concat(c," }")})),M(/^pointer-(none|auto|all)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { pointer-events: ").concat(r," }")})),M(/^cursor-(pointer|default|auto)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { cursor: ").concat(r," }")})),M(/^of(-[xy])?-(auto|hidden|scroll)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2],c=r||"";return".".concat(n," { overflow").concat(c,": ").concat(o," }")})),M(/^of(-[xy])?-(overlay)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2],c=r||"";return".".concat(n," { overflow").concat(c,": auto; overflow").concat(c,": ").concat(o," }")})),M(/^([wh])-(auto|\d+)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2],c=O(r[0]),a=C(r[1]),u=isNaN(o)?o:o+"px";return".".concat(n," { ").concat(c).concat(a,": ").concat(u," }")})),M(/^([wh])-(\d+)\/(\d+)$/,(function(t){var e=i(t,4),n=e[0],r=e[1],o=e[2],c=e[3],a=O(r);return!(parseInt(c)>parseInt(o))&&".".concat(n.replace(/\//,"\\/")," { ").concat(a,": calc( 100%/(").concat(o,"/").concat(c,") )}")})),M(/^(p[trbl]?|r)-(\d+)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2],c=O(r[0]),a=C(r[1]);return".".concat(n," { ").concat(c).concat(a,": ").concat(o,"px }")})),M(/^(-)?(m[trbl]?)-(auto|\d+)$/,(function(t){var e=i(t,4),n=e[0],r=e[1],o=e[2],c=e[3],a=O(o[0]),u=C(o[1]),l=isNaN(c)?c:(r?-c:c)+"px";return(!r||!isNaN(c))&&".".concat(n," { ").concat(a).concat(u,": ").concat(l," }")})),M(/^(b[trbl]?)-(\d+)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2],c=O(r[0]),a=C(r[1]);return".".concat(n," { ").concat(c).concat(a,"-width: ").concat(o,"px; ").concat(c).concat(a,"-style: solid }")})),M(/^(b[trbl]?)-(solid|dashed|dotted|double|groove|inset|none|outset|ridge)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2],c=O(r[0]),a=C(r[1]);return".".concat(n," { ").concat(c).concat(a,"-style: ").concat(o," }")})),M(/^b-(collapse|separate)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { border-collapse: ").concat(r," }")})),M(/^(-)?([pm][xy])-(auto|\d+)$/,(function(t){var e=i(t,4),n=e[0],r=e[1],o=e[2],c=e[3],a=O(o[0]),u=isNaN(c)?c:(r?-c:c)+"px",l="y"===o[1]?"top":"left",f="y"===o[1]?"bottom":"right";return!(r&&"auto"===c||"auto"===c&&"margin"!==a)&&".".concat(n," { ").concat(a,"-").concat(l,": ").concat(u,"; ").concat(a,"-").concat(f,": ").concat(u," }")})),M(/^flex-(wrap|wrap-reverse|nowrap)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { flex-wrap: ").concat(r," }")})),M(/^flex-(row|row-reverse|column|column-reverse)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { flex-direction: ").concat(r," }")})),M(/^flex-(auto|[01])$/,(function(t){var e=i(t,2),n=e[0],r=e[1],o="auto"===r?"1 1 auto":"0"===r?"0 0 auto":"1 1 0%";return".".concat(n," { flex: ").concat(o," }")})),M(/^flex-(grow|shrink)-([01])$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2];return".".concat(n," { flex-").concat(r,": ").concat(o," }")})),M(/^justify-(start|end)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { justify-content: flex-").concat(r," }")})),M(/^justify-(around|between|evenly)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { justify-content: space-").concat(r," }")})),M(/^justify-center$/,(function(t){var e=i(t,1)[0];return".".concat(e," { justify-content: center }")})),M(/^align-(start|end)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { align-items: flex-").concat(r," }")})),M(/^align-(center|stretch)$/,(function(t){var e=i(t,2),n=e[0],r=e[1];return".".concat(n," { align-items: ").concat(r," }")})),M(/^(-)?order-(\d+)$/,(function(t){var e=i(t,3),n=e[0],r=e[1],o=e[2],c=r?-o:o;return".".concat(n," { order: ").concat(c," }")})),M(/^container-(\w+)$/,(function(t){var e,n,r=i(t,2),o=r[0],c=r[1],a=(e=c,null===(n=S().conatiners)||void 0===n?void 0:n[e]);return!!a&&".".concat(o," { width: 100%; max-width: ").concat(a,"px; margin: auto }")})),M(/^gap-(\d+)$/,(function(t){var e=i(t,2),n=e[0],r=e[1]/2;return".".concat(n," { margin: -").concat(r,"px } .").concat(n," > * { padding: ").concat(r,"px }")})),M(/^(-)?s([xy])-(\d+)(-reverse)?$/,(function(t){var e=i(t,5),n=e[0],r=e[1],o=e[2],c=e[3],a=e[4],u=r?-c:c,l="x"===o?a?"right":"left":a?"bottom":"top";return".".concat(n," > :not(:first-child) { margin-").concat(l,": ").concat(u,"px }")})),M(/^text-trim(-all)?$/,(function(t){var e=i(t,2),n=e[0],r=e[1]?"":">";return".".concat(n,", .").concat(n," ").concat(r," * { min-width: 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden }")})),M(/^([fb]g)-(black|white|([\w-]+\d+))(\/(\d+))?$/,(function(t){var e=i(t,6),n=e[0],r=e[1],o=e[2],c=e[5],a=O(r),u=z(o,c);return!(!a||!u)&&".".concat(n.replace(/\//,"\\/")," { ").concat(a,": ").concat(u," }")})),M(/^b-(black|white|([\w-]+\d+))(\/(\d+))?$/,(function(t){var e=i(t,5),n=e[0],r=e[1],o=e[4],c=z(r,o);return!!c&&".".concat(n.replace(/\//,"\\/")," { border-color: ").concat(c," }")}));var F,D=["hover","active","focus"],G=[].concat(D,["every","odd","even","first","last"],["dark"]);"function"==typeof(F=function(t,e){var n=t.pattern,r=t.fn,o=t.options.reverseBreakpoint,c=e.split(":"),a=c.pop().match(n);if(!a)return!1;var i=Object.keys(S().breakpoints),u=o?"max-width":"min-width",l=!1,f=!1,s="",d="";if(c.forEach((function(t){if(!G.includes(t)&&!i.includes(t))return v(e),f=!0,!1;var n,r;l||(n=t,l=(null===(r=S().breakpoints)||void 0===r?void 0:r[n])||!1),D.includes(t)&&(d+=":"+t)})),f)return!1;if(!(s=r(a,c)))return!1;if(c.length){var p=c.join("\\:");s=s.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,".".concat(p,"\\:$1$2")).replace(/:\s*\./gm,":")}if(c.forEach((function(t){"every"===t&&(s=s.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,"$1 > * $2")),"odd"===t&&(s=s.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,"$1 > :nth-child(odd) $2")),"even"===t&&(s=s.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,"$1 > :nth-child(even) $2")),"first"===t&&(s=s.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,"$1 > :first-child $2")),"last"===t&&(s=s.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,"$1 > :last-child $2"))})),c.includes("dark")&&(s=".dark ".concat(s)),d&&(s=s.replace(/([\s\S]*?)\s*(\{[\s\S]*?\})/gm,"$1".concat(d,"$2"))),c.includes("hover")){var h=s.replace(/:hover\{/g,":active{");s="@media (hover: hover) and (pointer: fine) { ".concat(s," }")+h}return l&&(o&&l--,s="@media screen and (".concat(u,": ").concat(l,"px) { ").concat(s," }")),s})&&(I=F);var R="CLEAN",B=function(t){return U(t,"SAVE")},H=function(t){return U(t,R)},U=function(){var t=c(n().mark((function t(e,r){var o,c;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!at(e)&&r){t.next=2;break}return t.abrupt("return");case 2:o=r===R?v:h,"svg"===e.nodeName?o(e.className):(c=V(e),o(c));case 4:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),V=function(t){var e=t.outerHTML.matchAll(/class="(.*?)"/gm),n=[];return Array.from(e).forEach((function(t){return n.push(t[1])})),n.join(" ")},q=document.createDocumentFragment(),Y=document.createDocumentFragment(),J=document.querySelector("head"),K=document.createElement("style"),Q=document.createElement("style"),W=document.createElement("link"),X=document.createElement("link"),Z=function(t){return!!t.isConnected&&J.removeChild(t)},tt=function(t){return t?"data:text/css;base64,"+btoa(t):""};W.rel=X.rel="stylesheet";var et=function(){var t=S(),e=t.useStyleNode,n=t.skipRemUnits,r=t.debug,o=T()||"",c=!1;if(n||(o=o.replace(/(\d*\.?\d+)px/g,(function(t,e){return N(e)}))),e)K.innerHTML!==o&&(K.innerHTML=o,c=!0);else{var a=tt(o);W.href!==a&&(W.href=a,c=!0)}if(c){!function(){var t,e=S(),n=e.useStyleNode,r=e.skipResetStyles,o=e.skipRemUnits,c=e.debug;if(r?(Z(X),Z(Q)):t||(t=L(":root{line-height:1.4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji';-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;}*,:before,:after{box-sizing:border-box;outline:none;-webkit-user-drag:none;touch-action:pan-x pan-y;}body{margin:0;max-width:100vw;overscroll-behavior:none;}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;}h1,h2,h3,h4,h5,h6,p{margin:0;font:inherit;}small{font-size:85%;}a{color:inherit;text-decoration:none;}button{font:inherit;line-height:1;cursor:pointer;background-color:inherit;border:0;color:inherit;padding:0;}img,svg{display:block;max-width:100%;height:auto;border:none;}input,textarea,select{font:inherit;font-size:16px;border:0;border-radius:0;background-clip:padding-box;color:inherit;background-color:transparent;}textarea{resize:none;}::placeholder{font-size:14px;}label{display:block;}fieldset{border:1px solid;}ul,ol{margin:0;padding:0;list-style-type:none;}hr{border:none;border-bottom:1px solid;}table{border-spacing:0;border-collapse:collapse;}th{font-weight:inherit;}iframe{border:0;}menu{margin:0;padding:0;}form,figure,pre,blockquote,dl,dd{margin:0;}address{font:inherit;}"),o&&(t=t.replace(/(\d*\.?\d+)px/g,(function(t,e){return N(e)})))),n){if(Z(q),r||Q.isConnected||(Q.innerHTML!==t&&(Q.innerHTML=t),Y.appendChild(Q),c&&console.log("Append StyleNode (reset)")),K.isConnected||(Y.appendChild(K),c&&console.log("Append StyleNode (main)")),!Y.isConnected){var a=J.querySelector("style");a?J.insertBefore(Y,a):J.appendChild(q)}}else{if(Z(Y),!r&&!X.isConnected){var i=tt(t);(X.href=i)&&(X.href=i),q.appendChild(X),c&&console.log("Append LinkNode (reset)")}if(W.isConnected||(q.appendChild(W),c&&console.log("Append LinkNode (main)")),!q.isConnected){var u=J.querySelector("link[rel=stylesheet]")||J.querySelector("style");u?J.insertBefore(q,u):J.appendChild(q)}}}();var i=performance.measure("mutation","mutation-start","mutation-end").duration;r&&nt(i)}},nt=function(t){var e=s.filter((function(t){return t.count>0})).length,n=Math.round(10*t)/10;console.log("Processed (main)",e,"rules in",n,"ms")},rt=function(t){return new Promise((function(e){var n=t();n&&e(n)}))},ot=function(t,e){return Promise.all(u(t).map(function(){var t=c(n().mark((function t(r){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,rt((function(){return e(r)}));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()))},ct=["head","meta","title","link","script","noscript","style","br","path","g"],at=function(t){return ct.includes(t.nodeName.toLowerCase())||1!==t.nodeType},it=function(t){performance.mark("mutation-start"),j(window.configNextCss),t.forEach((function(t){if(!at(t.target)){var e,n;if("childList"===t.type)null!==(e=t.addedNodes)&&void 0!==e&&e.length&&ot(t.addedNodes,B).then((function(){return et()})),null!==(n=t.removedNodes)&&void 0!==n&&n.length&&ot(t.removedNodes,H);"attributes"===t.type&&"class"===t.attributeName&&t.target.className!==t.oldValue&&rt((function(){return v(t.oldValue),h(t.target.className),!0})).then((function(){return"HTML"!==t.target.nodeName&&et()}))}})),performance.mark("mutation-end")},ut=new MutationObserver(it),lt=function(){var t=document.body;it([{type:"childList",addedNodes:[t],target:t}]),ut.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"],attributeOldValue:!0,characterData:!1})};!function(){if(document&&document.body)lt();else{var t=new MutationObserver((function(e){e.forEach((function(e){var n;null===(n=e.addedNodes)||void 0===n||n.forEach((function(e){"BODY"===e.nodeName&&(lt(),t.disconnect())}))}))}));t.observe(document.documentElement,{childList:!0,characterData:!1})}}()}(); |
#!/usr/bin/env node | ||
import e from"fs";import o from"path";import{globbySync as t}from"globby";import{exit as r}from"process";const n=e=>e.match(/#?([0-9a-f]{1,2})([0-9a-f]{1,2})([0-9a-f]{1,2})/i).slice(1).map((e=>parseInt(e.padStart(2,e),16))),s=e=>Math.min(255,Math.max(0,Math.round(e))),i=[-90,-80,-60,-40,-20,0,15,30,45,60],a=e=>{const o={black:"#000000",white:"#ffffff"};return Object.keys(e).forEach((t=>{i.forEach(((r,i)=>{const a=e[t];o[`${t}-${100*i||50}`]=((e,o)=>{const t=n(e);return(o/=100)<0?(o=Math.abs(o),t.forEach(((e,t,r)=>r[t]=s(e+(255-e)*o)))):t.forEach(((e,t,r)=>r[t]=s(e-e*o))),"#"+t.map((e=>e.toString(16).padStart(2,"0"))).join("")})(a,r)}))})),o},l={material:a({red:"#f44336",pink:"#e91e63",purple:"#9c27b0","deep-purple":"#673ab7",indigo:"#3f51b5",blue:"#2196f3","light-blue":"#03a9f4",cyan:"#00bcd4",teal:"#009688",green:"#4caf50","light-green":"#8bc34a",lime:"#cddc39",yellow:"#ffeb3b",amber:"#ffc107",orange:"#ff9800","deep-orange":"#ff5722",brown:"#795548","light-grey":"#9e9e9e",grey:"#575757","blue-grey":"#607d8b"}),tailwind:a({slate:"#64748b",grey:"#6b7280",zinc:"#71717a",neutral:"#737373",stone:"#78716c",red:"#ef4444",orange:"#f97316",amber:"#f59e0b",yellow:"#eab308",lime:"#84cc16",green:"#22c55e",emerald:"#10b981",teal:"#14b8a6",cyan:"#06b6d4",sky:"#0ea5e9",blue:"#3b82f6",indigo:"#6366f1",violet:"#8b5cf6",purple:"#a855f7",fuchsia:"#d946ef",pink:"#ec4899",rose:"#f43f5e"})},c={merged:!1,debug:!1,useStyleNode:!1,skipResetStyles:!1,skipRemUnits:!1,palette:"material",breakpoints:{sm:390,md:768,lg:1024,xl:1400},conatiners:{xs:480,sm:640,md:768,lg:1024,xl:1280}},$={...c},f=()=>({...$}),d=e=>{if(!$.merged&&"object"==typeof e){for(let o in e)o in c&&(typeof $[o]==typeof e[o]?$[o]=e[o]:console.warn(`Config conflict: [${o}] should be ${typeof $[o]} type!`));const o=$.palette,t=$.debug;"object"==typeof e?.colors&&(t&&console.log("Merge color palette...",{palette:o,colors:e.colors}),((e,o)=>{const t=a(o);Object.keys(t).forEach((o=>{l[e][o]=t[o]}))})(o,e.colors)),$.merged=!0,t&&console.log("Config merged",$)}return $},p=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}).compare,h=e=>({w:"width",h:"height",p:"padding",m:"margin",b:"border",r:"border-radius",fg:"color",bg:"background-color"}[e]||""),g=e=>({t:"-top",r:"-right",b:"-bottom",l:"-left"}[e]||""),u=[],b={reverseBreakpoint:!1},m=(e,o,t=b)=>{try{e=new RegExp(e)}catch(e){console.error(e)}e&&"function"==typeof o&&t&&"object"==typeof t?u.push({pattern:e,fn:o,options:{...b,...t}}):console.error("Declared register is not correct!",{pattern:e,fn:o,options:t})};let y=({pattern:e,fn:o,options:t},r)=>{const n=r.match(e);return!!n&&o(n)};const x=()=>{const e=w.sort(((e,o)=>e.proc-o.proc||p(e.className,o.className))).filter((e=>e.count)).map((e=>e.style)).join("").match(/(.*?{+.*?}+)/gm)||[];return(e=>{const o=[],t=[];e.forEach(((r,n)=>{/:hover\{/.test(r)&&(o.push(r),delete e[n]),/:active\{/.test(r)&&(t.push(r),delete e[n])})),o.concat(t).forEach((o=>e.push(o)))})(e),(e=>{let o={},t=[];e.forEach(((t,r)=>{const n=t.match(/(@media.*?){(.*?})}/);if(n){const[,t,s]=n;o[t]||=[],o[t].push(s),delete e[r]}})),Object.entries(o).forEach((([e,o])=>t.push(`${e}{${o.join("")}}`))),t.sort(p).forEach((o=>e.push(o))),o=t=[]})(e),e.join("")},w=[],v=(e,o)=>{e&&o&&("object"==typeof e&&(e="baseVal"in e?e.baseVal:""),e.split(" ").forEach((e=>{if(!e)return;const t=w.find((o=>o.className===e));if(t)"SAVE"===o&&t.count++,"CLEAN"===o&&t.count--;else if("SAVE"===o){const{style:o,proc:t}=(e=>{let o="",t=null;return u.forEach(((r,n)=>{const s=y(r,e);if(s)return o=s.replace(/\s+/gm," ").replace(/\s*({|}|:|;|>)\s*/gm,"$1").replace(/\(\s(.*?)\s\)/gm,"($1)").replace(";}","}").replace(/([:\s])(-?0[\w]+)/gm,"$10").trim(),void(t=n)})),{style:o,proc:t}})(e);o&&w.push({className:e,style:o,proc:t,count:1})}})))};const k=["hover","active","focus"],j=[...k,"every","odd","even","first","last","dark"];var S;"function"==typeof(S=({pattern:e,fn:o,options:{reverseBreakpoint:t}},r)=>{const n=r.split(":"),s=n.pop().match(e);if(!s)return!1;const i=Object.keys(f().breakpoints);let a=t?"max-width":"min-width",l=!1,c=!1,$="",d="";if(n.forEach((e=>{if(!j.includes(e)&&!i.includes(e))return(e=>{v(e,"CLEAN")})(r),c=!0,!1;var o;l||(o=e,l=f().breakpoints?.[o]||!1),k.includes(e)&&(d+=":"+e)})),c)return!1;if($=o(s,n),!$)return!1;if(n.length){const e=n.join("\\:");$=$.replace(/(.*?)\s*(\{.*?\})/gms,`.${e}\\:$1$2`).replace(/:\s*\./gms,":")}if(n.forEach((e=>{"every"===e&&($=$.replace(/(.*?)\s*(\{.*?\})/gms,"$1 > * $2")),"odd"===e&&($=$.replace(/(.*?)\s*(\{.*?\})/gms,"$1 > :nth-child(odd) $2")),"even"===e&&($=$.replace(/(.*?)\s*(\{.*?\})/gms,"$1 > :nth-child(even) $2")),"first"===e&&($=$.replace(/(.*?)\s*(\{.*?\})/gms,"$1 > :first-child $2")),"last"===e&&($=$.replace(/(.*?)\s*(\{.*?\})/gms,"$1 > :last-child $2"))})),n.includes("dark")&&($=`.dark ${$}`),d&&($=$.replace(/(.*?)\s*(\{.*?\})/gms,`$1${d}$2`)),n.includes("hover")){const e=$.replace(/:hover\{/g,":active{");$=`@media (hover: hover) and (pointer: fine) { ${$} }`+e}return l&&(t&&l--,$=`@media screen and (${a}: ${l}px) { ${$} }`),$})&&(y=S);const E=(e,o=!1)=>{const{palette:t}=f(),r=l[t][e]||"";if(o&&7===r.length){const[e,t,s]=n(r);return`rgba(${e} ${t} ${s} / ${o}%)`}return r};m(/^(block|flex|inline|inline-block|inline-flex)$/,(([e,o])=>`.${e} { display: ${o} }`)),m(/^(static|relative|absolute|fixed|sticky)$/,(([e,o])=>`.${e} { position: ${o} }`)),m(/^(-)?(top|right|bottom|left)-(\d+)$/,(([e,o,t,r])=>`.${e} { ${t}: ${o?-r:r}px }`)),m(/^(box)-(border|content)$/,(([e,o,t])=>`.${e} { box-sizing: ${t}-${o} }`)),m(/^(float|clear)-(left|right|both|none)$/,(([e,o,t])=>("float"!==o||"both"!==t)&&`.${e} { ${o}: ${t} }`)),m(/^show$/,(([e])=>`.${e} { display: none !important }`),{reverseBreakpoint:!0}),m(/^hide$/,(([e])=>`.${e} { display: none !important }`)),m(/^fit$/,(([e])=>`.${e} { width: 100%; height: 100% }`)),m(/^fit-([wh])$/,(([e,o])=>`.${e} { ${h(o)}: 100% }`)),m(/^fit-(contain|cover|fill|scale-down|none)$/,(([e,o])=>`.${e} { object-fit: ${o} }`)),m(/^object-(center|top|right|bottom|left)$/,(([e,o])=>`.${e} { object-position: ${o} }`)),m(/^text-(left|center|right|justify)$/,(([e,o])=>`.${e} { text-align: ${o} }`)),m(/^(uppercase|lowercase|capitalize|no-transform)$/,(([e,o])=>`.${e} { text-transform: ${"no-transform"===o?"none":o} }`)),m(/^(underline|line-through|no-decoration)$/,(([e,o])=>`.${e} { text-decoration: ${"no-decoration"===o?"none":o} }`)),m(/^fs-(\d+)$/,(([e,o])=>`.${e} { font-size: ${o}px }`)),m(/^fw-([1-9]00|bold|bolder|ligher|normal)$/,(([e,o])=>`.${e} { font-weight: ${o} }`)),m(/^lh-([\d.]+)$/,(([e,o])=>`.${e.replace(/\./,"\\.")} { line-height: ${o} }`)),m(/^(-)?z-(\d+)$/,(([e,o,t])=>`.${e} { z-index: ${o?-t:t} }`)),m(/^pointer-(none|auto|all)$/,(([e,o])=>`.${e} { pointer-events: ${o} }`)),m(/^cursor-(pointer|default|auto)$/,(([e,o])=>`.${e} { cursor: ${o} }`)),m(/^of(-[xy])?-(auto|hidden|scroll)$/,(([e,o,t])=>`.${e} { overflow${o||""}: ${t} }`)),m(/^of(-[xy])?-(overlay)$/,(([e,o,t])=>{const r=o||"";return`.${e} { overflow${r}: auto; overflow${r}: ${t} }`})),m(/^([wh])-(auto|\d+)$/,(([e,o,t])=>`.${e} { ${h(o[0])}${g(o[1])}: ${isNaN(t)?t:t+"px"} }`)),m(/^([wh])-(\d+)\/(\d+)$/,(([e,o,t,r])=>{const n=h(o);return!(parseInt(r)>parseInt(t))&&`.${e.replace(/\//,"\\/")} { ${n}: calc( 100%/(${t}/${r}) )}`})),m(/^(p[trbl]?|r)-(\d+)$/,(([e,o,t])=>`.${e} { ${h(o[0])}${g(o[1])}: ${t}px }`)),m(/^(-)?(m[trbl]?)-(auto|\d+)$/,(([e,o,t,r])=>{const n=h(t[0]),s=g(t[1]),i=isNaN(r)?r:(o?-r:r)+"px";return(!o||!isNaN(r))&&`.${e} { ${n}${s}: ${i} }`})),m(/^(b[trbl]?)-(\d+)$/,(([e,o,t])=>{const r=h(o[0]),n=g(o[1]);return`.${e} { ${r}${n}-width: ${t}px; ${r}${n}-style: solid }`})),m(/^(b[trbl]?)-(solid|dashed|dotted|double|groove|inset|none|outset|ridge)$/,(([e,o,t])=>`.${e} { ${h(o[0])}${g(o[1])}-style: ${t} }`)),m(/^b-(collapse|separate)$/,(([e,o])=>`.${e} { border-collapse: ${o} }`)),m(/^(-)?([pm][xy])-(auto|\d+)$/,(([e,o,t,r])=>{const n=h(t[0]),s=isNaN(r)?r:(o?-r:r)+"px",i="y"===t[1]?"top":"left",a="y"===t[1]?"bottom":"right";return!(o&&"auto"===r||"auto"===r&&"margin"!==n)&&`.${e} { ${n}-${i}: ${s}; ${n}-${a}: ${s} }`})),m(/^flex-(wrap|wrap-reverse|nowrap)$/,(([e,o])=>`.${e} { flex-wrap: ${o} }`)),m(/^flex-(row|row-reverse|column|column-reverse)$/,(([e,o])=>`.${e} { flex-direction: ${o} }`)),m(/^flex-(auto|[01])$/,(([e,o])=>`.${e} { flex: ${"auto"===o?"1 1 auto":"0"===o?"0 0 auto":"1 1 0%"} }`)),m(/^flex-(grow|shrink)-([01])$/,(([e,o,t])=>`.${e} { flex-${o}: ${t} }`)),m(/^justify-(start|end)$/,(([e,o])=>`.${e} { justify-content: flex-${o} }`)),m(/^justify-(around|between|evenly)$/,(([e,o])=>`.${e} { justify-content: space-${o} }`)),m(/^justify-center$/,(([e])=>`.${e} { justify-content: center }`)),m(/^align-(start|end)$/,(([e,o])=>`.${e} { align-items: flex-${o} }`)),m(/^align-(center|stretch)$/,(([e,o])=>`.${e} { align-items: ${o} }`)),m(/^(-)?order-(\d+)$/,(([e,o,t])=>`.${e} { order: ${o?-t:t} }`)),m(/^container-(\w+)$/,(([e,o])=>{const t=(r=o,f().conatiners?.[r]);var r;return!!t&&`.${e} { width: 100%; max-width: ${t}px; margin: auto }`})),m(/^gap-(\d+)$/,(([e,o])=>{const t=o/2;return`.${e} { margin: -${t}px } .${e} > * { padding: ${t}px }`})),m(/^(-)?s([xy])-(\d+)(-reverse)?$/,(([e,o,t,r,n])=>`.${e} > :not(:first-child) { margin-${"x"===t?n?"right":"left":n?"bottom":"top"}: ${o?-r:r}px }`)),m(/^text-trim(-all)?$/,(([e,o])=>`.${e}, .${e} ${o?"":">"} * { min-width: 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden }`)),m(/^([fb]g)-(black|white|([\w-]+\d+))(\/(\d+))?$/,(([e,o,t,,,r])=>{const n=h(o),s=E(t,r);return!(!n||!s)&&`.${e.replace(/\//,"\\/")} { ${n}: ${s} }`})),m(/^b-(black|white|([\w-]+\d+))(\/(\d+))?$/,(([e,o,,,t])=>{const r=E(o,t);return!!r&&`.${e.replace(/\//,"\\/")} { border-color: ${r} }`}));let N=[],z=[];const C=/@layer\snextcss;/,M=o.resolve("nextcss.config.js"),A=e.existsSync(M),R={content:"src/**/*.{js,jsx,ts,tsx}",css:"build/**/*.css",colors:{},verbose:!1};console.verbose=(...e)=>R.verbose&&console.log(...e);if(console.log("Nextcss","0.2.7"),A){const{default:e}=await import("file://"+M),o=["merged","debug","useStyleNode"];Object.keys(e).forEach((t=>{t in{...R,...f()}&&!o.includes(t)?e[t]&&(R[t]=e[t]):console.log("[!] Skip unknown param: "+t)})),d(R),console.verbose("[ ] Read","nextcss.config.js"),console.verbose("[ ] Config merged",{...R,...f()})}else console.log("[!]","nextcss.config.js","not found. Continue with default config.");const F={...R,...f()},I=t(F.css);I.length?console.verbose("[ ] Scanning css files",I):(console.log("[!] No css files found with config:",F.css),r(1)),I.forEach((o=>{const t=e.readFileSync(o,"utf8");C.test(t)&&z.push(o)})),z.length||(console.log('[!] No css files found with "@layer nextcss;"'),r(1));const O=t(F.content);O.length?console.verbose("[ ] Scanning content files",O):(console.log("[!] No content files found with config:",F.content),r(1)),O.forEach((o=>{[...e.readFileSync(o,"utf8").matchAll(/['"`](.*?)['"`]/gm)].map((([,e])=>{(e=e.trim())&&N.push(e)}))})),N.forEach((e=>v(e,"SAVE")));const U=F.skipResetStyles?x():":root{line-height:1.4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji';-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;}*,:before,:after{box-sizing:border-box;outline:none;-webkit-user-drag:none;touch-action:pan-x pan-y;}body{margin:0;max-width:100vw;overscroll-behavior:none;}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;}h1,h2,h3,h4,h5,h6,p{margin:0;font:inherit;}small{font-size:85%;}a{color:inherit;text-decoration:none;}button{font:inherit;line-height:1;cursor:pointer;background-color:inherit;border:0;color:inherit;padding:0;}img,svg{display:block;max-width:100%;height:auto;border:none;}input,textarea,select{font:inherit;font-size:16px;border:0;border-radius:0;background-clip:padding-box;color:inherit;background-color:transparent;}textarea{resize:none;}::placeholder{font-size:14px;}label{display:block;}fieldset{border:1px solid;}ul,ol{margin:0;padding:0;list-style-type:none;}hr{border:none;border-bottom:1px solid;}table{border-spacing:0;border-collapse:collapse;}th{font-weight:inherit;}iframe{border:0;}menu{margin:0;padding:0;}form,figure,pre,blockquote,dl,dd{margin:0;}address{font:inherit;}"+x(),V=F.skipRemUnits?U:U.replace(/(\d*\.?\d+)px/g,((e,o)=>{return t=o,Math.round(parseFloat(t)/16*1e3)/1e3+"rem";var t}));V?(z.forEach((o=>{const t=e.readFileSync(o,"utf8");e.writeFileSync(o,t.replace(C,V))})),console.log("[ ] CSS files updated:",z)):console.log("[!] No CSS style has been generated."); | ||
import e from"fs";import o from"path";import{globbySync as t}from"globby";import{exit as r}from"process";const n=e=>e.match(/#?([0-9a-f]{1,2})([0-9a-f]{1,2})([0-9a-f]{1,2})/i).slice(1).map((e=>parseInt(e.padStart(2,e),16))),s=e=>Math.min(255,Math.max(0,Math.round(e))),i=[-90,-80,-60,-40,-20,0,15,30,45,60],a=e=>{const o={black:"#000000",white:"#ffffff"};return Object.keys(e).forEach((t=>{i.forEach(((r,i)=>{const a=e[t];o[`${t}-${100*i||50}`]=((e,o)=>{const t=n(e),r=o/100;return t.forEach(((e,o,t)=>{t[o]=s(r<0?e+(255-e)*Math.abs(r):e-e*r)})),"#"+t.map((e=>e.toString(16).padStart(2,"0"))).join("")})(a,r)}))})),o},l={material:a({red:"#f44336",pink:"#e91e63",purple:"#9c27b0","deep-purple":"#673ab7",indigo:"#3f51b5",blue:"#2196f3","light-blue":"#03a9f4",cyan:"#00bcd4",teal:"#009688",green:"#4caf50","light-green":"#8bc34a",lime:"#cddc39",yellow:"#ffeb3b",amber:"#ffc107",orange:"#ff9800","deep-orange":"#ff5722",brown:"#795548","light-grey":"#9e9e9e",grey:"#575757","blue-grey":"#607d8b"}),tailwind:a({slate:"#64748b",grey:"#6b7280",zinc:"#71717a",neutral:"#737373",stone:"#78716c",red:"#ef4444",orange:"#f97316",amber:"#f59e0b",yellow:"#eab308",lime:"#84cc16",green:"#22c55e",emerald:"#10b981",teal:"#14b8a6",cyan:"#06b6d4",sky:"#0ea5e9",blue:"#3b82f6",indigo:"#6366f1",violet:"#8b5cf6",purple:"#a855f7",fuchsia:"#d946ef",pink:"#ec4899",rose:"#f43f5e"})},c={merged:!1,debug:!1,useStyleNode:!1,skipResetStyles:!1,skipRemUnits:!1,palette:"material",breakpoints:{sm:390,md:768,lg:1024,xl:1400},conatiners:{xs:480,sm:640,md:768,lg:1024,xl:1280}},$={...c},d=()=>({...$}),f=e=>{if(!$.merged&&"object"==typeof e){for(let o in e)o in c&&(typeof $[o]==typeof e[o]?$[o]=e[o]:console.warn(`Config conflict: [${o}] should be ${typeof $[o]} type!`));const o=$.palette,t=$.debug;"object"==typeof e?.colors&&(t&&console.log("Merge color palette...",{palette:o,colors:e.colors}),((e,o)=>{const t=a(o);Object.keys(t).forEach((o=>{l[e][o]=t[o]}))})(o,e.colors)),$.merged=!0,t&&console.log("Config merged",$)}return $},p=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}).compare,h=e=>({w:"width",h:"height",p:"padding",m:"margin",b:"border",r:"border-radius",fg:"color",bg:"background-color"}[e]||""),g=e=>({t:"-top",r:"-right",b:"-bottom",l:"-left"}[e]||""),u=[],b={reverseBreakpoint:!1},m=(e,o,t=b)=>{try{e=new RegExp(e)}catch(e){console.error(e)}e&&"function"==typeof o&&t&&"object"==typeof t?u.push({pattern:e,fn:o,options:{...b,...t}}):console.error("Declared register is not correct!",{pattern:e,fn:o,options:t})};let y=({pattern:e,fn:o,options:t},r)=>{const n=r.match(e);return!!n&&o(n)};const x=()=>{const e=w.sort(((e,o)=>e.proc-o.proc||p(e.className,o.className))).filter((e=>e.count)).map((e=>e.style)).join("").match(/(.*?{+.*?}+)/gm)||[];return(e=>{const o=[],t=[];e.forEach(((r,n)=>{/:hover\{/.test(r)&&(o.push(r),delete e[n]),/:active\{/.test(r)&&(t.push(r),delete e[n])})),o.concat(t).forEach((o=>e.push(o)))})(e),(e=>{let o={},t=[];e.forEach(((t,r)=>{const n=t.match(/(@media.*?){(.*?})}/);if(n){const[,t,s]=n;o[t]||=[],o[t].push(s),delete e[r]}})),Object.entries(o).forEach((([e,o])=>t.push(`${e}{${o.join("")}}`))),t.sort(p).forEach((o=>e.push(o))),o=t=[]})(e),e.join("")},w=[],v=(e,o)=>{e&&o&&("object"==typeof e&&(e="baseVal"in e?e.baseVal:""),e.split(" ").forEach((e=>{if(!e)return;const t=w.find((o=>o.className===e));if(t)"SAVE"===o&&t.count++,"CLEAN"===o&&t.count--;else if("SAVE"===o){const{style:o,proc:t}=(e=>{let o="",t=null;return u.forEach(((r,n)=>{const s=y(r,e);if(s)return o=s.replace(/\s+/gm," ").replace(/\s*({|}|:|;|>)\s*/gm,"$1").replace(/\(\s(.*?)\s\)/gm,"($1)").replace(";}","}").replace(/([:\s])(-?0[\w]+)/gm,"$10").trim(),void(t=n)})),{style:o,proc:t}})(e);o&&w.push({className:e,style:o,proc:t,count:1})}})))};const k=["hover","active","focus"],j=[...k,"every","odd","even","first","last","dark"];var S;"function"==typeof(S=({pattern:e,fn:o,options:{reverseBreakpoint:t}},r)=>{const n=r.split(":"),s=n.pop().match(e);if(!s)return!1;const i=Object.keys(d().breakpoints);let a=t?"max-width":"min-width",l=!1,c=!1,$="",f="";if(n.forEach((e=>{if(!j.includes(e)&&!i.includes(e))return(e=>{v(e,"CLEAN")})(r),c=!0,!1;var o;l||(o=e,l=d().breakpoints?.[o]||!1),k.includes(e)&&(f+=":"+e)})),c)return!1;if($=o(s,n),!$)return!1;if(n.length){const e=n.join("\\:");$=$.replace(/(.*?)\s*(\{.*?\})/gms,`.${e}\\:$1$2`).replace(/:\s*\./gms,":")}if(n.forEach((e=>{"every"===e&&($=$.replace(/(.*?)\s*(\{.*?\})/gms,"$1 > * $2")),"odd"===e&&($=$.replace(/(.*?)\s*(\{.*?\})/gms,"$1 > :nth-child(odd) $2")),"even"===e&&($=$.replace(/(.*?)\s*(\{.*?\})/gms,"$1 > :nth-child(even) $2")),"first"===e&&($=$.replace(/(.*?)\s*(\{.*?\})/gms,"$1 > :first-child $2")),"last"===e&&($=$.replace(/(.*?)\s*(\{.*?\})/gms,"$1 > :last-child $2"))})),n.includes("dark")&&($=`.dark ${$}`),f&&($=$.replace(/(.*?)\s*(\{.*?\})/gms,`$1${f}$2`)),n.includes("hover")){const e=$.replace(/:hover\{/g,":active{");$=`@media (hover: hover) and (pointer: fine) { ${$} }`+e}return l&&(t&&l--,$=`@media screen and (${a}: ${l}px) { ${$} }`),$})&&(y=S);const E=(e,o=!1)=>{const{palette:t}=d(),r=l[t][e]||"";if(o&&7===r.length){const[e,t,s]=n(r);return`rgba(${e} ${t} ${s} / ${o}%)`}return r};m(/^(block|flex|inline|inline-block|inline-flex)$/,(([e,o])=>`.${e} { display: ${o} }`)),m(/^(static|relative|absolute|fixed|sticky)$/,(([e,o])=>`.${e} { position: ${o} }`)),m(/^(-)?(top|right|bottom|left)-(\d+)$/,(([e,o,t,r])=>`.${e} { ${t}: ${o?-r:r}px }`)),m(/^(box)-(border|content)$/,(([e,o,t])=>`.${e} { box-sizing: ${t}-${o} }`)),m(/^(float|clear)-(left|right|both|none)$/,(([e,o,t])=>("float"!==o||"both"!==t)&&`.${e} { ${o}: ${t} }`)),m(/^show$/,(([e])=>`.${e} { display: none !important }`),{reverseBreakpoint:!0}),m(/^hide$/,(([e])=>`.${e} { display: none !important }`)),m(/^fit$/,(([e])=>`.${e} { width: 100%; height: 100% }`)),m(/^fit-([wh])$/,(([e,o])=>`.${e} { ${h(o)}: 100% }`)),m(/^fit-(contain|cover|fill|scale-down|none)$/,(([e,o])=>`.${e} { object-fit: ${o} }`)),m(/^object-(center|top|right|bottom|left)$/,(([e,o])=>`.${e} { object-position: ${o} }`)),m(/^text-(left|center|right|justify)$/,(([e,o])=>`.${e} { text-align: ${o} }`)),m(/^(uppercase|lowercase|capitalize|no-transform)$/,(([e,o])=>`.${e} { text-transform: ${"no-transform"===o?"none":o} }`)),m(/^(underline|line-through|no-decoration)$/,(([e,o])=>`.${e} { text-decoration: ${"no-decoration"===o?"none":o} }`)),m(/^fs-(\d+)$/,(([e,o])=>`.${e} { font-size: ${o}px }`)),m(/^fw-([1-9]00|bold|bolder|ligher|normal)$/,(([e,o])=>`.${e} { font-weight: ${o} }`)),m(/^lh-([\d.]+)$/,(([e,o])=>`.${e.replace(/\./,"\\.")} { line-height: ${o} }`)),m(/^(-)?z-(\d+)$/,(([e,o,t])=>`.${e} { z-index: ${o?-t:t} }`)),m(/^pointer-(none|auto|all)$/,(([e,o])=>`.${e} { pointer-events: ${o} }`)),m(/^cursor-(pointer|default|auto)$/,(([e,o])=>`.${e} { cursor: ${o} }`)),m(/^of(-[xy])?-(auto|hidden|scroll)$/,(([e,o,t])=>`.${e} { overflow${o||""}: ${t} }`)),m(/^of(-[xy])?-(overlay)$/,(([e,o,t])=>{const r=o||"";return`.${e} { overflow${r}: auto; overflow${r}: ${t} }`})),m(/^([wh])-(auto|\d+)$/,(([e,o,t])=>`.${e} { ${h(o[0])}${g(o[1])}: ${isNaN(t)?t:t+"px"} }`)),m(/^([wh])-(\d+)\/(\d+)$/,(([e,o,t,r])=>{const n=h(o);return!(parseInt(r)>parseInt(t))&&`.${e.replace(/\//,"\\/")} { ${n}: calc( 100%/(${t}/${r}) )}`})),m(/^(p[trbl]?|r)-(\d+)$/,(([e,o,t])=>`.${e} { ${h(o[0])}${g(o[1])}: ${t}px }`)),m(/^(-)?(m[trbl]?)-(auto|\d+)$/,(([e,o,t,r])=>{const n=h(t[0]),s=g(t[1]),i=isNaN(r)?r:(o?-r:r)+"px";return(!o||!isNaN(r))&&`.${e} { ${n}${s}: ${i} }`})),m(/^(b[trbl]?)-(\d+)$/,(([e,o,t])=>{const r=h(o[0]),n=g(o[1]);return`.${e} { ${r}${n}-width: ${t}px; ${r}${n}-style: solid }`})),m(/^(b[trbl]?)-(solid|dashed|dotted|double|groove|inset|none|outset|ridge)$/,(([e,o,t])=>`.${e} { ${h(o[0])}${g(o[1])}-style: ${t} }`)),m(/^b-(collapse|separate)$/,(([e,o])=>`.${e} { border-collapse: ${o} }`)),m(/^(-)?([pm][xy])-(auto|\d+)$/,(([e,o,t,r])=>{const n=h(t[0]),s=isNaN(r)?r:(o?-r:r)+"px",i="y"===t[1]?"top":"left",a="y"===t[1]?"bottom":"right";return!(o&&"auto"===r||"auto"===r&&"margin"!==n)&&`.${e} { ${n}-${i}: ${s}; ${n}-${a}: ${s} }`})),m(/^flex-(wrap|wrap-reverse|nowrap)$/,(([e,o])=>`.${e} { flex-wrap: ${o} }`)),m(/^flex-(row|row-reverse|column|column-reverse)$/,(([e,o])=>`.${e} { flex-direction: ${o} }`)),m(/^flex-(auto|[01])$/,(([e,o])=>`.${e} { flex: ${"auto"===o?"1 1 auto":"0"===o?"0 0 auto":"1 1 0%"} }`)),m(/^flex-(grow|shrink)-([01])$/,(([e,o,t])=>`.${e} { flex-${o}: ${t} }`)),m(/^justify-(start|end)$/,(([e,o])=>`.${e} { justify-content: flex-${o} }`)),m(/^justify-(around|between|evenly)$/,(([e,o])=>`.${e} { justify-content: space-${o} }`)),m(/^justify-center$/,(([e])=>`.${e} { justify-content: center }`)),m(/^align-(start|end)$/,(([e,o])=>`.${e} { align-items: flex-${o} }`)),m(/^align-(center|stretch)$/,(([e,o])=>`.${e} { align-items: ${o} }`)),m(/^(-)?order-(\d+)$/,(([e,o,t])=>`.${e} { order: ${o?-t:t} }`)),m(/^container-(\w+)$/,(([e,o])=>{const t=(r=o,d().conatiners?.[r]);var r;return!!t&&`.${e} { width: 100%; max-width: ${t}px; margin: auto }`})),m(/^gap-(\d+)$/,(([e,o])=>{const t=o/2;return`.${e} { margin: -${t}px } .${e} > * { padding: ${t}px }`})),m(/^(-)?s([xy])-(\d+)(-reverse)?$/,(([e,o,t,r,n])=>`.${e} > :not(:first-child) { margin-${"x"===t?n?"right":"left":n?"bottom":"top"}: ${o?-r:r}px }`)),m(/^text-trim(-all)?$/,(([e,o])=>`.${e}, .${e} ${o?"":">"} * { min-width: 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden }`)),m(/^([fb]g)-(black|white|([\w-]+\d+))(\/(\d+))?$/,(([e,o,t,,,r])=>{const n=h(o),s=E(t,r);return!(!n||!s)&&`.${e.replace(/\//,"\\/")} { ${n}: ${s} }`})),m(/^b-(black|white|([\w-]+\d+))(\/(\d+))?$/,(([e,o,,,t])=>{const r=E(o,t);return!!r&&`.${e.replace(/\//,"\\/")} { border-color: ${r} }`}));let N=[],z=[];const C=/@layer\snextcss;/,M=o.resolve("nextcss.config.js"),A=e.existsSync(M),R={content:"src/**/*.{js,jsx,ts,tsx}",css:"build/**/*.css",colors:{},verbose:!1};if(console.verbose=(...e)=>R.verbose&&console.log(...e),console.log("Nextcss","0.2.8"),A){const{default:e}=await import("file://"+M),o=["merged","debug","useStyleNode"];Object.keys(e).forEach((t=>{t in{...R,...d()}&&!o.includes(t)?e[t]&&(R[t]=e[t]):console.log("[!] Skip unknown param: "+t)})),f(R),console.verbose("[ ] Read","nextcss.config.js"),console.verbose("[ ] Config merged",{...R,...d()})}else console.log("[!]","nextcss.config.js","not found. Continue with default config.");const F={...R,...d()},I=t(F.css);I.length?console.verbose("[ ] Scanning css files",I):(console.log("[!] No css files found with config:",F.css),r(1)),I.forEach((o=>{const t=e.readFileSync(o,"utf8");C.test(t)&&z.push(o)})),z.length||(console.log('[!] No css files found with "@layer nextcss;"'),r(1));const O=t(F.content);O.length?console.verbose("[ ] Scanning content files",O):(console.log("[!] No content files found with config:",F.content),r(1)),O.forEach((o=>{[...e.readFileSync(o,"utf8").matchAll(/['"`](.*?)['"`]/gm)].map((([,e])=>{(e=e.trim())&&N.push(e)}))})),N.forEach((e=>v(e,"SAVE")));const U=F.skipResetStyles?x():":root{line-height:1.4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji';-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;}*,:before,:after{box-sizing:border-box;outline:none;-webkit-user-drag:none;touch-action:pan-x pan-y;}body{margin:0;max-width:100vw;overscroll-behavior:none;}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;}h1,h2,h3,h4,h5,h6,p{margin:0;font:inherit;}small{font-size:85%;}a{color:inherit;text-decoration:none;}button{font:inherit;line-height:1;cursor:pointer;background-color:inherit;border:0;color:inherit;padding:0;}img,svg{display:block;max-width:100%;height:auto;border:none;}input,textarea,select{font:inherit;font-size:16px;border:0;border-radius:0;background-clip:padding-box;color:inherit;background-color:transparent;}textarea{resize:none;}::placeholder{font-size:14px;}label{display:block;}fieldset{border:1px solid;}ul,ol{margin:0;padding:0;list-style-type:none;}hr{border:none;border-bottom:1px solid;}table{border-spacing:0;border-collapse:collapse;}th{font-weight:inherit;}iframe{border:0;}menu{margin:0;padding:0;}form,figure,pre,blockquote,dl,dd{margin:0;}address{font:inherit;}"+x(),V=F.skipRemUnits?U:U.replace(/(\d*\.?\d+)px/g,((e,o)=>{return t=o,Math.round(parseFloat(t)/16*1e3)/1e3+"rem";var t}));V?(z.forEach((o=>{const t=e.readFileSync(o,"utf8");e.writeFileSync(o,t.replace(C,V))})),console.log("[ ] CSS files updated:",z)):console.log("[!] No CSS style has been generated."); |
{ | ||
"name": "@nextcss/nextcss", | ||
"version": "0.2.7", | ||
"version": "0.2.8", | ||
"description": "Testing", | ||
"license": "MIT", | ||
"type": "module", | ||
"main": "dist/browser.js", | ||
"main": "./dist/browser.js", | ||
"exports": { | ||
".": "./dist/browser.js", | ||
"./postcss-plugin": "./dist/postcss-plugin.js", | ||
"./postcss-plugin.js": "./dist/postcss-plugin.js" | ||
}, | ||
"bin": { | ||
"nextcss": "dist/node.js" | ||
"nextcss": "./dist/node.js" | ||
}, | ||
@@ -46,2 +51,4 @@ "files": [ | ||
"jest": "^29.3.1", | ||
"postcss": "^8.4.19", | ||
"postcss-cli": "^10.0.0", | ||
"rollup": "^3.2.5", | ||
@@ -48,0 +55,0 @@ "rollup-plugin-babel": "^4.4.0", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
54738
6
200
11
4
1