/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/jquery-load-json@1.3.3/src/jquery.loadJSON.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
/*!
* jQuery loadJSON plugin
* v1.3.3
* https://github.com/kevindb/jquery-load-json
*
* This is a jQuery plugin that enables developers to load JSON data from the server and load JSON object into the DOM.
*
* Copyright 2015 Kevin Morris
* Copyright 2011 Jovan Popovic
* Copyright 2008 Alexandre Caprais
*
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
*/
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,r){return void 0===r&&(r="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(r),r}:e(jQuery)}((function(e){"use strict";e.fn.loadJSON=function(t,r){function a(t){try{e.isFunction(t.selectmenu)&&t.selectmenu("refresh")}catch(e){}}function n(t){try{e.isFunction(t.checkboxradio)&&t.checkboxradio("refresh")}catch(e){}}function o(r,n,o){for(var c=jQuery.makeArray(r),l=e(c[c.length-1]).clone(!0),s=t.length,i=s-1,u=0;u<s;++u){var f=l.clone(!0).insertAfter(c[c.length-1]);e(f).attr("value",t[i].value),e(f).text(t[i].text),t[i].selected&&e(f).attr("selected",!0),i--}a(e(r))}function c(r,c,l){var s=e(r),i=r.type||r.tagName;if(null!==i||null!==(i=r[0].type||r[0].tagName))switch(i=i.toLowerCase()){case"radio":c.toString().toLowerCase()==r.value.toLowerCase()?s.prop("checked",!0):s.prop("checked",!1),n(s);break;case"checkbox":var u=s.val();c.constructor==Array&&c.contains(u)||c==u?s.prop("checked",!0):s.prop("checked",!1),n(s);break;case"option":s.attr("value",c.value),s.text(c.text),c.selected&&s.attr("selected",!0);break;case"select-multiple":var f=r[0];if(null!==r[0].options&&void 0!==r[0].options||(f=r),f.options.length>1){for(var d=c.constructor==Array?c:[c],h=0;h<f.options.length;h++)for(var p=0;p<d.length;p++)f.options[h].selected|=f.options[h].value==d[p];a(s)}else o(r);break;case"select":case"select-one":c.constructor==Array?o(r):(s.val(c),a(s));break;case"color":case"date":case"datetime":case"datetime-local":case"email":case"hidden":case"month":case"number":case"password":case"range":case"search":case"tel":case"text":case"time":case"url":case"week":s.val(c);break;case"a":var v=s.attr("href");if(v)(y=v.indexOf("#"))>1e6?v=v.substr(0,y)+"&"+l+"="+c+v.substr(y):(y=v.indexOf("?"))>0?v+="&"+l+"="+c:v=v+"?"+l+"="+c;else v=c;s.attr("href",v);break;case"img":if("String"==t.constructor){var y,g="",m="";if((y=c.indexOf("$"))>0)g=c.substring(0,y),m=c.substring(y+1);else{g=c;var b=c.lastIndexOf("/")+1,k=c.indexOf(".");m=c.substring(b,k)}s.attr("src",g),s.attr("alt",m)}else s.attr("src",t.src),s.attr("alt",t.alt),s.attr("title",t.title);break;default:try{s.html(c.toString())}catch(e){}}}function l(t,r,a){var n=e(r);if(void 0===t);else if(t.constructor==Object){for(var o in r.length>=1&&"OPTION"==r[0].tagName&&c(r[0],t,a),t)if(null!=o&&0!==o.length){var s=jQuery.makeArray(jQuery("."+o,r)).length>0?jQuery("."+o,r):jQuery("#"+o,r).length>0?jQuery("#"+o,r):jQuery('[name="'+o+'"]',r).length>0?jQuery('[name="'+o+'"]',r):jQuery('[rel="'+o+'"]');0!==s.length&&l(t[o],jQuery(s,r),o)}}else if(t.constructor==Array){if(1==r.length&&("select"==r.type||"select-one"==r.type||"select-multiple"==r.type||"select"==r[0].type||"select-one"==r[0].type||"select-multiple"==r[0].type))return void c(r,t,a);if(r.length>0&&"checkbox"==r[0].type)r.each((function(){c(this,t,a)}));else{var i=n.children("[rel]");if(i.length>0)i.each((function(){var r=e(this),n=r.attr("rel");l(t[n],r,a)}));else{var u=jQuery.makeArray(r),f=u.length,d=e(u[f-1]).clone(!0),h=t.length,p=0;if(null===r[0]||null!==r[0]&&"OPTION"!=r[0].tagName){for(var v=0;v<f;++v){if(p<t.length){var y=n.eq(v);l(t[p],y,a)}p++}h=t.length-f}p=t.length-1;for(var g=0;g<h;++g){var m=d.clone(!0).insertAfter(u[f-1]);l(t[p],m,a),p--}}}}else{var b=r.length;if(b>0)for(p=0;p<b;++p)c(r[p],t,a);else c(r,t,a)}}function s(e){var t;null!==e.data("loadJSON-template")&&""!=e.data("loadJSON-template")?(t=e.data("loadJSON-template"),e.html(t)):(t=e.html(),e.data("loadJSON-template",t))}Array.prototype.contains=function(e){for(var t=this.length;t--;)if(this[t]==e)return!0;return!1};var i=e.extend({onLoading:function(){},onLoaded:function(){},mobile:!1},r);return this.each((function(){var r=e(this);if(t.constructor==String)if("{"==t.charAt(0)||"["==t.charAt(0)){var a=e.parseJSON(t);s(r),i.onLoading(),l(a,this),i.onLoaded()}else{var n=r;e.ajax({url:t,success:function(e){n.loadJSON(e,i)},cache:!1,dataType:"json"})}else s(r),i.onLoading(),l(t,this),i.onLoaded()}))}}));
//# sourceMappingURL=/sm/415e3cdf80b8ec28f1d35be2ddb23f4b9f6f0fc531492ef52b995d752f7b0848.map