<commit_before>import Ember from "ember";
import trim from "../system/trim";
import w from "../computed/w";

var get = Ember.get;
var set = Ember.set;
var keys = Ember.keys;

var bind = Ember.run.bind;

var isDragAndDropSupported = (function () {
  var supported = null;
  return function () {
    if (supported == null) {
      supported = 'draggable' in document.createElement('span');
    }
    return supported;
  };
}());

var slice = Array.prototype.slice;

export default Ember.Component.extend({
  classNames: ['pl-uploader'],

  name: null,

  'when-queued': null,

  /**
    A cascading list of runtimes to fallback on to
    for uploading files with.

    @property runtimes
    @type String[]
    @default ['html5', 'html4', 'flash', 'silverlight']
   */
  runtimes: w(['html5', 'html4', 'flash', 'silverlight']),
  accept: w(['application/json', 'text/javascript']),
  extensions: w(),

  "multipart-params": null,
  "max-file-size": null,
  "no-duplicates": null,
  "max-retries": 0,
  "chunk-size": 0,

  features: function () {
    var features = {};

    if (isDragAndDropSupported()) {
      features['drag-and-drop'] = {
        'dropzone-id': 'dropzone-for-' + get(this, 'elementId'),
        'drag-data': null
      };
    }
    return features;
  }.property(),

  attachUploader: function () {
    var manager = get(this, 'fileUploadManager');
    var config  = {
      on_queued:           get(this, 'onQueued'),
      runtimes:            get(this, 'runtimes').join(','),
      browse_button:       get(this, 'for'),
      url:                 get(this, 'action'),
      flash_swf_url:       this.BASE_URL + 'Moxie.swf',
      silverlight_xap_url: this.BASE_URL + 'Moxie.xap',<commit_msg>fix queuing event not being passed to the file manager<commit_after>import Ember from "ember";
import trim from "../system/trim";
import w from "../computed/w";

var get = Ember.get;
var set = Ember.set;
var keys = Ember.keys;

var bind = Ember.run.bind;

var isDragAndDropSupported = (function () {
  var supported = null;
  return function () {
    if (supported == null) {
      supported = 'draggable' in document.createElement('span');
    }
    return supported;
  };
}());

var slice = Array.prototype.slice;

export default Ember.Component.extend({
  classNames: ['pl-uploader'],

  name: null,

  'when-queued': null,

  /**
    A cascading list of runtimes to fallback on to
    for uploading files with.

    @property runtimes
    @type String[]
    @default ['html5', 'html4', 'flash', 'silverlight']
   */
  runtimes: w(['html5', 'html4', 'flash', 'silverlight']),
  accept: w(['application/json', 'text/javascript']),
  extensions: w(),

  "multipart-params": null,
  "max-file-size": null,
  "no-duplicates": null,
  "max-retries": 0,
  "chunk-size": 0,

  features: function () {
    var features = {};

    if (isDragAndDropSupported()) {
      features['drag-and-drop'] = {
        'dropzone-id': 'dropzone-for-' + get(this, 'elementId'),
        'drag-data': null
      };
    }
    return features;
  }.property(),

  attachUploader: function () {
    var manager = get(this, 'fileUploadManager');
    var config  = {
      on_queued:           get(this, 'when-queued'),
      runtimes:            get(this, 'runtimes').join(','),
      browse_button:       get(this, 'for'),
      url:                 get(this, 'action'),
      flash_swf_url:       this.BASE_URL + 'Moxie.swf',
      silverlight_xap_url: this.BASE_URL + 'Moxie.xap',
{'fraction_non_alphanumeric': 0.16291810841983853, 'fraction_numerical': 0.0034602076124567475, 'mean_word_length': 2.867335562987737, 'pattern_counts': {'":': 10, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3806289', 'n_tokens_mistral': 1174, 'n_tokens_neox': 1151, 'n_words': 282}