{"version":3,"sources":["jsdelivr-header.js","/npm/geopattern@1.2.1/geopattern.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,CCNC,SAAU,GAEX,aAEA,IAAI,EAAU,QAAQ,iBAOtB,SAAS,EAAQ,GAChB,OAAO,SAAU,EAAQ,GAYxB,MAXsB,iBAAX,IACV,EAAU,EACV,EAAS,MAEN,UACH,GAAS,IAAK,MAAQ,YAElB,IACJ,EAAU,CAAC,GAGL,EAAG,KAAK,KAAM,EAAQ,EAC9B,CACD,CAEA,IAAI,EAAa,OAAO,QAAU,CACjC,SAAU,GAAQ,SAAU,EAAQ,GACnC,OAAO,IAAI,EAAQ,EAAQ,EAC5B,KAGG,IAGH,EAAE,GAAG,WAAa,GAAQ,SAAU,EAAQ,GAC3C,OAAO,KAAK,MAAK,WAChB,IAAI,EAAW,EAAE,MAAM,KAAK,kBACxB,IACH,EAAU,EAAE,OAAO,CAClB,KAAM,GACJ,IAEJ,IAAI,EAAU,EAAW,SAAS,EAAQ,GAC1C,EAAE,MAAM,IAAI,mBAAoB,EAAQ,YACzC,GACD,IAID,CApDA,CAoDoB,oBAAX,OAAyB,OAAS","file":"/npm/geopattern@1.2.1/geopattern.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/geopattern@1.2.1/geopattern.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","(function ($) {\n\n'use strict';\n\nvar Pattern = require('./lib/pattern');\n\n/*\n * Normalize arguments, if not given, to:\n * string: (new Date()).toString()\n * options: {}\n */\nfunction optArgs(cb) {\n\treturn function (string, options) {\n\t\tif (typeof string === 'object') {\n\t\t\toptions = string;\n\t\t\tstring = null;\n\t\t}\n\t\tif (string === null || string === undefined) {\n\t\t\tstring = (new Date()).toString();\n\t\t}\n\t\tif (!options) {\n\t\t\toptions = {};\n\t\t}\n\n\t\treturn cb.call(this, string, options);\n\t};\n}\n\nvar GeoPattern = module.exports = {\n\tgenerate: optArgs(function (string, options) {\n\t\treturn new Pattern(string, options);\n\t})\n};\n\nif ($) {\n\n\t// If jQuery, add plugin\n\t$.fn.geopattern = optArgs(function (string, options) {\n\t\treturn this.each(function () {\n\t\t\tvar titleSha = $(this).attr('data-title-sha');\n\t\t\tif (titleSha) {\n\t\t\t\toptions = $.extend({\n\t\t\t\t\thash: titleSha\n\t\t\t\t}, options);\n\t\t\t}\n\t\t\tvar pattern = GeoPattern.generate(string, options);\n\t\t\t$(this).css('background-image', pattern.toDataUrl());\n\t\t});\n\t});\n\n}\n\n}(typeof jQuery !== 'undefined' ? jQuery : null));\n"]}