UNPKG

3.05 kBPlain TextView Raw
1{"code":"function defineName$__(cls,name){\n\tObject.defineProperty(cls,\"name\",{value:name,configurable:true});\n};;\nfunction inheritClass$__(cls){\n\tObject.getPrototypeOf(cls.prototype).constructor?.inherited?.(cls);\n};;\nfunction extend$__(target,ext){\n\t// @ts-ignore\n\tconst descriptors = Object.getOwnPropertyDescriptors(ext);\n\tdelete descriptors.constructor;\n\tif(target.extend__ instanceof Function){\n\t\ttarget.extend__(descriptors,ext);\n\t} else {\n\t\t// @ts-ignore\n\t\tObject.defineProperties(target,descriptors);\n\t}\n\treturn target;\n};\nconst $__init__$ = Symbol.for('#__init__'), $__patch__$ = Symbol.for('#__patch__'), $__initor__$ = Symbol.for('#__initor__'), $__inited__$ = Symbol.for('#__inited__'), $__hooks__$ = Symbol.for('#__hooks__');\nvar $1 = Symbol();\n\n/*body*/\nimport './any';\n\nexport class OPBooleanField extends OPPlainField {\n\t[$__patch__$]($$ = {},fields = true){\n\t\tvar $2;\n\t\tsuper[$__patch__$] && super[$__patch__$]($$,fields);\n\t\t($2 = $$.pgtype) !== undefined && (this.pgtype = $2);\n\t\t\n\t}\n\tconstructor(){\n\t\tsuper(...arguments);\n\t\tsuper[$__init__$] || this[$__init__$]();this[$__initor__$]===$1 && (this[$__hooks__$]&&this[$__hooks__$].inited(this),this[$__inited__$] && this[$__inited__$]());\n\t}\n\t[$__init__$]($$ = null,deep = true,fields = true){\n\t\tvar $3;\n\t\tdeep && super[$__init__$] && super[$__init__$](...arguments);\n\t\tthis.pgtype = ($$ && ($3 = $$.pgtype) !== undefined) ? ($3) : 'boolean';\n\t\t\n\t}\n\t/**\n\t@returns { boolean }\n\t*/\n\t$get(target){\n\t\t\n\t\tlet d = target[this.$prop];\n\t\treturn d && !(!(d[this.name]));\n\t}\n\t\n\t$patch(){\n\t\t\n\t\treturn true;\n\t}\n\tstatic {\n\t\tthis.prototype[$__initor__$] = $1;defineName$__(this,'OPBooleanField');inheritClass$__(this);}\n}; globalThis.OPBooleanField = OPBooleanField;\n\nclass ΩOPObject {\n\t\n\tαbool(){\n\t\t\n\t\treturn new OPBooleanField;\n\t}\n\tstatic {\n\t\tdefineName$__(this,'OPObject');}\n};\nextend$__(OPObject.prototype,ΩOPObject.prototype);\n;\n","map":{"version":3,"file":"boolean.js","sourceRoot":"","sources":["/Users/abdellah/workspace/scrimba/op/src/fields/boolean.imba"],"sourcesContent":["import './any'\n\nexport global class OPBooleanField < OPPlainField\n\tpgtype = 'boolean'\n\n\tdef $get\\boolean target\n\t\tlet d = target[$prop]\n\t\td and !!d[name]\n\n\tdef $patch\n\t\tyes\n\nextend class OPObject\n\tdef @bool\n\t\treturn new OPBooleanField"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,CAAC,OAAO;;AAEd,MAAM,CAAQ,KAAK,CAAC,cAAc,SAAG,YAAY,EAAA;qCAFjD;;;WAGC,MAAM,CAAA,wBAAN,MAAM;;EAHP;cAAA;;;EAAA;kDAAA;;;OAGC,MAAM,mBAAN,MAAM,CAAA,qBAAA,IAAG,SAAS;;EAHnB;;YAKU,OAAO;;CAAZ,IAAI,CAAS,MAAM,CAAA;;MAClB,CAAC,GAAG,MAAM,CAAA,KAAC,KAAK,CAAC;EACrB,OAAA,CAAC,CAAC,EAAG,CAAC,EAAC,EAAC,CAAC,CAAA,KAAC,IAAI,CAAC,CAAA,CAAA;EAAA;;CAEZ,MAAM,EAAA;;EACT,OAAA,IAAG;EAAA;;;AAAA,cARe,cAAc,GAAd,cAAc;;AAU3B,KAAK,CAAC,SAAQ,EAAA;;CAChB,KAAK,EAAA;;EACR,MAAM,CAAC,GAAG,CAAC,cAAc;EAAA;;;AAAA;UAFd,QAAQ;AAEM;AAAA;"},"dependencies":[],"meta":{"vite":{"lang":"js"}}}
\No newline at end of file