budibase/packages/server/src/jsRunner/bundles/index-helpers.ivm.bundle.js

60 lines
58 KiB
JavaScript
Raw Normal View History

2024-02-06 10:42:44 +01:00
var De=Object.defineProperty;var un=Object.getOwnPropertyDescriptor;var sn=Object.getOwnPropertyNames;var fn=Object.prototype.hasOwnProperty;var Ue=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Z=(e,t)=>()=>(e&&(t=e(e=0)),t);var U=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),on=(e,t)=>{for(var r in t)De(e,r,{get:t[r],enumerable:!0})},an=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of sn(t))!fn.call(e,i)&&i!==r&&De(e,i,{get:()=>t[i],enumerable:!(n=un(t,i))||n.enumerable});return e};var cn=e=>an(De({},"__esModule",{value:!0}),e);var gt=U((Te,qe)=>{(function(e,t){typeof Te=="object"&&typeof qe<"u"?qe.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Te,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",u="minute",s="hour",f="day",w="week",g="month",l="quarter",x="year",v="date",a="Invalid Date",T=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function($){var h=["th","st","nd","rd"],c=$%100;return"["+$+(h[(c-20)%10]||h[c]||h[0])+"]"}},Y=function($,h,c){var b=String($);return!b||b.length>=h?$:""+Array(h+1-b.length).join(c)+$},F={s:Y,z:function($){var h=-$.utcOffset(),c=Math.abs(h),b=Math.floor(c/60),d=c%60;return(h<=0?"+":"-")+Y(b,2,"0")+":"+Y(d,2,"0")},m:function $(h,c){if(h.date()<c.date())return-$(c,h);var b=12*(c.year()-h.year())+(c.month()-h.month()),d=h.clone().add(b,g),M=c-d<0,j=h.clone().add(b+(M?-1:1),g);return+(-(b+(c-d)/(M?d-j:j-d))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:g,y:x,w,d:f,D:v,h:s,m:u,s:i,ms:n,Q:l}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},q="en",S={};S[q]=I;var p="$isDayjsObject",o=function($){return $ instanceof B||!(!$||!$[p])},D=function $(h,c,b){var d;if(!h)return q;if(typeof h=="string"){var M=h.toLowerCase();S[M]&&(d=M),c&&(S[M]=c,d=M);var j=h.split("-");if(!d&&j.length>1)return $(j[0])}else{var _=h.name;S[_]=h,d=_}return!b&&d&&(q=d),d||!b&&q},N=function($,h){if(o($))return $.clone();var c=typeof h=="object"?h:{};return c.date=$,c.args=arguments,new B(c)},O=F;O.l=D,O.i=o,O.w=function($,h){return N($,{locale:h.$L,utc:h.$u,x:h.$x,$offset:h.$offset})};var B=function(){function $(c){this.$L=D(c.locale,null,!0),this.parse(c),this.$x=this.$x||c.x||{},this[p]=!0}var h=$.prototype;return h.parse=function(c){this.$d=function(b){var d=b.date,M=b.utc;if(d===null)return new Date(NaN);if(O.u(d))return new Date;if(d instanceof Date)return new Date(d);if(typeof d=="string"&&!/Z$/i.test(d)){var j=d.match(T);if(j){var _=j[2]-1||0,H=(j[7]||"0").substring(0,3);return M?new Date(Date.UTC(j[1],_,j[3]||1,j[4]||0,j[5]||0,j[6]||0,H)):new Date(j[1],_,j[3]||1,j[4]||0,j[5]||0,j[6]||0,H)}}return new Date(d)}(c),this.init()},h.init=function(){var c=this.$d;this.$y=c.getFullYear(),this.$M=c.getMonth(),this.$D=c.getDate(),this.$W=c.getDay(),this.$H=c.getHours(),this.$m=c.getMinutes(),this.$s=c.getSeconds(),this.$ms=c.getMilliseconds()},h.$utils=function(){return O},h.isValid=function(){return this.$d.toString()!==a},h.isSame=function(c,b){var d=N(c);return this.startOf(b)<=d&&d<=this.endOf(b)},h.isAfter=function(c,b){return N(c)<this.startOf(b)},h.isBefore=function(c,b){return this.endOf(b)<N(c)},h.$g=function(c,b,d){return O.u(c)?this[b]:this.set(d,c)},h.unix=function(){return Math.floor(this.valueOf()/1e3)},h.valueOf=function(){return this.$d.getTime()},h.startOf=function(c,b){var d=this,M=!!O.u(b)||b,j=O.p(c),_=function(se,Q){var re=O.w(d.$u?Date.UTC(d.$y,Q,se):new Date(d.$y,Q,se),d);re
2024-02-05 18:26:55 +01:00
/*! Bundled license information:
is-buffer/index.js:
(*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*)
isobject/index.js:
(*!
* isobject <https://github.com/jonschlinkert/isobject>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*)
get-value/index.js:
(*!
* get-value <https://github.com/jonschlinkert/get-value>
*
* Copyright (c) 2014-2018, Jon Schlinkert.
* Released under the MIT License.
*)
has-values/index.js:
(*!
* has-values <https://github.com/jonschlinkert/has-values>
*
* Copyright (c) 2014-2018, Jon Schlinkert.
* Released under the MIT License.
*)
has-value/index.js:
(*!
* has-value <https://github.com/jonschlinkert/has-value>
*
* Copyright (c) 2014-2018, Jon Schlinkert.
* Released under the MIT License.
*)
is-number/index.js:
(*!
* is-number <https://github.com/jonschlinkert/is-number>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*)
get-object/index.js:
(*!
* get-object <https://github.com/jonschlinkert/get-object>
*
* Copyright (c) 2014 Jon Schlinkert, contributors.
* Licensed under the MIT License
*)
*/