{:uriI"ífile:///usr/local/bundle/bundler/gems/solidus-28213ce2047d/backend/app/assets/javascripts/spree/backend/variant_autocomplete.js?type=application/javascript&pipeline=self&id=c4497d2857185df36ac9f11f406b599e6fb99a27254f1131ccb89486306d344c:ET:load_pathI"W/usr/local/bundle/bundler/gems/solidus-28213ce2047d/backend/app/assets/javascripts;T: filenameI"}/usr/local/bundle/bundler/gems/solidus-28213ce2047d/backend/app/assets/javascripts/spree/backend/variant_autocomplete.js;T: nameI"'spree/backend/variant_autocomplete;T:logical_pathI"/spree/backend/variant_autocomplete.self.js;T:content_typeI"application/javascript;T: sourceI"U(function() { var variantTemplate = HandlebarsTemplates["variants/autocomplete"]; var formatVariantResult = function(variant) { return variantTemplate({ variant: variant }); }; $.fn.variantAutocomplete = function(searchOptions) { if (searchOptions == null) { searchOptions = {}; } this.select2({ placeholder: Spree.translations.variant_placeholder, minimumInputLength: 3, initSelection: function(element, callback) { Spree.ajax({ url: Spree.pathFor('api/variants/' + element.val()), success: callback }); }, ajax: { url: Spree.pathFor('api/variants'), datatype: "json", quietMillis: 500, params: { "headers": { 'Authorization': 'Bearer ' + Spree.api_key } }, data: function(term, page) { var searchData = { q: { product_name_or_sku_cont: term }, token: Spree.api_key }; return _.extend(searchData, searchOptions); }, results: function(data, page) { window.variants = data["variants"]; return { results: data["variants"] }; } }, formatResult: formatVariantResult, formatSelection: function(variant, container, escapeMarkup) { if (variant.options_text) { return Select2.util.escapeMarkup(variant.name + " (" + variant.options_text + ")"); } else { return Select2.util.escapeMarkup(variant.name); } } }); }; })(); ;T: metadata{:dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"†file-digest:///usr/local/bundle/bundler/gems/solidus-28213ce2047d/backend/app/assets/javascripts/spree/backend/variant_autocomplete.js;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: to_loado;;}F: to_linko;;}F:map{ I" version;TiI" file;TI"*spree/backend/variant_autocomplete.js;TI" mappings;TI"+AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;TI" sources;T[I"#variant_autocomplete.source.js;TI" names;T[I"x_sprockets_linecount;TiA: charsetI" utf-8;F: digest"%†­˜VÒul·—x'J†Š¯^ ï¿—1¬UÉu¥WÏ: lengthiU:environment_versionI"1.0;T:dependencies_digest"%îôäßuW€„ÒqG2ÞqÇKL«Ñ4õ-…XÛY´4à:idI"Ec4497d2857185df36ac9f11f406b599e6fb99a27254f1131ccb89486306d344c;F